From c27282b5163abb98c97fb773034827a59aa46d1a Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Tue, 12 Mar 2024 13:09:31 +0000 Subject: [PATCH] chore: generated code for commit 156fd9e695c3e64e8495bc54ecc9bad3be861a1f. [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kai Welke Co-authored-by: Pierre Millot Co-authored-by: ClĂ©ment Vannicatte --- .../algoliasearch/Clients/AbtestingClient.cs | 16 +- .../algoliasearch/Clients/AnalyticsClient.cs | 520 +-- .../algoliasearch/Clients/RecommendClient.cs | 48 +- .../algoliasearch/Clients/SearchClient.cs | 978 ++--- .../Clients/SearchConfiguration.cs | 2 +- .../Models/Abtesting/ABTestResponse.cs | 6 +- .../Models/Analytics/SearchNoResultEvent.cs | 6 +- .../Models/Analytics/TopSearch.cs | 6 +- .../Analytics/TopSearchWithAnalytics.cs | 6 +- .../Models/Recommend/Anchoring.cs | 4 +- .../Models/Recommend/AroundPrecision.cs | 2 +- .../AroundPrecisionFromValueInner.cs | 8 +- .../Models/Recommend/AroundRadius.cs | 2 +- .../Models/Recommend/AroundRadiusAll.cs | 3 +- .../Models/Recommend/AutomaticFacetFilter.cs | 16 +- .../Models/Recommend/AutomaticFacetFilters.cs | 2 +- .../Models/Recommend/BaseRecommendRequest.cs | 6 +- .../Recommend/BaseRecommendationsQuery.cs | 6 +- .../BaseRecommendedForYouQueryParameters.cs | 6 +- .../Models/Recommend/BaseSearchParams.cs | 113 +- .../Recommend/BaseSearchParamsWithoutQuery.cs | 109 +- .../Models/Recommend/BaseSearchResponse.cs | 30 +- .../Models/Recommend/Condition.cs | 27 +- .../Models/Recommend/Consequence.cs | 18 +- .../Models/Recommend/ConsequenceHide.cs | 8 +- .../Models/Recommend/ConsequenceParams.cs | 242 +- .../Models/Recommend/ConsequenceQuery.cs | 2 +- .../Recommend/ConsequenceQueryObject.cs | 8 +- .../Models/Recommend/DeletedAtResponse.cs | 6 +- .../Models/Recommend/Distinct.cs | 2 +- .../algoliasearch/Models/Recommend/Edit.cs | 4 +- .../Recommend/ExactOnSingleWordQuery.cs | 4 +- .../Models/Recommend/FacetFilters.cs | 2 +- .../Models/Recommend/FacetOrdering.cs | 6 +- .../algoliasearch/Models/Recommend/Facets.cs | 6 +- .../Models/Recommend/HighlightResultOption.cs | 14 +- .../Models/Recommend/IgnorePlurals.cs | 2 +- .../Recommend/IndexSettingsAsSearchParams.cs | 133 +- .../Models/Recommend/MatchLevel.cs | 4 +- .../algoliasearch/Models/Recommend/Mode.cs | 4 +- .../Models/Recommend/NumericFilters.cs | 2 +- .../Models/Recommend/OptionalFilters.cs | 2 +- .../algoliasearch/Models/Recommend/Params.cs | 2 +- .../Models/Recommend/PromoteObjectID.cs | 12 +- .../Models/Recommend/PromoteObjectIDs.cs | 12 +- .../Models/Recommend/QueryType.cs | 4 +- .../Models/Recommend/RankingInfo.cs | 40 +- .../Models/Recommend/ReRankingApplyFilter.cs | 2 +- .../Models/Recommend/RecommendHit.cs | 14 +- .../Models/Recommend/RecommendationsHits.cs | 4 +- .../Models/Recommend/RecommendationsQuery.cs | 12 +- .../Recommend/RecommendationsResults.cs | 34 +- .../Recommend/RecommendedForYouQuery.cs | 6 +- .../RecommendedForYouQueryParameters.cs | 248 +- .../Models/Recommend/RemoveStopWords.cs | 2 +- .../Recommend/RemoveWordsIfNoResults.cs | 4 +- .../Models/Recommend/RenderingContent.cs | 2 +- .../Models/Recommend/SearchParamsObject.cs | 246 +- .../Models/Recommend/SearchParamsQuery.cs | 4 +- .../Recommend/SearchRecommendRulesParams.cs | 8 +- .../Recommend/SearchRecommendRulesResponse.cs | 18 +- .../Models/Recommend/SemanticSearch.cs | 6 +- .../Models/Recommend/SnippetResultOption.cs | 8 +- .../Models/Recommend/SortRemainingBy.cs | 4 +- .../Models/Recommend/TagFilters.cs | 2 +- .../Models/Recommend/TaskStatus.cs | 4 +- .../Models/Recommend/TrendingFacetsQuery.cs | 6 +- .../Models/Recommend/TrendingItemsQuery.cs | 6 +- .../Models/Recommend/TypoTolerance.cs | 2 +- .../Models/Recommend/TypoToleranceEnum.cs | 3 +- .../algoliasearch/Models/Recommend/Value.cs | 4 +- .../algoliasearch/Models/Search/Acl.cs | 4 +- .../algoliasearch/Models/Search/Action.cs | 4 +- .../Models/Search/AddApiKeyResponse.cs | 6 +- .../algoliasearch/Models/Search/Anchoring.cs | 4 +- .../algoliasearch/Models/Search/ApiKey.cs | 34 +- .../Models/Search/AroundPrecision.cs | 2 +- .../Search/AroundPrecisionFromValueInner.cs | 8 +- .../Models/Search/AroundRadius.cs | 2 +- .../Models/Search/AroundRadiusAll.cs | 3 +- .../Models/Search/AutomaticFacetFilter.cs | 16 +- .../Models/Search/AutomaticFacetFilters.cs | 2 +- .../Models/Search/BaseIndexSettings.cs | 77 +- .../Models/Search/BaseSearchParams.cs | 113 +- .../Search/BaseSearchParamsWithoutQuery.cs | 109 +- .../Models/Search/BaseSearchResponse.cs | 30 +- .../Search/BatchDictionaryEntriesParams.cs | 12 +- .../Models/Search/BatchResponse.cs | 12 +- .../Models/Search/BrowseParamsObject.cs | 250 +- .../Models/Search/BrowseResponse.cs | 45 +- .../Models/Search/BuiltInOperation.cs | 8 +- .../Models/Search/BuiltInOperationType.cs | 4 +- .../algoliasearch/Models/Search/Condition.cs | 27 +- .../Models/Search/Consequence.cs | 18 +- .../Models/Search/ConsequenceHide.cs | 8 +- .../Models/Search/ConsequenceParams.cs | 242 +- .../Models/Search/ConsequenceQuery.cs | 2 +- .../Models/Search/ConsequenceQueryObject.cs | 8 +- .../Models/Search/CreatedAtResponse.cs | 6 +- .../algoliasearch/Models/Search/Cursor.cs | 4 +- .../Models/Search/DeleteByParams.cs | 16 +- .../Models/Search/DeletedAtResponse.cs | 6 +- .../Models/Search/DictionaryEntry.cs | 24 +- .../Models/Search/DictionaryEntryState.cs | 4 +- .../Models/Search/DictionaryLanguage.cs | 6 +- .../Models/Search/DictionarySettingsParams.cs | 2 +- .../algoliasearch/Models/Search/Distinct.cs | 2 +- .../algoliasearch/Models/Search/Edit.cs | 4 +- .../Models/Search/ExactOnSingleWordQuery.cs | 4 +- .../Models/Search/FacetFilters.cs | 2 +- .../algoliasearch/Models/Search/FacetHits.cs | 12 +- .../Models/Search/FacetOrdering.cs | 6 +- .../algoliasearch/Models/Search/Facets.cs | 6 +- .../Models/Search/GetApiKeyResponse.cs | 34 +- .../Models/Search/GetObjectsRequest.cs | 18 +- .../Models/Search/GetObjectsResponse.cs | 6 +- .../Search/HasPendingMappingsResponse.cs | 6 +- .../Models/Search/HighlightResultOption.cs | 14 +- .../algoliasearch/Models/Search/Hit.cs | 16 +- .../Models/Search/IgnorePlurals.cs | 2 +- .../Models/Search/IndexSettings.cs | 212 +- .../Search/IndexSettingsAsSearchParams.cs | 133 +- .../algoliasearch/Models/Search/Log.cs | 62 +- .../algoliasearch/Models/Search/LogQuery.cs | 4 +- .../algoliasearch/Models/Search/MatchLevel.cs | 4 +- .../algoliasearch/Models/Search/Mode.cs | 4 +- .../Models/Search/MultipleBatchResponse.cs | 12 +- .../Models/Search/NumericFilters.cs | 2 +- .../Models/Search/OperationIndexParams.cs | 10 +- .../Models/Search/OperationType.cs | 4 +- .../Models/Search/OptionalFilters.cs | 2 +- .../algoliasearch/Models/Search/Params.cs | 2 +- .../Models/Search/PromoteObjectID.cs | 12 +- .../Models/Search/PromoteObjectIDs.cs | 12 +- .../algoliasearch/Models/Search/QueryType.cs | 4 +- .../Models/Search/RankingInfo.cs | 40 +- .../Models/Search/ReRankingApplyFilter.cs | 2 +- .../Models/Search/RemoveStopWords.cs | 2 +- .../Models/Search/RemoveWordsIfNoResults.cs | 4 +- .../Models/Search/RenderingContent.cs | 2 +- .../algoliasearch/Models/Search/Rule.cs | 22 +- .../Models/Search/SaveObjectResponse.cs | 16 +- .../Models/Search/SaveSynonymResponse.cs | 6 +- .../Search/SearchDictionaryEntriesParams.cs | 16 +- .../Search/SearchDictionaryEntriesResponse.cs | 132 + .../Search/SearchForFacetValuesRequest.cs | 4 +- .../Search/SearchForFacetValuesResponse.cs | 5 +- .../Models/Search/SearchForFacets.cs | 252 +- .../Models/Search/SearchForFacetsOptions.cs | 10 +- .../Models/Search/SearchForHits.cs | 252 +- .../Models/Search/SearchForHitsOptions.cs | 6 +- .../algoliasearch/Models/Search/SearchHits.cs | 11 +- .../Models/Search/SearchParamsObject.cs | 246 +- .../Models/Search/SearchParamsQuery.cs | 4 +- .../Models/Search/SearchResponse.cs | 41 +- .../Models/Search/SearchRulesParams.cs | 31 +- .../Models/Search/SearchRulesResponse.cs | 12 +- .../Models/Search/SearchStrategy.cs | 4 +- .../Models/Search/SearchSynonymsParams.cs | 8 +- .../Models/Search/SearchSynonymsResponse.cs | 12 +- .../Models/Search/SearchUserIdsParams.cs | 4 +- .../Models/Search/SearchUserIdsResponse.cs | 12 +- .../Search/SecuredAPIKeyRestrictions.cs | 20 +- .../Models/Search/SemanticSearch.cs | 6 +- .../Models/Search/SnippetResultOption.cs | 8 +- .../Models/Search/SortRemainingBy.cs | 4 +- .../algoliasearch/Models/Search/TagFilters.cs | 2 +- .../algoliasearch/Models/Search/TaskStatus.cs | 4 +- .../algoliasearch/Models/Search/TimeRange.cs | 12 +- .../Models/Search/TypoTolerance.cs | 2 +- .../Models/Search/TypoToleranceEnum.cs | 3 +- .../Models/Search/UpdatedAtResponse.cs | 6 +- .../Search/UpdatedAtWithObjectIdResponse.cs | 8 +- .../Models/Search/UpdatedRuleResponse.cs | 12 +- .../algoliasearch/Models/Search/UserHit.cs | 6 +- .../algoliasearch/Models/Search/UserId.cs | 6 +- .../algoliasearch/Models/Search/Value.cs | 4 +- .../algoliasearch/lib/algoliasearch_lite.dart | 1 + .../lib/src/api/search_client.dart | 4 +- .../algoliasearch/lib/src/deserialize.dart | 4 + .../algoliasearch/lib/src/model/acl.dart | 2 +- .../algoliasearch/lib/src/model/action.dart | 2 +- .../lib/src/model/add_api_key_response.dart | 2 +- .../lib/src/model/anchoring.dart | 2 +- .../algoliasearch/lib/src/model/api_key.dart | 16 +- .../around_precision_from_value_inner.dart | 2 + .../lib/src/model/around_radius_all.dart | 1 + .../lib/src/model/automatic_facet_filter.dart | 6 +- .../lib/src/model/base_index_settings.dart | 40 +- .../lib/src/model/base_index_settings.g.dart | 3 + .../lib/src/model/base_search_params.dart | 60 +- .../lib/src/model/base_search_params.g.dart | 3 - .../base_search_params_without_query.dart | 58 +- .../base_search_params_without_query.g.dart | 3 - .../lib/src/model/base_search_response.dart | 13 +- .../lib/src/model/browse_params_object.dart | 130 +- .../lib/src/model/browse_params_object.g.dart | 6 - .../lib/src/model/browse_response.dart | 18 +- .../lib/src/model/built_in_operation.dart | 2 +- .../src/model/built_in_operation_type.dart | 2 +- .../lib/src/model/condition.dart | 17 +- .../lib/src/model/condition.g.dart | 2 + .../lib/src/model/consequence.dart | 8 +- .../lib/src/model/consequence_hide.dart | 2 +- .../lib/src/model/consequence_params.dart | 126 +- .../lib/src/model/consequence_params.g.dart | 6 - .../src/model/consequence_query_object.dart | 4 +- .../algoliasearch/lib/src/model/cursor.dart | 2 +- .../lib/src/model/delete_by_params.dart | 8 +- .../lib/src/model/dictionary_entry.dart | 10 +- .../lib/src/model/dictionary_entry_state.dart | 2 +- .../lib/src/model/dictionary_language.dart | 2 +- .../algoliasearch/lib/src/model/edit.dart | 2 +- .../src/model/exact_on_single_word_query.dart | 2 +- .../lib/src/model/facet_hits.dart | 4 +- .../lib/src/model/facet_ordering.dart | 2 +- .../algoliasearch/lib/src/model/facets.dart | 2 +- .../lib/src/model/get_api_key_response.dart | 16 +- .../src/model/highlight_result_option.dart | 4 +- .../algoliasearch/lib/src/model/hit.dart | 6 +- .../lib/src/model/index_settings.dart | 108 +- .../lib/src/model/index_settings.g.dart | 6 +- .../index_settings_as_search_params.dart | 68 +- .../index_settings_as_search_params.g.dart | 3 - .../lib/src/model/match_level.dart | 2 +- .../algoliasearch/lib/src/model/mode.dart | 2 +- .../lib/src/model/operation_type.dart | 2 +- .../lib/src/model/promote_object_id.dart | 4 +- .../lib/src/model/promote_object_ids.dart | 4 +- .../lib/src/model/query_type.dart | 2 +- .../lib/src/model/ranking_info.dart | 22 +- .../src/model/remove_words_if_no_results.dart | 2 +- .../algoliasearch/lib/src/model/rule.dart | 10 +- .../search_dictionary_entries_response.dart | 59 + .../search_dictionary_entries_response.g.dart | 37 + .../search_for_facet_values_response.dart | 1 + .../lib/src/model/search_for_facets.dart | 130 +- .../lib/src/model/search_for_facets.g.dart | 6 - .../src/model/search_for_facets_options.dart | 4 +- .../lib/src/model/search_for_hits.dart | 130 +- .../lib/src/model/search_for_hits.g.dart | 6 - .../src/model/search_for_hits_options.dart | 2 +- .../lib/src/model/search_hits.dart | 3 +- .../lib/src/model/search_params_object.dart | 128 +- .../lib/src/model/search_params_object.g.dart | 6 - .../lib/src/model/search_params_query.dart | 2 +- .../lib/src/model/search_response.dart | 16 +- .../lib/src/model/search_strategy.dart | 2 +- .../src/model/search_synonyms_response.dart | 4 +- .../model/secured_api_key_restrictions.dart | 10 +- .../lib/src/model/semantic_search.dart | 2 +- .../lib/src/model/snippet_result_option.dart | 2 +- .../lib/src/model/sort_remaining_by.dart | 2 +- .../lib/src/model/task_status.dart | 2 +- .../lib/src/model/time_range.dart | 4 +- .../lib/src/model/typo_tolerance_enum.dart | 1 + .../lib/src/model/updated_rule_response.dart | 4 +- .../algoliasearch/lib/src/model/user_id.dart | 2 +- .../algoliasearch/lib/src/model/value.dart | 2 +- .../lib/src/api/recommend_client.dart | 12 +- .../lib/src/model/anchoring.dart | 2 +- .../around_precision_from_value_inner.dart | 2 + .../lib/src/model/around_radius_all.dart | 1 + .../lib/src/model/automatic_facet_filter.dart | 6 +- .../lib/src/model/base_recommend_request.dart | 2 +- .../src/model/base_recommendations_query.dart | 2 +- ..._recommended_for_you_query_parameters.dart | 2 +- .../lib/src/model/base_search_params.dart | 60 +- .../lib/src/model/base_search_params.g.dart | 3 - .../base_search_params_without_query.dart | 58 +- .../base_search_params_without_query.g.dart | 3 - .../lib/src/model/base_search_response.dart | 13 +- .../lib/src/model/condition.dart | 17 +- .../lib/src/model/condition.g.dart | 2 + .../lib/src/model/consequence.dart | 8 +- .../lib/src/model/consequence_hide.dart | 2 +- .../lib/src/model/consequence_params.dart | 126 +- .../lib/src/model/consequence_params.g.dart | 6 - .../src/model/consequence_query_object.dart | 4 +- .../lib/src/model/deleted_at_response.dart | 2 +- .../client_recommend/lib/src/model/edit.dart | 2 +- .../src/model/exact_on_single_word_query.dart | 2 +- .../lib/src/model/facet_ordering.dart | 2 +- .../lib/src/model/facets.dart | 2 +- .../src/model/highlight_result_option.dart | 4 +- .../index_settings_as_search_params.dart | 68 +- .../index_settings_as_search_params.g.dart | 3 - .../lib/src/model/match_level.dart | 2 +- .../client_recommend/lib/src/model/mode.dart | 2 +- .../lib/src/model/promote_object_id.dart | 4 +- .../lib/src/model/promote_object_ids.dart | 4 +- .../lib/src/model/query_type.dart | 2 +- .../lib/src/model/ranking_info.dart | 22 +- .../lib/src/model/recommend_hit.dart | 6 +- .../lib/src/model/recommendations_hits.dart | 2 +- .../lib/src/model/recommendations_query.dart | 4 +- .../src/model/recommendations_results.dart | 15 +- .../src/model/recommended_for_you_query.dart | 2 +- .../recommended_for_you_query_parameters.dart | 128 +- ...ecommended_for_you_query_parameters.g.dart | 6 - .../src/model/remove_words_if_no_results.dart | 2 +- .../lib/src/model/search_params_object.dart | 128 +- .../lib/src/model/search_params_object.g.dart | 6 - .../lib/src/model/search_params_query.dart | 2 +- .../model/search_recommend_rules_params.dart | 4 +- .../search_recommend_rules_response.dart | 7 +- .../lib/src/model/semantic_search.dart | 2 +- .../lib/src/model/snippet_result_option.dart | 2 +- .../lib/src/model/sort_remaining_by.dart | 2 +- .../lib/src/model/task_status.dart | 2 +- .../lib/src/model/trending_facets_query.dart | 2 +- .../lib/src/model/trending_items_query.dart | 2 +- .../lib/src/model/typo_tolerance_enum.dart | 1 + .../client_recommend/lib/src/model/value.dart | 2 +- .../lib/algolia_client_search.dart | 1 + .../lib/src/api/search_client.dart | 248 +- .../client_search/lib/src/deserialize.dart | 4 + .../client_search/lib/src/model/acl.dart | 2 +- .../client_search/lib/src/model/action.dart | 2 +- .../lib/src/model/add_api_key_response.dart | 2 +- .../lib/src/model/anchoring.dart | 2 +- .../client_search/lib/src/model/api_key.dart | 16 +- .../around_precision_from_value_inner.dart | 2 + .../lib/src/model/around_radius_all.dart | 1 + .../lib/src/model/automatic_facet_filter.dart | 6 +- .../lib/src/model/base_index_settings.dart | 40 +- .../lib/src/model/base_index_settings.g.dart | 3 + .../lib/src/model/base_search_params.dart | 60 +- .../lib/src/model/base_search_params.g.dart | 3 - .../base_search_params_without_query.dart | 58 +- .../base_search_params_without_query.g.dart | 3 - .../lib/src/model/base_search_response.dart | 13 +- .../batch_dictionary_entries_params.dart | 4 +- .../lib/src/model/batch_response.dart | 4 +- .../lib/src/model/browse_params_object.dart | 130 +- .../lib/src/model/browse_params_object.g.dart | 6 - .../lib/src/model/browse_response.dart | 18 +- .../lib/src/model/built_in_operation.dart | 2 +- .../src/model/built_in_operation_type.dart | 2 +- .../lib/src/model/condition.dart | 17 +- .../lib/src/model/condition.g.dart | 2 + .../lib/src/model/consequence.dart | 8 +- .../lib/src/model/consequence_hide.dart | 2 +- .../lib/src/model/consequence_params.dart | 126 +- .../lib/src/model/consequence_params.g.dart | 6 - .../src/model/consequence_query_object.dart | 4 +- .../lib/src/model/created_at_response.dart | 2 +- .../client_search/lib/src/model/cursor.dart | 2 +- .../lib/src/model/delete_by_params.dart | 8 +- .../lib/src/model/deleted_at_response.dart | 2 +- .../lib/src/model/dictionary_entry.dart | 10 +- .../lib/src/model/dictionary_entry_state.dart | 2 +- .../lib/src/model/dictionary_language.dart | 2 +- .../client_search/lib/src/model/edit.dart | 2 +- .../src/model/exact_on_single_word_query.dart | 2 +- .../lib/src/model/facet_hits.dart | 4 +- .../lib/src/model/facet_ordering.dart | 2 +- .../client_search/lib/src/model/facets.dart | 2 +- .../lib/src/model/get_api_key_response.dart | 16 +- .../lib/src/model/get_objects_request.dart | 4 +- .../lib/src/model/get_objects_response.dart | 2 +- .../model/has_pending_mappings_response.dart | 2 +- .../src/model/highlight_result_option.dart | 4 +- .../client_search/lib/src/model/hit.dart | 6 +- .../lib/src/model/index_settings.dart | 108 +- .../lib/src/model/index_settings.g.dart | 6 +- .../index_settings_as_search_params.dart | 68 +- .../index_settings_as_search_params.g.dart | 3 - .../client_search/lib/src/model/log.dart | 22 +- .../lib/src/model/log_query.dart | 2 +- .../lib/src/model/match_level.dart | 2 +- .../client_search/lib/src/model/mode.dart | 2 +- .../src/model/multiple_batch_response.dart | 4 +- .../lib/src/model/operation_index_params.dart | 4 +- .../lib/src/model/operation_type.dart | 2 +- .../lib/src/model/promote_object_id.dart | 4 +- .../lib/src/model/promote_object_ids.dart | 4 +- .../lib/src/model/query_type.dart | 2 +- .../lib/src/model/ranking_info.dart | 22 +- .../src/model/remove_words_if_no_results.dart | 2 +- .../client_search/lib/src/model/rule.dart | 10 +- .../lib/src/model/save_object_response.dart | 6 +- .../lib/src/model/save_synonym_response.dart | 2 +- .../search_dictionary_entries_params.dart | 7 +- .../search_dictionary_entries_response.dart | 59 + .../search_dictionary_entries_response.g.dart | 37 + .../search_for_facet_values_request.dart | 2 +- .../search_for_facet_values_response.dart | 1 + .../lib/src/model/search_for_facets.dart | 130 +- .../lib/src/model/search_for_facets.g.dart | 6 - .../src/model/search_for_facets_options.dart | 4 +- .../lib/src/model/search_for_hits.dart | 130 +- .../lib/src/model/search_for_hits.g.dart | 6 - .../src/model/search_for_hits_options.dart | 2 +- .../lib/src/model/search_hits.dart | 3 +- .../lib/src/model/search_params_object.dart | 128 +- .../lib/src/model/search_params_object.g.dart | 6 - .../lib/src/model/search_params_query.dart | 2 +- .../lib/src/model/search_response.dart | 16 +- .../lib/src/model/search_rules_params.dart | 19 +- .../lib/src/model/search_rules_params.g.dart | 3 - .../lib/src/model/search_rules_response.dart | 4 +- .../lib/src/model/search_strategy.dart | 2 +- .../lib/src/model/search_synonyms_params.dart | 5 +- .../src/model/search_synonyms_response.dart | 4 +- .../lib/src/model/search_user_ids_params.dart | 3 +- .../src/model/search_user_ids_response.dart | 5 +- .../model/secured_api_key_restrictions.dart | 10 +- .../lib/src/model/semantic_search.dart | 2 +- .../lib/src/model/snippet_result_option.dart | 2 +- .../lib/src/model/sort_remaining_by.dart | 2 +- .../lib/src/model/task_status.dart | 2 +- .../lib/src/model/time_range.dart | 4 +- .../lib/src/model/typo_tolerance_enum.dart | 1 + .../lib/src/model/updated_at_response.dart | 2 +- .../updated_at_with_object_id_response.dart | 4 +- .../lib/src/model/updated_rule_response.dart | 4 +- .../client_search/lib/src/model/user_hit.dart | 2 +- .../client_search/lib/src/model/user_id.dart | 2 +- .../client_search/lib/src/model/value.dart | 2 +- .../algolia/abtesting/api_abtesting.go | 8 +- .../abtesting/model_ab_test_response.go | 2 +- .../algolia/analytics/api_analytics.go | 260 +- .../analytics/model_search_no_result_event.go | 2 +- .../algolia/analytics/model_top_search.go | 2 +- .../model_top_search_with_analytics.go | 2 +- .../algolia/recommend/api_recommend.go | 24 +- .../algolia/recommend/model_anchoring.go | 2 +- .../recommend/model_around_precision.go | 2 +- ...model_around_precision_from_value_inner.go | 6 +- .../algolia/recommend/model_around_radius.go | 2 +- .../recommend/model_around_radius_all.go | 2 +- .../recommend/model_automatic_facet_filter.go | 8 +- .../model_automatic_facet_filters.go | 2 +- .../recommend/model_base_recommend_request.go | 2 +- .../model_base_recommendations_query.go | 2 +- ...se_recommended_for_you_query_parameters.go | 2 +- .../recommend/model_base_search_params.go | 95 +- .../model_base_search_params_without_query.go | 93 +- .../recommend/model_base_search_response.go | 12 +- .../algolia/recommend/model_condition.go | 51 +- .../algolia/recommend/model_consequence.go | 10 +- .../recommend/model_consequence_hide.go | 4 +- .../recommend/model_consequence_params.go | 198 +- .../recommend/model_consequence_query.go | 2 +- .../model_consequence_query_object.go | 4 +- .../recommend/model_deleted_at_response.go | 2 +- .../algolia/recommend/model_distinct.go | 2 +- .../algolia/recommend/model_edit.go | 2 +- .../model_exact_on_single_word_query.go | 2 +- .../algolia/recommend/model_facet_filters.go | 2 +- .../algolia/recommend/model_facet_ordering.go | 4 +- .../algolia/recommend/model_facets.go | 4 +- .../model_highlight_result_option.go | 6 +- .../algolia/recommend/model_ignore_plurals.go | 2 +- .../model_index_settings_as_search_params.go | 105 +- .../algolia/recommend/model_match_level.go | 2 +- .../algolia/recommend/model_mode.go | 2 +- .../recommend/model_numeric_filters.go | 2 +- .../recommend/model_optional_filters.go | 2 +- .../algolia/recommend/model_params.go | 2 +- .../recommend/model_promote_object_id.go | 4 +- .../recommend/model_promote_object_ids.go | 4 +- .../algolia/recommend/model_query_type.go | 2 +- .../algolia/recommend/model_ranking_info.go | 16 +- .../model_re_ranking_apply_filter.go | 2 +- .../algolia/recommend/model_recommend_hit.go | 6 +- .../recommend/model_recommendations_hits.go | 2 +- .../recommend/model_recommendations_query.go | 4 +- .../model_recommendations_results.go | 14 +- .../model_recommended_for_you_query.go | 2 +- ...el_recommended_for_you_query_parameters.go | 200 +- .../recommend/model_remove_stop_words.go | 2 +- .../model_remove_words_if_no_results.go | 2 +- .../recommend/model_rendering_content.go | 2 +- .../recommend/model_search_params_object.go | 200 +- .../recommend/model_search_params_query.go | 2 +- .../model_search_recommend_rules_params.go | 4 +- .../model_search_recommend_rules_response.go | 6 +- .../recommend/model_semantic_search.go | 4 +- .../recommend/model_snippet_result_option.go | 4 +- .../recommend/model_sort_remaining_by.go | 2 +- .../algolia/recommend/model_tag_filters.go | 2 +- .../algolia/recommend/model_task_status.go | 2 +- .../recommend/model_trending_facets_query.go | 2 +- .../recommend/model_trending_items_query.go | 2 +- .../algolia/recommend/model_typo_tolerance.go | 2 +- .../recommend/model_typo_tolerance_enum.go | 2 +- .../algolia/recommend/model_value.go | 2 +- .../algolia/search/api_search.go | 812 ++-- .../algolia/search/model_acl.go | 2 +- .../algolia/search/model_action.go | 2 +- .../search/model_add_api_key_response.go | 2 +- .../algolia/search/model_anchoring.go | 2 +- .../algolia/search/model_api_key.go | 16 +- .../algolia/search/model_around_precision.go | 2 +- ...model_around_precision_from_value_inner.go | 6 +- .../algolia/search/model_around_radius.go | 2 +- .../algolia/search/model_around_radius_all.go | 2 +- .../search/model_automatic_facet_filter.go | 8 +- .../search/model_automatic_facet_filters.go | 2 +- .../search/model_base_index_settings.go | 77 +- .../search/model_base_search_params.go | 95 +- .../model_base_search_params_without_query.go | 93 +- .../search/model_base_search_response.go | 12 +- .../model_batch_dictionary_entries_params.go | 6 +- .../algolia/search/model_batch_response.go | 4 +- .../search/model_browse_params_object.go | 202 +- .../algolia/search/model_browse_response.go | 19 +- .../search/model_built_in_operation.go | 4 +- .../search/model_built_in_operation_type.go | 2 +- .../algolia/search/model_condition.go | 51 +- .../algolia/search/model_consequence.go | 10 +- .../algolia/search/model_consequence_hide.go | 4 +- .../search/model_consequence_params.go | 198 +- .../algolia/search/model_consequence_query.go | 2 +- .../search/model_consequence_query_object.go | 4 +- .../search/model_created_at_response.go | 2 +- .../algolia/search/model_cursor.go | 2 +- .../algolia/search/model_delete_by_params.go | 8 +- .../search/model_deleted_at_response.go | 2 +- .../algolia/search/model_dictionary_entry.go | 10 +- .../search/model_dictionary_entry_state.go | 2 +- .../search/model_dictionary_language.go | 4 +- .../model_dictionary_settings_params.go | 2 +- .../algolia/search/model_distinct.go | 2 +- .../algolia/search/model_edit.go | 2 +- .../model_exact_on_single_word_query.go | 2 +- .../algolia/search/model_facet_filters.go | 2 +- .../algolia/search/model_facet_hits.go | 4 +- .../algolia/search/model_facet_ordering.go | 4 +- .../algolia/search/model_facets.go | 4 +- .../search/model_get_api_key_response.go | 16 +- .../search/model_get_objects_request.go | 6 +- .../search/model_get_objects_response.go | 2 +- .../model_has_pending_mappings_response.go | 2 +- .../search/model_highlight_result_option.go | 6 +- .../algolia/search/model_hit.go | 8 +- .../algolia/search/model_ignore_plurals.go | 2 +- .../algolia/search/model_index_settings.go | 184 +- .../model_index_settings_as_search_params.go | 105 +- .../algolia/search/model_log.go | 22 +- .../algolia/search/model_log_query.go | 2 +- .../algolia/search/model_match_level.go | 2 +- .../algolia/search/model_mode.go | 2 +- .../search/model_multiple_batch_response.go | 4 +- .../algolia/search/model_numeric_filters.go | 2 +- .../search/model_operation_index_params.go | 4 +- .../algolia/search/model_operation_type.go | 2 +- .../algolia/search/model_optional_filters.go | 2 +- .../algolia/search/model_params.go | 2 +- .../algolia/search/model_promote_object_id.go | 4 +- .../search/model_promote_object_ids.go | 4 +- .../algolia/search/model_query_type.go | 2 +- .../algolia/search/model_ranking_info.go | 16 +- .../search/model_re_ranking_apply_filter.go | 2 +- .../algolia/search/model_remove_stop_words.go | 2 +- .../model_remove_words_if_no_results.go | 2 +- .../algolia/search/model_rendering_content.go | 2 +- .../algolia/search/model_rule.go | 10 +- .../search/model_save_object_response.go | 6 +- .../search/model_save_synonym_response.go | 2 +- .../model_search_dictionary_entries_params.go | 8 +- ...odel_search_dictionary_entries_response.go | 204 + .../model_search_for_facet_values_request.go | 2 +- .../model_search_for_facet_values_response.go | 1 + .../algolia/search/model_search_for_facets.go | 202 +- .../search/model_search_for_facets_options.go | 4 +- .../algolia/search/model_search_for_hits.go | 202 +- .../search/model_search_for_hits_options.go | 2 +- .../algolia/search/model_search_hits.go | 3 +- .../search/model_search_params_object.go | 200 +- .../search/model_search_params_query.go | 2 +- .../algolia/search/model_search_response.go | 17 +- .../search/model_search_rules_params.go | 53 +- .../search/model_search_rules_response.go | 4 +- .../algolia/search/model_search_strategy.go | 2 +- .../search/model_search_synonyms_params.go | 4 +- .../search/model_search_synonyms_response.go | 4 +- .../search/model_search_user_ids_params.go | 2 +- .../search/model_search_user_ids_response.go | 4 +- .../model_secured_api_key_restrictions.go | 10 +- .../algolia/search/model_semantic_search.go | 4 +- .../search/model_snippet_result_option.go | 4 +- .../algolia/search/model_sort_remaining_by.go | 2 +- .../algolia/search/model_tag_filters.go | 2 +- .../algolia/search/model_task_status.go | 2 +- .../algolia/search/model_time_range.go | 4 +- .../algolia/search/model_typo_tolerance.go | 2 +- .../search/model_typo_tolerance_enum.go | 2 +- .../search/model_updated_at_response.go | 2 +- ...odel_updated_at_with_object_id_response.go | 4 +- .../search/model_updated_rule_response.go | 4 +- .../algolia/search/model_user_hit.go | 2 +- .../algolia/search/model_user_id.go | 2 +- .../algolia/search/model_value.go | 2 +- .../java/com/algolia/api/AbtestingClient.java | 20 +- .../java/com/algolia/api/AnalyticsClient.java | 808 ++-- .../java/com/algolia/api/RecommendClient.java | 56 +- .../java/com/algolia/api/SearchClient.java | 2300 +++++------ .../model/abtesting/ABTestResponse.java | 4 +- .../model/analytics/SearchNoResultEvent.java | 2 +- .../algolia/model/analytics/TopSearch.java | 2 +- .../analytics/TopSearchWithAnalytics.java | 2 +- .../algolia/model/recommend/Anchoring.java | 6 +- .../model/recommend/AroundPrecision.java | 5 +- .../AroundPrecisionFromValueInner.java | 12 +- .../algolia/model/recommend/AroundRadius.java | 7 +- .../model/recommend/AroundRadiusAll.java | 2 +- .../model/recommend/AutomaticFacetFilter.java | 15 +- .../recommend/AutomaticFacetFilters.java | 5 +- .../model/recommend/BaseRecommendRequest.java | 2 +- .../recommend/BaseRecommendationsQuery.java | 2 +- .../BaseRecommendedForYouQueryParameters.java | 6 +- .../model/recommend/BaseSearchParams.java | 175 +- .../BaseSearchParamsWithoutQuery.java | 173 +- .../model/recommend/BaseSearchResponse.java | 12 +- .../algolia/model/recommend/Condition.java | 40 +- .../algolia/model/recommend/Consequence.java | 22 +- .../model/recommend/ConsequenceHide.java | 4 +- .../model/recommend/ConsequenceParams.java | 446 ++- .../model/recommend/ConsequenceQuery.java | 5 +- .../recommend/ConsequenceQueryObject.java | 4 +- .../model/recommend/DeletedAtResponse.java | 4 +- .../com/algolia/model/recommend/Distinct.java | 7 +- .../com/algolia/model/recommend/Edit.java | 2 +- .../recommend/ExactOnSingleWordQuery.java | 16 +- .../algolia/model/recommend/FacetFilters.java | 8 +- .../model/recommend/FacetOrdering.java | 4 +- .../com/algolia/model/recommend/Facets.java | 7 +- .../recommend/HighlightResultOption.java | 6 +- .../model/recommend/IgnorePlurals.java | 11 +- .../IndexSettingsAsSearchParams.java | 273 +- .../algolia/model/recommend/MatchLevel.java | 2 +- .../com/algolia/model/recommend/Mode.java | 5 +- .../model/recommend/NumericFilters.java | 7 +- .../model/recommend/OptionalFilters.java | 10 +- .../com/algolia/model/recommend/Params.java | 5 +- .../model/recommend/PromoteObjectID.java | 8 +- .../model/recommend/PromoteObjectIDs.java | 12 +- .../algolia/model/recommend/QueryType.java | 7 +- .../algolia/model/recommend/RankingInfo.java | 26 +- .../model/recommend/ReRankingApplyFilter.java | 4 +- .../algolia/model/recommend/RecommendHit.java | 9 +- .../model/recommend/RecommendationsHits.java | 2 +- .../model/recommend/RecommendationsQuery.java | 4 +- .../recommend/RecommendationsResults.java | 14 +- .../recommend/RecommendedForYouQuery.java | 2 +- .../RecommendedForYouQueryParameters.java | 448 ++- .../model/recommend/RemoveStopWords.java | 12 +- .../recommend/RemoveWordsIfNoResults.java | 21 +- .../model/recommend/RenderingContent.java | 6 +- .../model/recommend/SearchParamsObject.java | 448 ++- .../model/recommend/SearchParamsQuery.java | 2 +- .../recommend/SearchRecommendRulesParams.java | 4 +- .../SearchRecommendRulesResponse.java | 6 +- .../model/recommend/SemanticSearch.java | 6 +- .../model/recommend/SnippetResultOption.java | 7 +- .../model/recommend/SortRemainingBy.java | 15 +- .../algolia/model/recommend/TagFilters.java | 7 +- .../algolia/model/recommend/TaskStatus.java | 2 +- .../model/recommend/TrendingFacetsQuery.java | 2 +- .../model/recommend/TrendingItemsQuery.java | 2 +- .../model/recommend/TypoTolerance.java | 7 +- .../model/recommend/TypoToleranceEnum.java | 7 +- .../com/algolia/model/recommend/Value.java | 5 +- .../java/com/algolia/model/search/Acl.java | 12 +- .../java/com/algolia/model/search/Action.java | 2 +- .../model/search/AddApiKeyResponse.java | 2 +- .../com/algolia/model/search/Anchoring.java | 6 +- .../java/com/algolia/model/search/ApiKey.java | 58 +- .../algolia/model/search/AroundPrecision.java | 5 +- .../search/AroundPrecisionFromValueInner.java | 12 +- .../algolia/model/search/AroundRadius.java | 7 +- .../algolia/model/search/AroundRadiusAll.java | 2 +- .../model/search/AutomaticFacetFilter.java | 15 +- .../model/search/AutomaticFacetFilters.java | 5 +- .../model/search/BaseIndexSettings.java | 168 +- .../model/search/BaseSearchParams.java | 175 +- .../search/BaseSearchParamsWithoutQuery.java | 173 +- .../model/search/BaseSearchResponse.java | 12 +- .../search/BatchDictionaryEntriesParams.java | 7 +- .../algolia/model/search/BatchResponse.java | 6 +- .../model/search/BrowseParamsObject.java | 454 ++- .../algolia/model/search/BrowseResponse.java | 25 +- .../model/search/BuiltInOperation.java | 8 +- .../model/search/BuiltInOperationType.java | 2 +- .../com/algolia/model/search/Condition.java | 40 +- .../com/algolia/model/search/Consequence.java | 22 +- .../algolia/model/search/ConsequenceHide.java | 4 +- .../model/search/ConsequenceParams.java | 446 ++- .../model/search/ConsequenceQuery.java | 5 +- .../model/search/ConsequenceQueryObject.java | 4 +- .../model/search/CreatedAtResponse.java | 2 +- .../java/com/algolia/model/search/Cursor.java | 6 +- .../algolia/model/search/DeleteByParams.java | 40 +- .../model/search/DeletedAtResponse.java | 4 +- .../algolia/model/search/DictionaryEntry.java | 26 +- .../model/search/DictionaryEntryState.java | 2 +- .../model/search/DictionaryLanguage.java | 7 +- .../search/DictionarySettingsParams.java | 2 +- .../com/algolia/model/search/Distinct.java | 7 +- .../java/com/algolia/model/search/Edit.java | 2 +- .../model/search/ExactOnSingleWordQuery.java | 16 +- .../algolia/model/search/FacetFilters.java | 8 +- .../com/algolia/model/search/FacetHits.java | 7 +- .../algolia/model/search/FacetOrdering.java | 4 +- .../java/com/algolia/model/search/Facets.java | 7 +- .../model/search/GetApiKeyResponse.java | 58 +- .../model/search/GetObjectsRequest.java | 6 +- .../model/search/GetObjectsResponse.java | 2 +- .../search/HasPendingMappingsResponse.java | 2 +- .../model/search/HighlightResultOption.java | 6 +- .../java/com/algolia/model/search/Hit.java | 14 +- .../algolia/model/search/IgnorePlurals.java | 11 +- .../algolia/model/search/IndexSettings.java | 443 +- .../search/IndexSettingsAsSearchParams.java | 273 +- .../java/com/algolia/model/search/Log.java | 31 +- .../com/algolia/model/search/LogQuery.java | 2 +- .../com/algolia/model/search/MatchLevel.java | 2 +- .../java/com/algolia/model/search/Mode.java | 5 +- .../model/search/MultipleBatchResponse.java | 4 +- .../algolia/model/search/NumericFilters.java | 7 +- .../model/search/OperationIndexParams.java | 8 +- .../algolia/model/search/OperationType.java | 2 +- .../algolia/model/search/OptionalFilters.java | 10 +- .../java/com/algolia/model/search/Params.java | 5 +- .../algolia/model/search/PromoteObjectID.java | 8 +- .../model/search/PromoteObjectIDs.java | 12 +- .../com/algolia/model/search/QueryType.java | 7 +- .../com/algolia/model/search/RankingInfo.java | 26 +- .../model/search/ReRankingApplyFilter.java | 4 +- .../algolia/model/search/RemoveStopWords.java | 12 +- .../model/search/RemoveWordsIfNoResults.java | 21 +- .../model/search/RenderingContent.java | 6 +- .../java/com/algolia/model/search/Rule.java | 18 +- .../model/search/SaveObjectResponse.java | 8 +- .../model/search/SaveSynonymResponse.java | 4 +- .../search/SearchDictionaryEntriesParams.java | 10 +- .../SearchDictionaryEntriesResponse.java | 119 + .../search/SearchForFacetValuesRequest.java | 2 +- .../search/SearchForFacetValuesResponse.java | 2 +- .../algolia/model/search/SearchForFacets.java | 450 ++- .../model/search/SearchForFacetsOptions.java | 4 +- .../algolia/model/search/SearchForHits.java | 450 ++- .../model/search/SearchForHitsOptions.java | 2 +- .../com/algolia/model/search/SearchHits.java | 7 +- .../model/search/SearchParamsObject.java | 448 ++- .../model/search/SearchParamsQuery.java | 2 +- .../algolia/model/search/SearchResponse.java | 19 +- .../model/search/SearchRulesParams.java | 42 +- .../model/search/SearchRulesResponse.java | 4 +- .../algolia/model/search/SearchStrategy.java | 5 +- .../model/search/SearchSynonymsParams.java | 4 +- .../model/search/SearchSynonymsResponse.java | 4 +- .../model/search/SearchUserIdsParams.java | 2 +- .../model/search/SearchUserIdsResponse.java | 4 +- .../search/SecuredAPIKeyRestrictions.java | 38 +- .../algolia/model/search/SemanticSearch.java | 6 +- .../model/search/SnippetResultOption.java | 7 +- .../algolia/model/search/SortRemainingBy.java | 15 +- .../com/algolia/model/search/TagFilters.java | 7 +- .../com/algolia/model/search/TaskStatus.java | 2 +- .../com/algolia/model/search/TimeRange.java | 4 +- .../algolia/model/search/TypoTolerance.java | 7 +- .../model/search/TypoToleranceEnum.java | 7 +- .../model/search/UpdatedAtResponse.java | 4 +- .../search/UpdatedAtWithObjectIdResponse.java | 6 +- .../model/search/UpdatedRuleResponse.java | 6 +- .../com/algolia/model/search/UserHit.java | 2 +- .../java/com/algolia/model/search/UserId.java | 2 +- .../java/com/algolia/model/search/Value.java | 5 +- .../packages/algoliasearch/lite/model/acl.ts | 2 +- .../algoliasearch/lite/model/action.ts | 2 +- .../lite/model/addApiKeyResponse.ts | 2 +- .../algoliasearch/lite/model/anchoring.ts | 2 +- .../algoliasearch/lite/model/apiKey.ts | 16 +- .../lite/model/aroundPrecision.ts | 2 +- .../model/aroundPrecisionFromValueInner.ts | 9 + .../algoliasearch/lite/model/aroundRadius.ts | 2 +- .../lite/model/aroundRadiusAll.ts | 3 + .../lite/model/automaticFacetFilter.ts | 8 +- .../lite/model/automaticFacetFilters.ts | 2 +- .../lite/model/baseIndexSettings.ts | 37 +- .../model/baseSearchParamsWithoutQuery.ts | 53 +- .../lite/model/baseSearchResponse.ts | 12 +- .../lite/model/builtInOperation.ts | 4 +- .../lite/model/builtInOperationType.ts | 2 +- .../algoliasearch/lite/model/condition.ts | 11 +- .../algoliasearch/lite/model/consequence.ts | 10 +- .../lite/model/consequenceHide.ts | 4 +- .../lite/model/consequenceQuery.ts | 2 +- .../lite/model/consequenceQueryObject.ts | 4 +- .../algoliasearch/lite/model/cursor.ts | 2 +- .../lite/model/deleteByParams.ts | 8 +- .../lite/model/dictionaryEntry.ts | 10 +- .../lite/model/dictionaryEntryState.ts | 2 +- .../lite/model/dictionaryLanguage.ts | 4 +- .../algoliasearch/lite/model/distinct.ts | 2 +- .../packages/algoliasearch/lite/model/edit.ts | 2 +- .../lite/model/exactOnSingleWordQuery.ts | 2 +- .../algoliasearch/lite/model/facetFilters.ts | 2 +- .../algoliasearch/lite/model/facetHits.ts | 4 +- .../algoliasearch/lite/model/facetOrdering.ts | 4 +- .../algoliasearch/lite/model/facets.ts | 4 +- .../lite/model/highlightResultOption.ts | 6 +- .../packages/algoliasearch/lite/model/hit.ts | 8 +- .../algoliasearch/lite/model/ignorePlurals.ts | 2 +- .../algoliasearch/lite/model/index.ts | 1 + .../algoliasearch/lite/model/indexSettings.ts | 2 +- .../lite/model/indexSettingsAsSearchParams.ts | 65 +- .../algoliasearch/lite/model/matchLevel.ts | 2 +- .../packages/algoliasearch/lite/model/mode.ts | 2 +- .../lite/model/numericFilters.ts | 2 +- .../algoliasearch/lite/model/operationType.ts | 2 +- .../lite/model/optionalFilters.ts | 2 +- .../algoliasearch/lite/model/params.ts | 2 +- .../lite/model/promoteObjectID.ts | 4 +- .../lite/model/promoteObjectIDs.ts | 4 +- .../algoliasearch/lite/model/queryType.ts | 2 +- .../algoliasearch/lite/model/rankingInfo.ts | 17 +- .../lite/model/reRankingApplyFilter.ts | 2 +- .../lite/model/removeStopWords.ts | 2 +- .../lite/model/removeWordsIfNoResults.ts | 2 +- .../lite/model/renderingContent.ts | 2 +- .../packages/algoliasearch/lite/model/rule.ts | 10 +- .../model/searchDictionaryEntriesResponse.ts | 25 + .../model/searchForFacetValuesResponse.ts | 3 + .../lite/model/searchForFacetsOptions.ts | 4 +- .../lite/model/searchForHitsOptions.ts | 2 +- .../algoliasearch/lite/model/searchHits.ts | 5 +- .../lite/model/searchParamsQuery.ts | 2 +- .../lite/model/searchStrategy.ts | 2 +- .../lite/model/searchSynonymsResponse.ts | 4 +- .../lite/model/securedAPIKeyRestrictions.ts | 10 +- .../lite/model/semanticSearch.ts | 4 +- .../lite/model/snippetResultOption.ts | 4 +- .../lite/model/sortRemainingBy.ts | 2 +- .../algoliasearch/lite/model/tagFilters.ts | 2 +- .../algoliasearch/lite/model/taskStatus.ts | 2 +- .../algoliasearch/lite/model/timeRange.ts | 4 +- .../algoliasearch/lite/model/typoTolerance.ts | 2 +- .../lite/model/typoToleranceEnum.ts | 3 + .../lite/model/updatedRuleResponse.ts | 4 +- .../algoliasearch/lite/model/userId.ts | 2 +- .../algoliasearch/lite/model/value.ts | 2 +- .../algoliasearch/lite/src/liteClient.ts | 4 +- .../client-abtesting/model/aBTestResponse.ts | 2 +- .../model/clientMethodProps.ts | 4 +- .../client-abtesting/src/abtestingClient.ts | 4 +- .../model/clientMethodProps.ts | 130 +- .../model/searchNoResultEvent.ts | 2 +- .../client-analytics/model/topSearch.ts | 2 +- .../model/topSearchWithAnalytics.ts | 2 +- .../client-analytics/src/analyticsClient.ts | 130 +- .../packages/client-search/model/acl.ts | 2 +- .../packages/client-search/model/action.ts | 2 +- .../client-search/model/addApiKeyResponse.ts | 2 +- .../packages/client-search/model/anchoring.ts | 2 +- .../packages/client-search/model/apiKey.ts | 16 +- .../client-search/model/aroundPrecision.ts | 2 +- .../model/aroundPrecisionFromValueInner.ts | 9 + .../client-search/model/aroundRadius.ts | 2 +- .../client-search/model/aroundRadiusAll.ts | 3 + .../model/automaticFacetFilter.ts | 8 +- .../model/automaticFacetFilters.ts | 2 +- .../client-search/model/baseIndexSettings.ts | 37 +- .../model/baseSearchParamsWithoutQuery.ts | 53 +- .../client-search/model/baseSearchResponse.ts | 12 +- .../model/batchDictionaryEntriesParams.ts | 6 +- .../client-search/model/batchResponse.ts | 4 +- .../client-search/model/builtInOperation.ts | 4 +- .../model/builtInOperationType.ts | 2 +- .../client-search/model/clientMethodProps.ts | 126 +- .../packages/client-search/model/condition.ts | 11 +- .../client-search/model/consequence.ts | 10 +- .../client-search/model/consequenceHide.ts | 4 +- .../client-search/model/consequenceQuery.ts | 2 +- .../model/consequenceQueryObject.ts | 4 +- .../client-search/model/createdAtResponse.ts | 2 +- .../packages/client-search/model/cursor.ts | 2 +- .../client-search/model/deleteByParams.ts | 8 +- .../client-search/model/deletedAtResponse.ts | 2 +- .../client-search/model/dictionaryEntry.ts | 10 +- .../model/dictionaryEntryState.ts | 2 +- .../client-search/model/dictionaryLanguage.ts | 4 +- .../model/dictionarySettingsParams.ts | 2 +- .../packages/client-search/model/distinct.ts | 2 +- .../packages/client-search/model/edit.ts | 2 +- .../model/exactOnSingleWordQuery.ts | 2 +- .../client-search/model/facetFilters.ts | 2 +- .../packages/client-search/model/facetHits.ts | 4 +- .../client-search/model/facetOrdering.ts | 4 +- .../packages/client-search/model/facets.ts | 4 +- .../client-search/model/getObjectsRequest.ts | 6 +- .../client-search/model/getObjectsResponse.ts | 2 +- .../model/hasPendingMappingsResponse.ts | 2 +- .../model/highlightResultOption.ts | 6 +- .../packages/client-search/model/hit.ts | 8 +- .../client-search/model/ignorePlurals.ts | 2 +- .../packages/client-search/model/index.ts | 1 + .../client-search/model/indexSettings.ts | 2 +- .../model/indexSettingsAsSearchParams.ts | 65 +- .../packages/client-search/model/log.ts | 22 +- .../packages/client-search/model/logQuery.ts | 2 +- .../client-search/model/matchLevel.ts | 2 +- .../packages/client-search/model/mode.ts | 2 +- .../model/multipleBatchResponse.ts | 4 +- .../client-search/model/numericFilters.ts | 2 +- .../model/operationIndexParams.ts | 4 +- .../client-search/model/operationType.ts | 2 +- .../client-search/model/optionalFilters.ts | 2 +- .../packages/client-search/model/params.ts | 2 +- .../client-search/model/promoteObjectID.ts | 4 +- .../client-search/model/promoteObjectIDs.ts | 4 +- .../packages/client-search/model/queryType.ts | 2 +- .../client-search/model/rankingInfo.ts | 17 +- .../model/reRankingApplyFilter.ts | 2 +- .../client-search/model/removeStopWords.ts | 2 +- .../model/removeWordsIfNoResults.ts | 2 +- .../client-search/model/renderingContent.ts | 2 +- .../packages/client-search/model/rule.ts | 10 +- .../client-search/model/saveObjectResponse.ts | 6 +- .../model/saveSynonymResponse.ts | 2 +- .../model/searchDictionaryEntriesParams.ts | 8 +- .../model/searchDictionaryEntriesResponse.ts | 25 + .../model/searchForFacetValuesRequest.ts | 2 +- .../model/searchForFacetValuesResponse.ts | 3 + .../model/searchForFacetsOptions.ts | 4 +- .../model/searchForHitsOptions.ts | 2 +- .../client-search/model/searchHits.ts | 5 +- .../client-search/model/searchParamsQuery.ts | 2 +- .../client-search/model/searchRulesParams.ts | 13 +- .../model/searchRulesResponse.ts | 4 +- .../client-search/model/searchStrategy.ts | 2 +- .../model/searchSynonymsParams.ts | 4 +- .../model/searchSynonymsResponse.ts | 4 +- .../model/searchUserIdsParams.ts | 2 +- .../model/searchUserIdsResponse.ts | 4 +- .../model/securedAPIKeyRestrictions.ts | 10 +- .../client-search/model/semanticSearch.ts | 4 +- .../model/snippetResultOption.ts | 4 +- .../client-search/model/sortRemainingBy.ts | 2 +- .../client-search/model/tagFilters.ts | 2 +- .../client-search/model/taskStatus.ts | 2 +- .../packages/client-search/model/timeRange.ts | 4 +- .../client-search/model/typoTolerance.ts | 2 +- .../client-search/model/typoToleranceEnum.ts | 3 + .../client-search/model/updatedAtResponse.ts | 2 +- .../model/updatedAtWithObjectIdResponse.ts | 4 +- .../model/updatedRuleResponse.ts | 4 +- .../packages/client-search/model/userHit.ts | 2 +- .../packages/client-search/model/userId.ts | 2 +- .../packages/client-search/model/value.ts | 2 +- .../client-search/src/searchClient.ts | 243 +- .../packages/recommend/model/anchoring.ts | 2 +- .../recommend/model/aroundPrecision.ts | 2 +- .../model/aroundPrecisionFromValueInner.ts | 9 + .../packages/recommend/model/aroundRadius.ts | 2 +- .../recommend/model/aroundRadiusAll.ts | 3 + .../recommend/model/automaticFacetFilter.ts | 8 +- .../recommend/model/automaticFacetFilters.ts | 2 +- .../recommend/model/baseRecommendRequest.ts | 2 +- .../model/baseRecommendationsQuery.ts | 2 +- .../baseRecommendedForYouQueryParameters.ts | 2 +- .../model/baseSearchParamsWithoutQuery.ts | 53 +- .../recommend/model/baseSearchResponse.ts | 12 +- .../recommend/model/clientMethodProps.ts | 12 +- .../packages/recommend/model/condition.ts | 11 +- .../packages/recommend/model/consequence.ts | 10 +- .../recommend/model/consequenceHide.ts | 4 +- .../recommend/model/consequenceQuery.ts | 2 +- .../recommend/model/consequenceQueryObject.ts | 4 +- .../recommend/model/deletedAtResponse.ts | 2 +- .../packages/recommend/model/distinct.ts | 2 +- .../packages/recommend/model/edit.ts | 2 +- .../recommend/model/exactOnSingleWordQuery.ts | 2 +- .../packages/recommend/model/facetFilters.ts | 2 +- .../packages/recommend/model/facetOrdering.ts | 4 +- .../packages/recommend/model/facets.ts | 4 +- .../recommend/model/highlightResultOption.ts | 6 +- .../packages/recommend/model/ignorePlurals.ts | 2 +- .../model/indexSettingsAsSearchParams.ts | 65 +- .../packages/recommend/model/matchLevel.ts | 2 +- .../packages/recommend/model/mode.ts | 2 +- .../recommend/model/numericFilters.ts | 2 +- .../recommend/model/optionalFilters.ts | 2 +- .../packages/recommend/model/params.ts | 2 +- .../recommend/model/promoteObjectID.ts | 4 +- .../recommend/model/promoteObjectIDs.ts | 4 +- .../packages/recommend/model/queryType.ts | 2 +- .../packages/recommend/model/rankingInfo.ts | 17 +- .../recommend/model/reRankingApplyFilter.ts | 2 +- .../packages/recommend/model/recommendHit.ts | 6 +- .../recommend/model/recommendationsHits.ts | 2 +- .../recommend/model/removeStopWords.ts | 2 +- .../recommend/model/removeWordsIfNoResults.ts | 2 +- .../recommend/model/renderingContent.ts | 2 +- .../recommend/model/searchParamsQuery.ts | 2 +- .../model/searchRecommendRulesParams.ts | 4 +- .../model/searchRecommendRulesResponse.ts | 6 +- .../recommend/model/semanticSearch.ts | 4 +- .../recommend/model/snippetResultOption.ts | 4 +- .../recommend/model/sortRemainingBy.ts | 2 +- .../packages/recommend/model/tagFilters.ts | 2 +- .../packages/recommend/model/taskStatus.ts | 2 +- .../packages/recommend/model/typoTolerance.ts | 2 +- .../recommend/model/typoToleranceEnum.ts | 3 + .../packages/recommend/model/value.ts | 2 +- .../packages/recommend/src/recommendClient.ts | 12 +- .../com/algolia/client/api/AbtestingClient.kt | 4 +- .../com/algolia/client/api/AnalyticsClient.kt | 130 +- .../com/algolia/client/api/RecommendClient.kt | 12 +- .../com/algolia/client/api/SearchClient.kt | 242 +- .../client/model/abtesting/ABTestResponse.kt | 4 +- .../model/analytics/SearchNoResultEvent.kt | 4 +- .../client/model/analytics/TopSearch.kt | 4 +- .../model/analytics/TopSearchWithAnalytics.kt | 4 +- .../client/model/recommend/Anchoring.kt | 2 +- .../client/model/recommend/AroundPrecision.kt | 2 +- .../AroundPrecisionFromValueInner.kt | 8 +- .../client/model/recommend/AroundRadius.kt | 2 +- .../client/model/recommend/AroundRadiusAll.kt | 3 + .../model/recommend/AutomaticFacetFilter.kt | 14 +- .../model/recommend/AutomaticFacetFilters.kt | 2 +- .../model/recommend/BaseRecommendRequest.kt | 4 +- .../recommend/BaseRecommendationsQuery.kt | 4 +- .../BaseRecommendedForYouQueryParameters.kt | 4 +- .../model/recommend/BaseSearchParams.kt | 104 +- .../recommend/BaseSearchParamsWithoutQuery.kt | 100 +- .../model/recommend/BaseSearchResponse.kt | 24 +- .../client/model/recommend/Condition.kt | 16 +- .../client/model/recommend/Consequence.kt | 18 +- .../client/model/recommend/ConsequenceHide.kt | 6 +- .../model/recommend/ConsequenceParams.kt | 224 +- .../model/recommend/ConsequenceQuery.kt | 2 +- .../model/recommend/ConsequenceQueryObject.kt | 8 +- .../model/recommend/DeletedAtResponse.kt | 4 +- .../client/model/recommend/Distinct.kt | 2 +- .../algolia/client/model/recommend/Edit.kt | 4 +- .../model/recommend/ExactOnSingleWordQuery.kt | 2 +- .../client/model/recommend/FacetFilters.kt | 2 +- .../client/model/recommend/FacetOrdering.kt | 6 +- .../algolia/client/model/recommend/Facets.kt | 6 +- .../model/recommend/HighlightResultOption.kt | 10 +- .../client/model/recommend/IgnorePlurals.kt | 2 +- .../recommend/IndexSettingsAsSearchParams.kt | 124 +- .../client/model/recommend/MatchLevel.kt | 2 +- .../algolia/client/model/recommend/Mode.kt | 2 +- .../client/model/recommend/NumericFilters.kt | 2 +- .../client/model/recommend/OptionalFilters.kt | 2 +- .../algolia/client/model/recommend/Params.kt | 2 +- .../client/model/recommend/PromoteObjectID.kt | 8 +- .../model/recommend/PromoteObjectIDs.kt | 8 +- .../client/model/recommend/QueryType.kt | 2 +- .../client/model/recommend/RankingInfo.kt | 30 +- .../model/recommend/ReRankingApplyFilter.kt | 2 +- .../client/model/recommend/RecommendHit.kt | 12 +- .../model/recommend/RecommendationsHits.kt | 4 +- .../model/recommend/RecommendationsQuery.kt | 8 +- .../model/recommend/RecommendationsResults.kt | 28 +- .../model/recommend/RecommendedForYouQuery.kt | 4 +- .../RecommendedForYouQueryParameters.kt | 228 +- .../client/model/recommend/RemoveStopWords.kt | 2 +- .../model/recommend/RemoveWordsIfNoResults.kt | 2 +- .../model/recommend/RenderingContent.kt | 2 +- .../model/recommend/SearchParamsObject.kt | 228 +- .../model/recommend/SearchParamsQuery.kt | 4 +- .../recommend/SearchRecommendRulesParams.kt | 8 +- .../recommend/SearchRecommendRulesResponse.kt | 12 +- .../client/model/recommend/SemanticSearch.kt | 6 +- .../model/recommend/SnippetResultOption.kt | 6 +- .../client/model/recommend/SortRemainingBy.kt | 2 +- .../client/model/recommend/TagFilters.kt | 2 +- .../client/model/recommend/TaskStatus.kt | 2 +- .../model/recommend/TrendingFacetsQuery.kt | 4 +- .../model/recommend/TrendingItemsQuery.kt | 4 +- .../client/model/recommend/TypoTolerance.kt | 2 +- .../model/recommend/TypoToleranceEnum.kt | 3 + .../algolia/client/model/recommend/Value.kt | 4 +- .../com/algolia/client/model/search/Acl.kt | 2 +- .../com/algolia/client/model/search/Action.kt | 2 +- .../client/model/search/AddApiKeyResponse.kt | 4 +- .../algolia/client/model/search/Anchoring.kt | 2 +- .../com/algolia/client/model/search/ApiKey.kt | 32 +- .../client/model/search/AroundPrecision.kt | 2 +- .../search/AroundPrecisionFromValueInner.kt | 8 +- .../client/model/search/AroundRadius.kt | 2 +- .../client/model/search/AroundRadiusAll.kt | 3 + .../model/search/AutomaticFacetFilter.kt | 14 +- .../model/search/AutomaticFacetFilters.kt | 2 +- .../client/model/search/BaseIndexSettings.kt | 68 +- .../client/model/search/BaseSearchParams.kt | 104 +- .../search/BaseSearchParamsWithoutQuery.kt | 100 +- .../client/model/search/BaseSearchResponse.kt | 24 +- .../search/BatchDictionaryEntriesParams.kt | 10 +- .../client/model/search/BatchResponse.kt | 8 +- .../client/model/search/BrowseParamsObject.kt | 232 +- .../client/model/search/BrowseResponse.kt | 35 +- .../client/model/search/BuiltInOperation.kt | 6 +- .../model/search/BuiltInOperationType.kt | 2 +- .../algolia/client/model/search/Condition.kt | 16 +- .../client/model/search/Consequence.kt | 18 +- .../client/model/search/ConsequenceHide.kt | 6 +- .../client/model/search/ConsequenceParams.kt | 224 +- .../client/model/search/ConsequenceQuery.kt | 2 +- .../model/search/ConsequenceQueryObject.kt | 8 +- .../client/model/search/CreatedAtResponse.kt | 4 +- .../com/algolia/client/model/search/Cursor.kt | 4 +- .../client/model/search/DeleteByParams.kt | 16 +- .../client/model/search/DeletedAtResponse.kt | 4 +- .../client/model/search/DictionaryEntry.kt | 20 +- .../model/search/DictionaryEntryState.kt | 2 +- .../client/model/search/DictionaryLanguage.kt | 6 +- .../model/search/DictionarySettingsParams.kt | 2 +- .../algolia/client/model/search/Distinct.kt | 2 +- .../com/algolia/client/model/search/Edit.kt | 4 +- .../model/search/ExactOnSingleWordQuery.kt | 2 +- .../client/model/search/FacetFilters.kt | 2 +- .../algolia/client/model/search/FacetHits.kt | 8 +- .../client/model/search/FacetOrdering.kt | 6 +- .../com/algolia/client/model/search/Facets.kt | 6 +- .../client/model/search/GetApiKeyResponse.kt | 32 +- .../client/model/search/GetObjectsRequest.kt | 12 +- .../client/model/search/GetObjectsResponse.kt | 4 +- .../search/HasPendingMappingsResponse.kt | 4 +- .../model/search/HighlightResultOption.kt | 10 +- .../com/algolia/client/model/search/Hit.kt | 14 +- .../client/model/search/IgnorePlurals.kt | 2 +- .../client/model/search/IndexSettings.kt | 194 +- .../search/IndexSettingsAsSearchParams.kt | 124 +- .../com/algolia/client/model/search/Log.kt | 46 +- .../algolia/client/model/search/LogQuery.kt | 4 +- .../algolia/client/model/search/MatchLevel.kt | 2 +- .../com/algolia/client/model/search/Mode.kt | 2 +- .../model/search/MultipleBatchResponse.kt | 8 +- .../client/model/search/NumericFilters.kt | 2 +- .../model/search/OperationIndexParams.kt | 8 +- .../client/model/search/OperationType.kt | 2 +- .../client/model/search/OptionalFilters.kt | 2 +- .../com/algolia/client/model/search/Params.kt | 2 +- .../client/model/search/PromoteObjectID.kt | 8 +- .../client/model/search/PromoteObjectIDs.kt | 8 +- .../algolia/client/model/search/QueryType.kt | 2 +- .../client/model/search/RankingInfo.kt | 30 +- .../model/search/ReRankingApplyFilter.kt | 2 +- .../client/model/search/RemoveStopWords.kt | 2 +- .../model/search/RemoveWordsIfNoResults.kt | 2 +- .../client/model/search/RenderingContent.kt | 2 +- .../com/algolia/client/model/search/Rule.kt | 20 +- .../client/model/search/SaveObjectResponse.kt | 12 +- .../model/search/SaveSynonymResponse.kt | 4 +- .../search/SearchDictionaryEntriesParams.kt | 14 +- .../search/SearchDictionaryEntriesResponse.kt | 29 + .../search/SearchForFacetValuesRequest.kt | 4 +- .../search/SearchForFacetValuesResponse.kt | 3 +- .../client/model/search/SearchForFacets.kt | 232 +- .../model/search/SearchForFacetsOptions.kt | 8 +- .../client/model/search/SearchForHits.kt | 232 +- .../model/search/SearchForHitsOptions.kt | 4 +- .../algolia/client/model/search/SearchHits.kt | 7 +- .../client/model/search/SearchParamsObject.kt | 228 +- .../client/model/search/SearchParamsQuery.kt | 4 +- .../client/model/search/SearchResponse.kt | 31 +- .../client/model/search/SearchRulesParams.kt | 20 +- .../model/search/SearchRulesResponse.kt | 8 +- .../client/model/search/SearchStrategy.kt | 2 +- .../model/search/SearchSynonymsParams.kt | 8 +- .../model/search/SearchSynonymsResponse.kt | 8 +- .../model/search/SearchUserIdsParams.kt | 4 +- .../model/search/SearchUserIdsResponse.kt | 8 +- .../model/search/SecuredAPIKeyRestrictions.kt | 20 +- .../client/model/search/SemanticSearch.kt | 6 +- .../model/search/SnippetResultOption.kt | 6 +- .../client/model/search/SortRemainingBy.kt | 2 +- .../algolia/client/model/search/TagFilters.kt | 2 +- .../algolia/client/model/search/TaskStatus.kt | 2 +- .../algolia/client/model/search/TimeRange.kt | 8 +- .../client/model/search/TypoTolerance.kt | 2 +- .../client/model/search/TypoToleranceEnum.kt | 3 + .../client/model/search/UpdatedAtResponse.kt | 4 +- .../search/UpdatedAtWithObjectIdResponse.kt | 8 +- .../model/search/UpdatedRuleResponse.kt | 8 +- .../algolia/client/model/search/UserHit.kt | 4 +- .../com/algolia/client/model/search/UserId.kt | 4 +- .../com/algolia/client/model/search/Value.kt | 4 +- .../lib/Api/AbtestingClient.php | 8 +- .../lib/Api/AnalyticsClient.php | 250 +- .../lib/Api/RecommendClient.php | 16 +- .../lib/Api/SearchClient.php | 323 +- .../lib/Model/Abtesting/ABTestResponse.php | 2 +- .../Model/Analytics/SearchNoResultEvent.php | 2 +- .../lib/Model/Analytics/TopSearch.php | 2 +- .../Analytics/TopSearchWithAnalytics.php | 2 +- .../lib/Model/Recommend/Anchoring.php | 2 +- .../lib/Model/Recommend/AroundPrecision.php | 2 +- .../AroundPrecisionFromValueInner.php | 5 +- .../lib/Model/Recommend/AroundRadius.php | 2 +- .../lib/Model/Recommend/AroundRadiusAll.php | 1 + .../Model/Recommend/AutomaticFacetFilter.php | 8 +- .../Model/Recommend/AutomaticFacetFilters.php | 2 +- .../Model/Recommend/BaseRecommendRequest.php | 2 +- .../Recommend/BaseRecommendationsQuery.php | 2 +- .../BaseRecommendedForYouQueryParameters.php | 2 +- .../lib/Model/Recommend/BaseSearchParams.php | 105 +- .../BaseSearchParamsWithoutQuery.php | 103 +- .../Model/Recommend/BaseSearchResponse.php | 20 +- .../lib/Model/Recommend/Condition.php | 50 +- .../lib/Model/Recommend/Consequence.php | 28 +- .../lib/Model/Recommend/ConsequenceHide.php | 4 +- .../lib/Model/Recommend/ConsequenceParams.php | 203 +- .../lib/Model/Recommend/ConsequenceQuery.php | 6 +- .../Recommend/ConsequenceQueryObject.php | 4 +- .../lib/Model/Recommend/DeletedAtResponse.php | 2 +- .../lib/Model/Recommend/Distinct.php | 2 +- .../lib/Model/Recommend/Edit.php | 2 +- .../Recommend/ExactOnSingleWordQuery.php | 2 +- .../lib/Model/Recommend/FacetFilters.php | 2 +- .../lib/Model/Recommend/FacetOrdering.php | 4 +- .../lib/Model/Recommend/Facets.php | 4 +- .../lib/Model/Recommend/HighlightResult.php | 4 +- .../Model/Recommend/HighlightResultOption.php | 6 +- .../lib/Model/Recommend/IgnorePlurals.php | 2 +- .../Recommend/IndexSettingsAsSearchParams.php | 100 +- .../lib/Model/Recommend/MatchLevel.php | 2 +- .../lib/Model/Recommend/Mode.php | 2 +- .../lib/Model/Recommend/NumericFilters.php | 2 +- .../lib/Model/Recommend/OptionalFilters.php | 2 +- .../lib/Model/Recommend/Params.php | 2 +- .../lib/Model/Recommend/Promote.php | 13 +- .../lib/Model/Recommend/PromoteObjectID.php | 4 +- .../lib/Model/Recommend/PromoteObjectIDs.php | 11 +- .../lib/Model/Recommend/QueryType.php | 2 +- .../lib/Model/Recommend/RankingInfo.php | 78 +- .../Model/Recommend/ReRankingApplyFilter.php | 2 +- .../lib/Model/Recommend/RecommendHit.php | 6 +- .../Model/Recommend/RecommendationsHit.php | 6 +- .../Model/Recommend/RecommendationsHits.php | 2 +- .../Model/Recommend/RecommendationsQuery.php | 4 +- .../Recommend/RecommendationsRequest.php | 4 +- .../Recommend/RecommendationsResults.php | 22 +- .../Recommend/RecommendedForYouQuery.php | 2 +- .../RecommendedForYouQueryParameters.php | 205 +- .../lib/Model/Recommend/RemoveStopWords.php | 2 +- .../Recommend/RemoveWordsIfNoResults.php | 2 +- .../lib/Model/Recommend/RenderingContent.php | 2 +- .../Model/Recommend/SearchParamsObject.php | 205 +- .../lib/Model/Recommend/SearchParamsQuery.php | 2 +- .../Recommend/SearchRecommendRulesParams.php | 4 +- .../SearchRecommendRulesResponse.php | 14 +- .../lib/Model/Recommend/SemanticSearch.php | 4 +- .../lib/Model/Recommend/SnippetResult.php | 2 +- .../Model/Recommend/SnippetResultOption.php | 4 +- .../lib/Model/Recommend/SortRemainingBy.php | 2 +- .../lib/Model/Recommend/TagFilters.php | 2 +- .../lib/Model/Recommend/TaskStatus.php | 2 +- .../Model/Recommend/TrendingFacetsQuery.php | 2 +- .../Model/Recommend/TrendingItemsQuery.php | 2 +- .../lib/Model/Recommend/TypoTolerance.php | 2 +- .../lib/Model/Recommend/TypoToleranceEnum.php | 1 + .../lib/Model/Recommend/Value.php | 2 +- .../lib/Model/Search/Acl.php | 2 +- .../lib/Model/Search/Action.php | 2 +- .../lib/Model/Search/AddApiKeyResponse.php | 2 +- .../lib/Model/Search/Anchoring.php | 2 +- .../lib/Model/Search/ApiKey.php | 16 +- .../lib/Model/Search/AroundPrecision.php | 2 +- .../Search/AroundPrecisionFromValueInner.php | 5 +- .../lib/Model/Search/AroundRadius.php | 2 +- .../lib/Model/Search/AroundRadiusAll.php | 1 + .../lib/Model/Search/AttributeToUpdate.php | 2 +- .../lib/Model/Search/AutomaticFacetFilter.php | 8 +- .../Model/Search/AutomaticFacetFilters.php | 2 +- .../lib/Model/Search/BaseIndexSettings.php | 76 +- .../lib/Model/Search/BaseSearchParams.php | 105 +- .../Search/BaseSearchParamsWithoutQuery.php | 103 +- .../lib/Model/Search/BaseSearchResponse.php | 20 +- .../Search/BatchDictionaryEntriesParams.php | 6 +- .../lib/Model/Search/BatchResponse.php | 4 +- .../lib/Model/Search/BrowseParams.php | 207 +- .../lib/Model/Search/BrowseParamsObject.php | 207 +- .../lib/Model/Search/BrowseResponse.php | 26 +- .../lib/Model/Search/BuiltInOperation.php | 4 +- .../lib/Model/Search/BuiltInOperationType.php | 2 +- .../lib/Model/Search/Condition.php | 50 +- .../lib/Model/Search/Consequence.php | 28 +- .../lib/Model/Search/ConsequenceHide.php | 4 +- .../lib/Model/Search/ConsequenceParams.php | 203 +- .../lib/Model/Search/ConsequenceQuery.php | 6 +- .../Model/Search/ConsequenceQueryObject.php | 4 +- .../lib/Model/Search/CreatedAtResponse.php | 2 +- .../lib/Model/Search/Cursor.php | 2 +- .../lib/Model/Search/DeleteByParams.php | 8 +- .../lib/Model/Search/DeletedAtResponse.php | 2 +- .../lib/Model/Search/DictionaryEntry.php | 10 +- .../lib/Model/Search/DictionaryEntryState.php | 2 +- .../lib/Model/Search/DictionaryLanguage.php | 4 +- .../Model/Search/DictionarySettingsParams.php | 2 +- .../lib/Model/Search/Distinct.php | 2 +- .../lib/Model/Search/Edit.php | 2 +- .../Model/Search/ExactOnSingleWordQuery.php | 2 +- .../lib/Model/Search/FacetFilters.php | 2 +- .../lib/Model/Search/FacetHits.php | 4 +- .../lib/Model/Search/FacetOrdering.php | 4 +- .../lib/Model/Search/Facets.php | 4 +- .../lib/Model/Search/GetApiKeyResponse.php | 16 +- .../lib/Model/Search/GetObjectsRequest.php | 6 +- .../lib/Model/Search/GetObjectsResponse.php | 2 +- .../Search/HasPendingMappingsResponse.php | 2 +- .../lib/Model/Search/HighlightResult.php | 4 +- .../Model/Search/HighlightResultOption.php | 6 +- .../lib/Model/Search/Hit.php | 8 +- .../lib/Model/Search/IgnorePlurals.php | 2 +- .../lib/Model/Search/IndexSettings.php | 174 +- .../Search/IndexSettingsAsSearchParams.php | 100 +- .../lib/Model/Search/Log.php | 42 +- .../lib/Model/Search/LogQuery.php | 2 +- .../lib/Model/Search/MatchLevel.php | 2 +- .../lib/Model/Search/Mode.php | 2 +- .../Model/Search/MultipleBatchResponse.php | 4 +- .../lib/Model/Search/NumericFilters.php | 2 +- .../lib/Model/Search/OperationIndexParams.php | 4 +- .../lib/Model/Search/OperationType.php | 2 +- .../lib/Model/Search/OptionalFilters.php | 2 +- .../lib/Model/Search/Params.php | 2 +- .../lib/Model/Search/Promote.php | 13 +- .../lib/Model/Search/PromoteObjectID.php | 4 +- .../lib/Model/Search/PromoteObjectIDs.php | 11 +- .../lib/Model/Search/QueryType.php | 2 +- .../lib/Model/Search/RankingInfo.php | 78 +- .../lib/Model/Search/ReRankingApplyFilter.php | 2 +- .../lib/Model/Search/RemoveStopWords.php | 2 +- .../Model/Search/RemoveWordsIfNoResults.php | 2 +- .../lib/Model/Search/RenderingContent.php | 2 +- .../lib/Model/Search/Rule.php | 23 +- .../lib/Model/Search/SaveObjectResponse.php | 6 +- .../lib/Model/Search/SaveSynonymResponse.php | 2 +- .../Search/SearchDictionaryEntriesParams.php | 16 +- .../SearchDictionaryEntriesResponse.php | 342 ++ .../Search/SearchForFacetValuesRequest.php | 2 +- .../Search/SearchForFacetValuesResponse.php | 2 +- .../lib/Model/Search/SearchForFacets.php | 207 +- .../Model/Search/SearchForFacetsOptions.php | 4 +- .../lib/Model/Search/SearchForHits.php | 207 +- .../lib/Model/Search/SearchForHitsOptions.php | 2 +- .../lib/Model/Search/SearchHits.php | 4 +- .../lib/Model/Search/SearchParams.php | 205 +- .../lib/Model/Search/SearchParamsObject.php | 205 +- .../lib/Model/Search/SearchParamsQuery.php | 2 +- .../lib/Model/Search/SearchQuery.php | 207 +- .../lib/Model/Search/SearchResponse.php | 24 +- .../lib/Model/Search/SearchResult.php | 26 +- .../lib/Model/Search/SearchRulesParams.php | 40 +- .../lib/Model/Search/SearchRulesResponse.php | 4 +- .../lib/Model/Search/SearchStrategy.php | 2 +- .../lib/Model/Search/SearchSynonymsParams.php | 12 +- .../Model/Search/SearchSynonymsResponse.php | 4 +- .../lib/Model/Search/SearchUserIdsParams.php | 10 +- .../Model/Search/SearchUserIdsResponse.php | 12 +- .../Search/SecuredAPIKeyRestrictions.php | 10 +- .../lib/Model/Search/SemanticSearch.php | 4 +- .../lib/Model/Search/SnippetResult.php | 2 +- .../lib/Model/Search/SnippetResultOption.php | 4 +- .../lib/Model/Search/SortRemainingBy.php | 2 +- .../lib/Model/Search/TagFilters.php | 2 +- .../lib/Model/Search/TaskStatus.php | 2 +- .../lib/Model/Search/TimeRange.php | 4 +- .../lib/Model/Search/TypoTolerance.php | 2 +- .../lib/Model/Search/TypoToleranceEnum.php | 1 + .../lib/Model/Search/UpdatedAtResponse.php | 2 +- .../Search/UpdatedAtWithObjectIdResponse.php | 4 +- .../lib/Model/Search/UpdatedRuleResponse.php | 4 +- .../lib/Model/Search/UserHit.php | 2 +- .../lib/Model/Search/UserId.php | 2 +- .../lib/Model/Search/Value.php | 2 +- .../algoliasearch/abtesting/client.py | 26 +- .../abtesting/models/ab_test_response.py | 2 +- .../algoliasearch/analytics/client.py | 856 ++-- .../models/search_no_result_event.py | 4 +- .../analytics/models/top_search.py | 4 +- .../models/top_search_with_analytics.py | 4 +- .../algoliasearch/recommend/client.py | 64 +- .../recommend/models/anchoring.py | 2 +- .../recommend/models/around_precision.py | 10 +- .../around_precision_from_value_inner.py | 13 +- .../recommend/models/around_radius.py | 9 +- .../recommend/models/around_radius_all.py | 2 +- .../models/automatic_facet_filter.py | 8 +- .../models/automatic_facet_filters.py | 2 +- .../models/base_recommend_request.py | 2 +- .../models/base_recommendations_query.py | 2 +- ...se_recommended_for_you_query_parameters.py | 2 +- .../recommend/models/base_search_params.py | 89 +- .../base_search_params_without_query.py | 85 +- .../recommend/models/base_search_response.py | 17 +- .../recommend/models/condition.py | 30 +- .../recommend/models/consequence.py | 18 +- .../recommend/models/consequence_hide.py | 4 +- .../recommend/models/consequence_params.py | 155 +- .../recommend/models/consequence_query.py | 2 +- .../models/consequence_query_object.py | 6 +- .../recommend/models/deleted_at_response.py | 2 +- .../recommend/models/distinct.py | 12 +- .../algoliasearch/recommend/models/edit.py | 2 +- .../models/exact_on_single_word_query.py | 2 +- .../recommend/models/facet_filters.py | 2 +- .../recommend/models/facet_ordering.py | 4 +- .../algoliasearch/recommend/models/facets.py | 5 +- .../recommend/models/highlight_result.py | 4 +- .../models/highlight_result_option.py | 7 +- .../recommend/models/ignore_plurals.py | 16 +- .../models/index_settings_as_search_params.py | 70 +- .../recommend/models/match_level.py | 2 +- .../algoliasearch/recommend/models/mode.py | 2 +- .../recommend/models/numeric_filters.py | 2 +- .../recommend/models/optional_filters.py | 2 +- .../algoliasearch/recommend/models/params.py | 2 +- .../recommend/models/promote_object_id.py | 4 +- .../recommend/models/promote_object_ids.py | 9 +- .../recommend/models/query_type.py | 2 +- .../recommend/models/ranking_info.py | 34 +- .../models/re_ranking_apply_filter.py | 2 +- .../recommend/models/recommend_hit.py | 6 +- .../recommend/models/recommendations_hits.py | 4 +- .../recommend/models/recommendations_query.py | 4 +- .../models/recommendations_results.py | 21 +- .../models/recommended_for_you_query.py | 2 +- .../recommended_for_you_query_parameters.py | 159 +- .../recommend/models/remove_stop_words.py | 16 +- .../models/remove_words_if_no_results.py | 2 +- .../recommend/models/rendering_content.py | 2 +- .../recommend/models/search_params_object.py | 159 +- .../recommend/models/search_params_query.py | 4 +- .../models/search_recommend_rules_params.py | 4 +- .../models/search_recommend_rules_response.py | 12 +- .../recommend/models/semantic_search.py | 4 +- .../recommend/models/snippet_result.py | 4 +- .../recommend/models/snippet_result_option.py | 4 +- .../recommend/models/sort_remaining_by.py | 2 +- .../recommend/models/tag_filters.py | 2 +- .../recommend/models/task_status.py | 2 +- .../recommend/models/trending_facets_query.py | 2 +- .../recommend/models/trending_items_query.py | 2 +- .../recommend/models/typo_tolerance.py | 9 +- .../recommend/models/typo_tolerance_enum.py | 2 +- .../algoliasearch/recommend/models/value.py | 3 +- .../algoliasearch/search/client.py | 883 ++-- .../algoliasearch/search/models/acl.py | 2 +- .../algoliasearch/search/models/action.py | 2 +- .../search/models/add_api_key_response.py | 2 +- .../algoliasearch/search/models/anchoring.py | 2 +- .../algoliasearch/search/models/api_key.py | 16 +- .../search/models/around_precision.py | 10 +- .../around_precision_from_value_inner.py | 13 +- .../search/models/around_radius.py | 9 +- .../search/models/around_radius_all.py | 2 +- .../search/models/attribute_to_update.py | 2 +- .../search/models/automatic_facet_filter.py | 8 +- .../search/models/automatic_facet_filters.py | 2 +- .../search/models/base_index_settings.py | 46 +- .../search/models/base_search_params.py | 89 +- .../base_search_params_without_query.py | 85 +- .../search/models/base_search_response.py | 17 +- .../models/batch_dictionary_entries_params.py | 6 +- .../search/models/batch_response.py | 4 +- .../search/models/browse_params_object.py | 161 +- .../search/models/browse_response.py | 25 +- .../search/models/built_in_operation.py | 4 +- .../search/models/built_in_operation_type.py | 2 +- .../algoliasearch/search/models/condition.py | 30 +- .../search/models/consequence.py | 18 +- .../search/models/consequence_hide.py | 4 +- .../search/models/consequence_params.py | 155 +- .../search/models/consequence_query.py | 2 +- .../search/models/consequence_query_object.py | 6 +- .../search/models/created_at_response.py | 2 +- .../algoliasearch/search/models/cursor.py | 2 +- .../search/models/delete_by_params.py | 34 +- .../search/models/deleted_at_response.py | 2 +- .../search/models/dictionary_entry.py | 10 +- .../search/models/dictionary_entry_state.py | 2 +- .../search/models/dictionary_language.py | 4 +- .../models/dictionary_settings_params.py | 2 +- .../algoliasearch/search/models/distinct.py | 12 +- .../algoliasearch/search/models/edit.py | 2 +- .../models/exact_on_single_word_query.py | 2 +- .../search/models/facet_filters.py | 2 +- .../algoliasearch/search/models/facet_hits.py | 4 +- .../search/models/facet_ordering.py | 4 +- .../algoliasearch/search/models/facets.py | 5 +- .../search/models/get_api_key_response.py | 16 +- .../search/models/get_objects_request.py | 11 +- .../search/models/get_objects_response.py | 2 +- .../models/has_pending_mappings_response.py | 2 +- .../search/models/highlight_result.py | 4 +- .../search/models/highlight_result_option.py | 7 +- .../algoliasearch/search/models/hit.py | 8 +- .../search/models/ignore_plurals.py | 16 +- .../search/models/index_settings.py | 114 +- .../models/index_settings_as_search_params.py | 70 +- .../algoliasearch/search/models/log.py | 29 +- .../algoliasearch/search/models/log_query.py | 2 +- .../search/models/match_level.py | 2 +- .../algoliasearch/search/models/mode.py | 2 +- .../search/models/multiple_batch_response.py | 4 +- .../search/models/numeric_filters.py | 2 +- .../search/models/operation_index_params.py | 4 +- .../search/models/operation_type.py | 2 +- .../search/models/optional_filters.py | 2 +- .../algoliasearch/search/models/params.py | 2 +- .../search/models/promote_object_id.py | 4 +- .../search/models/promote_object_ids.py | 9 +- .../algoliasearch/search/models/query_type.py | 2 +- .../search/models/ranking_info.py | 34 +- .../search/models/re_ranking_apply_filter.py | 2 +- .../search/models/remove_stop_words.py | 16 +- .../models/remove_words_if_no_results.py | 2 +- .../search/models/rendering_content.py | 2 +- .../algoliasearch/search/models/rule.py | 18 +- .../search/models/save_object_response.py | 7 +- .../search/models/save_synonym_response.py | 2 +- .../search_dictionary_entries_params.py | 12 +- .../search_dictionary_entries_response.py | 84 + .../models/search_for_facet_values_request.py | 2 +- .../search_for_facet_values_response.py | 4 +- .../search/models/search_for_facets.py | 161 +- .../models/search_for_facets_options.py | 4 +- .../search/models/search_for_hits.py | 161 +- .../search/models/search_for_hits_options.py | 2 +- .../search/models/search_hits.py | 6 +- .../search/models/search_params_object.py | 159 +- .../search/models/search_params_query.py | 4 +- .../search/models/search_response.py | 23 +- .../search/models/search_rules_params.py | 18 +- .../search/models/search_rules_response.py | 6 +- .../search/models/search_strategy.py | 2 +- .../search/models/search_synonyms_params.py | 10 +- .../search/models/search_synonyms_response.py | 6 +- .../search/models/search_user_ids_params.py | 6 +- .../search/models/search_user_ids_response.py | 8 +- .../models/secured_api_key_restrictions.py | 10 +- .../search/models/semantic_search.py | 4 +- .../search/models/snippet_result.py | 4 +- .../search/models/snippet_result_option.py | 4 +- .../search/models/sort_remaining_by.py | 2 +- .../search/models/tag_filters.py | 2 +- .../search/models/task_status.py | 2 +- .../algoliasearch/search/models/time_range.py | 5 +- .../search/models/typo_tolerance.py | 9 +- .../search/models/typo_tolerance_enum.py | 2 +- .../search/models/updated_at_response.py | 2 +- .../updated_at_with_object_id_response.py | 4 +- .../search/models/updated_rule_response.py | 4 +- .../algoliasearch/search/models/user_hit.py | 2 +- .../algoliasearch/search/models/user_id.py | 2 +- .../algoliasearch/search/models/value.py | 3 +- .../lib/algolia/api/abtesting_client.rb | 12 +- .../lib/algolia/api/analytics_client.rb | 428 +- .../lib/algolia/api/recommend_client.rb | 24 +- .../lib/algolia/api/search_client.rb | 484 +-- .../models/abtesting/ab_test_response.rb | 2 +- .../analytics/search_no_result_event.rb | 2 +- .../algolia/models/analytics/top_search.rb | 2 +- .../analytics/top_search_with_analytics.rb | 2 +- .../models/recommend/around_precision.rb | 2 +- .../around_precision_from_value_inner.rb | 3 + .../algolia/models/recommend/around_radius.rb | 2 +- .../recommend/automatic_facet_filter.rb | 8 +- .../recommend/automatic_facet_filters.rb | 2 +- .../recommend/base_recommend_request.rb | 2 +- .../recommend/base_recommendations_query.rb | 2 +- ...se_recommended_for_you_query_parameters.rb | 2 +- .../models/recommend/base_search_params.rb | 96 +- .../base_search_params_without_query.rb | 94 +- .../models/recommend/base_search_response.rb | 26 +- .../lib/algolia/models/recommend/condition.rb | 39 +- .../algolia/models/recommend/consequence.rb | 38 +- .../models/recommend/consequence_hide.rb | 4 +- .../models/recommend/consequence_params.rb | 180 +- .../models/recommend/consequence_query.rb | 2 +- .../recommend/consequence_query_object.rb | 4 +- .../models/recommend/deleted_at_response.rb | 2 +- .../lib/algolia/models/recommend/distinct.rb | 2 +- .../lib/algolia/models/recommend/edit.rb | 2 +- .../algolia/models/recommend/facet_filters.rb | 2 +- .../models/recommend/facet_ordering.rb | 4 +- .../lib/algolia/models/recommend/facets.rb | 4 +- .../recommend/highlight_result_option.rb | 6 +- .../models/recommend/ignore_plurals.rb | 2 +- .../index_settings_as_search_params.rb | 90 +- .../models/recommend/numeric_filters.rb | 2 +- .../models/recommend/optional_filters.rb | 2 +- .../lib/algolia/models/recommend/params.rb | 2 +- .../models/recommend/promote_object_id.rb | 4 +- .../models/recommend/promote_object_ids.rb | 18 +- .../algolia/models/recommend/ranking_info.rb | 127 +- .../recommend/re_ranking_apply_filter.rb | 2 +- .../algolia/models/recommend/recommend_hit.rb | 6 +- .../models/recommend/recommendations_hits.rb | 2 +- .../models/recommend/recommendations_query.rb | 4 +- .../recommend/recommendations_results.rb | 28 +- .../recommend/recommended_for_you_query.rb | 2 +- .../recommended_for_you_query_parameters.rb | 182 +- .../models/recommend/remove_stop_words.rb | 2 +- .../models/recommend/rendering_content.rb | 2 +- .../models/recommend/search_params_object.rb | 182 +- .../models/recommend/search_params_query.rb | 2 +- .../search_recommend_rules_params.rb | 4 +- .../search_recommend_rules_response.rb | 20 +- .../models/recommend/semantic_search.rb | 4 +- .../models/recommend/snippet_result_option.rb | 4 +- .../algolia/models/recommend/tag_filters.rb | 2 +- .../models/recommend/trending_facets_query.rb | 2 +- .../models/recommend/trending_items_query.rb | 2 +- .../models/recommend/typo_tolerance.rb | 2 +- .../lib/algolia/models/recommend/value.rb | 2 +- .../models/search/add_api_key_response.rb | 2 +- .../lib/algolia/models/search/api_key.rb | 16 +- .../algolia/models/search/around_precision.rb | 2 +- .../around_precision_from_value_inner.rb | 3 + .../algolia/models/search/around_radius.rb | 2 +- .../models/search/automatic_facet_filter.rb | 8 +- .../models/search/automatic_facet_filters.rb | 2 +- .../models/search/base_index_settings.rb | 62 +- .../models/search/base_search_params.rb | 96 +- .../base_search_params_without_query.rb | 94 +- .../models/search/base_search_response.rb | 26 +- .../search/batch_dictionary_entries_params.rb | 6 +- .../algolia/models/search/batch_response.rb | 4 +- .../models/search/browse_params_object.rb | 184 +- .../algolia/models/search/browse_response.rb | 31 +- .../models/search/built_in_operation.rb | 4 +- .../lib/algolia/models/search/condition.rb | 39 +- .../lib/algolia/models/search/consequence.rb | 38 +- .../algolia/models/search/consequence_hide.rb | 4 +- .../models/search/consequence_params.rb | 180 +- .../models/search/consequence_query.rb | 2 +- .../models/search/consequence_query_object.rb | 4 +- .../models/search/created_at_response.rb | 2 +- .../lib/algolia/models/search/cursor.rb | 2 +- .../algolia/models/search/delete_by_params.rb | 8 +- .../models/search/deleted_at_response.rb | 2 +- .../algolia/models/search/dictionary_entry.rb | 10 +- .../models/search/dictionary_language.rb | 4 +- .../search/dictionary_settings_params.rb | 2 +- .../lib/algolia/models/search/distinct.rb | 2 +- .../lib/algolia/models/search/edit.rb | 2 +- .../algolia/models/search/facet_filters.rb | 2 +- .../lib/algolia/models/search/facet_hits.rb | 4 +- .../algolia/models/search/facet_ordering.rb | 4 +- .../lib/algolia/models/search/facets.rb | 4 +- .../models/search/get_api_key_response.rb | 16 +- .../models/search/get_objects_request.rb | 6 +- .../models/search/get_objects_response.rb | 2 +- .../search/has_pending_mappings_response.rb | 2 +- .../models/search/highlight_result_option.rb | 6 +- .../lib/algolia/models/search/hit.rb | 8 +- .../algolia/models/search/ignore_plurals.rb | 2 +- .../algolia/models/search/index_settings.rb | 150 +- .../search/index_settings_as_search_params.rb | 90 +- .../lib/algolia/models/search/log.rb | 50 +- .../lib/algolia/models/search/log_query.rb | 2 +- .../models/search/multiple_batch_response.rb | 4 +- .../algolia/models/search/numeric_filters.rb | 2 +- .../models/search/operation_index_params.rb | 4 +- .../algolia/models/search/optional_filters.rb | 2 +- .../lib/algolia/models/search/params.rb | 2 +- .../models/search/promote_object_id.rb | 4 +- .../models/search/promote_object_ids.rb | 18 +- .../lib/algolia/models/search/ranking_info.rb | 127 +- .../models/search/re_ranking_apply_filter.rb | 2 +- .../models/search/remove_stop_words.rb | 2 +- .../models/search/rendering_content.rb | 2 +- .../lib/algolia/models/search/rule.rb | 28 +- .../models/search/save_object_response.rb | 6 +- .../models/search/save_synonym_response.rb | 2 +- .../search_dictionary_entries_params.rb | 22 +- .../search_dictionary_entries_response.rb | 251 ++ .../search/search_for_facet_values_request.rb | 2 +- .../search_for_facet_values_response.rb | 1 + .../models/search/search_for_facets.rb | 184 +- .../search/search_for_facets_options.rb | 4 +- .../algolia/models/search/search_for_hits.rb | 184 +- .../models/search/search_for_hits_options.rb | 2 +- .../lib/algolia/models/search/search_hits.rb | 3 +- .../models/search/search_params_object.rb | 182 +- .../models/search/search_params_query.rb | 2 +- .../algolia/models/search/search_response.rb | 29 +- .../models/search/search_rules_params.rb | 28 +- .../models/search/search_rules_response.rb | 4 +- .../models/search/search_synonyms_params.rb | 18 +- .../models/search/search_synonyms_response.rb | 4 +- .../models/search/search_user_ids_params.rb | 16 +- .../models/search/search_user_ids_response.rb | 18 +- .../search/secured_api_key_restrictions.rb | 10 +- .../algolia/models/search/semantic_search.rb | 4 +- .../models/search/snippet_result_option.rb | 4 +- .../lib/algolia/models/search/tag_filters.rb | 2 +- .../lib/algolia/models/search/time_range.rb | 4 +- .../algolia/models/search/typo_tolerance.rb | 2 +- .../models/search/updated_at_response.rb | 2 +- .../updated_at_with_object_id_response.rb | 4 +- .../models/search/updated_rule_response.rb | 4 +- .../lib/algolia/models/search/user_hit.rb | 2 +- .../lib/algolia/models/search/user_id.rb | 2 +- .../lib/algolia/models/search/value.rb | 2 +- .../abtesting/ABTestResponse.scala | 3 +- .../analytics/SearchNoResultEvent.scala | 2 +- .../algoliasearch/analytics/TopSearch.scala | 2 +- .../analytics/TopSearchWithAnalytics.scala | 2 +- .../algoliasearch/api/AbtestingClient.scala | 4 +- .../algoliasearch/api/AnalyticsClient.scala | 130 +- .../algoliasearch/api/RecommendClient.scala | 12 +- .../algoliasearch/api/SearchClient.scala | 390 +- .../algoliasearch/recommend/Anchoring.scala | 6 +- .../recommend/AroundPrecision.scala | 5 +- .../AroundPrecisionFromValueInner.scala | 7 +- .../recommend/AroundRadius.scala | 7 +- .../recommend/AroundRadiusAll.scala | 2 +- .../recommend/AutomaticFacetFilter.scala | 11 +- .../recommend/AutomaticFacetFilters.scala | 5 +- .../recommend/BaseRecommendRequest.scala | 2 +- .../recommend/BaseRecommendationsQuery.scala | 2 +- ...BaseRecommendedForYouQueryParameters.scala | 4 +- .../recommend/BaseSearchParams.scala | 127 +- .../BaseSearchParamsWithoutQuery.scala | 125 +- .../recommend/BaseSearchResponse.scala | 12 +- .../algoliasearch/recommend/Condition.scala | 18 +- .../algoliasearch/recommend/Consequence.scala | 17 +- .../recommend/ConsequenceHide.scala | 4 +- .../recommend/ConsequenceParams.scala | 303 +- .../recommend/ConsequenceQuery.scala | 4 +- .../recommend/ConsequenceQueryObject.scala | 4 +- .../recommend/DeletedAtResponse.scala | 3 +- .../algoliasearch/recommend/Distinct.scala | 7 +- .../scala/algoliasearch/recommend/Edit.scala | 2 +- .../recommend/ExactOnSingleWordQuery.scala | 8 +- .../recommend/FacetFilters.scala | 6 +- .../recommend/FacetOrdering.scala | 4 +- .../algoliasearch/recommend/Facets.scala | 5 +- .../recommend/HighlightResultOption.scala | 6 +- .../recommend/IgnorePlurals.scala | 10 +- .../IndexSettingsAsSearchParams.scala | 178 +- .../algoliasearch/recommend/MatchLevel.scala | 2 +- .../scala/algoliasearch/recommend/Mode.scala | 3 +- .../recommend/NumericFilters.scala | 5 +- .../recommend/OptionalFilters.scala | 8 +- .../algoliasearch/recommend/Params.scala | 3 +- .../recommend/PromoteObjectID.scala | 5 +- .../recommend/PromoteObjectIDs.scala | 6 +- .../algoliasearch/recommend/QueryType.scala | 7 +- .../algoliasearch/recommend/RankingInfo.scala | 16 +- .../recommend/ReRankingApplyFilter.scala | 4 +- .../recommend/RecommendHit.scala | 6 +- .../recommend/RecommendationsHits.scala | 2 +- .../recommend/RecommendationsQuery.scala | 4 +- .../recommend/RecommendationsResults.scala | 14 +- .../recommend/RecommendedForYouQuery.scala | 2 +- .../RecommendedForYouQueryParameters.scala | 305 +- .../recommend/RemoveStopWords.scala | 10 +- .../recommend/RemoveWordsIfNoResults.scala | 11 +- .../recommend/RenderingContent.scala | 6 +- .../recommend/SearchParamsObject.scala | 305 +- .../recommend/SearchParamsQuery.scala | 2 +- .../SearchRecommendRulesParams.scala | 4 +- .../SearchRecommendRulesResponse.scala | 6 +- .../recommend/SemanticSearch.scala | 6 +- .../recommend/SnippetResultOption.scala | 4 +- .../recommend/SortRemainingBy.scala | 6 +- .../algoliasearch/recommend/TagFilters.scala | 5 +- .../algoliasearch/recommend/TaskStatus.scala | 2 +- .../recommend/TrendingFacetsQuery.scala | 2 +- .../recommend/TrendingItemsQuery.scala | 2 +- .../recommend/TypoTolerance.scala | 6 +- .../recommend/TypoToleranceEnum.scala | 5 +- .../scala/algoliasearch/recommend/Value.scala | 3 +- .../main/scala/algoliasearch/search/Acl.scala | 42 +- .../scala/algoliasearch/search/Action.scala | 35 +- .../search/AddApiKeyResponse.scala | 35 +- .../search/AdvancedSyntaxFeatures.scala | 33 +- .../search/AlternativesAsExact.scala | 33 +- .../algoliasearch/search/Anchoring.scala | 39 +- .../scala/algoliasearch/search/ApiKey.scala | 84 +- .../search/ApiKeyOperation.scala | 33 +- .../search/AroundPrecision.scala | 38 +- .../AroundPrecisionFromValueInner.scala | 40 +- .../algoliasearch/search/AroundRadius.scala | 40 +- .../search/AroundRadiusAll.scala | 35 +- .../search/AssignUserIdParams.scala | 33 +- .../search/AttributeToUpdate.scala | 33 +- .../search/AutomaticFacetFilter.scala | 44 +- .../search/AutomaticFacetFilters.scala | 38 +- .../search/BaseGetApiKeyResponse.scala | 33 +- .../search/BaseIndexSettings.scala | 139 +- .../search/BaseSearchParams.scala | 160 +- .../search/BaseSearchParamsWithoutQuery.scala | 158 +- .../search/BaseSearchResponse.scala | 45 +- .../search/BatchAssignUserIdsParams.scala | 33 +- .../search/BatchDictionaryEntriesParams.scala | 39 +- .../BatchDictionaryEntriesRequest.scala | 33 +- .../algoliasearch/search/BatchParams.scala | 33 +- .../algoliasearch/search/BatchRequest.scala | 33 +- .../algoliasearch/search/BatchResponse.scala | 38 +- .../search/BatchWriteParams.scala | 33 +- .../algoliasearch/search/BrowseParams.scala | 33 +- .../search/BrowseParamsObject.scala | 343 +- .../algoliasearch/search/BrowseResponse.scala | 55 +- .../search/BuiltInOperation.scala | 38 +- .../search/BuiltInOperationType.scala | 35 +- .../algoliasearch/search/Condition.scala | 51 +- .../algoliasearch/search/Consequence.scala | 50 +- .../search/ConsequenceHide.scala | 37 +- .../search/ConsequenceParams.scala | 336 +- .../search/ConsequenceQuery.scala | 37 +- .../search/ConsequenceQueryObject.scala | 37 +- .../search/CreatedAtResponse.scala | 35 +- .../scala/algoliasearch/search/Cursor.scala | 38 +- .../search/DeleteApiKeyResponse.scala | 33 +- .../algoliasearch/search/DeleteByParams.scala | 70 +- .../search/DeleteSourceResponse.scala | 33 +- .../search/DeletedAtResponse.scala | 36 +- .../search/DictionaryAction.scala | 33 +- .../search/DictionaryEntry.scala | 54 +- .../search/DictionaryEntryState.scala | 35 +- .../search/DictionaryLanguage.scala | 38 +- .../search/DictionarySettingsParams.scala | 35 +- .../algoliasearch/search/DictionaryType.scala | 33 +- .../scala/algoliasearch/search/Distinct.scala | 40 +- .../scala/algoliasearch/search/Edit.scala | 35 +- .../scala/algoliasearch/search/EditType.scala | 33 +- .../algoliasearch/search/ErrorBase.scala | 33 +- .../search/ExactOnSingleWordQuery.scala | 41 +- .../algoliasearch/search/Exhaustive.scala | 33 +- .../algoliasearch/search/FacetFilters.scala | 39 +- .../algoliasearch/search/FacetHits.scala | 40 +- .../algoliasearch/search/FacetOrdering.scala | 37 +- .../scala/algoliasearch/search/Facets.scala | 38 +- .../algoliasearch/search/FacetsStats.scala | 33 +- .../algoliasearch/search/FetchedIndex.scala | 33 +- .../search/GetApiKeyResponse.scala | 84 +- .../GetDictionarySettingsResponse.scala | 33 +- .../search/GetLogsResponse.scala | 33 +- .../search/GetObjectsParams.scala | 33 +- .../search/GetObjectsRequest.scala | 39 +- .../search/GetObjectsResponse.scala | 35 +- .../search/GetTaskResponse.scala | 33 +- .../search/GetTopUserIdsResponse.scala | 33 +- .../search/HasPendingMappingsResponse.scala | 35 +- .../search/HighlightResult.scala | 33 +- .../search/HighlightResultOption.scala | 39 +- .../main/scala/algoliasearch/search/Hit.scala | 42 +- .../algoliasearch/search/IgnorePlurals.scala | 43 +- .../algoliasearch/search/IndexSettings.scala | 319 +- .../search/IndexSettingsAsSearchParams.scala | 211 +- .../algoliasearch/search/JsonSupport.scala | 33 +- .../algoliasearch/search/Languages.scala | 33 +- .../search/ListApiKeysResponse.scala | 33 +- .../search/ListClustersResponse.scala | 33 +- .../search/ListIndicesResponse.scala | 33 +- .../search/ListUserIdsResponse.scala | 33 +- .../main/scala/algoliasearch/search/Log.scala | 59 +- .../scala/algoliasearch/search/LogQuery.scala | 35 +- .../scala/algoliasearch/search/LogType.scala | 33 +- .../algoliasearch/search/MatchLevel.scala | 35 +- .../search/MatchedGeoLocation.scala | 33 +- .../search/MixedSearchFilters.scala | 33 +- .../scala/algoliasearch/search/Mode.scala | 36 +- .../search/MultipleBatchRequest.scala | 33 +- .../search/MultipleBatchResponse.scala | 37 +- .../algoliasearch/search/NumericFilters.scala | 38 +- .../search/OperationIndexParams.scala | 40 +- .../algoliasearch/search/OperationType.scala | 35 +- .../search/OptionalFilters.scala | 41 +- .../scala/algoliasearch/search/Params.scala | 36 +- .../search/Personalization.scala | 33 +- .../scala/algoliasearch/search/Promote.scala | 33 +- .../search/PromoteObjectID.scala | 38 +- .../search/PromoteObjectIDs.scala | 39 +- .../algoliasearch/search/QueryType.scala | 40 +- .../algoliasearch/search/RankingInfo.scala | 49 +- .../search/ReRankingApplyFilter.scala | 37 +- .../scala/algoliasearch/search/Redirect.scala | 33 +- .../search/RedirectRuleIndexMetadata.scala | 33 +- .../RedirectRuleIndexMetadataData.scala | 33 +- .../search/RemoveStopWords.scala | 43 +- .../search/RemoveUserIdResponse.scala | 33 +- .../search/RemoveWordsIfNoResults.scala | 44 +- .../search/RenderingContent.scala | 39 +- .../search/ReplaceSourceResponse.scala | 33 +- .../scala/algoliasearch/search/Rule.scala | 47 +- .../search/SaveObjectResponse.scala | 40 +- .../search/SaveSynonymResponse.scala | 36 +- .../algoliasearch/search/ScopeType.scala | 33 +- .../SearchDictionaryEntriesParams.scala | 43 +- .../SearchDictionaryEntriesResponse.scala | 53 + .../search/SearchForFacetValuesRequest.scala | 35 +- .../search/SearchForFacetValuesResponse.scala | 35 +- .../search/SearchForFacets.scala | 340 +- .../search/SearchForFacetsOptions.scala | 37 +- .../algoliasearch/search/SearchForHits.scala | 340 +- .../search/SearchForHitsOptions.scala | 35 +- .../algoliasearch/search/SearchHits.scala | 38 +- .../search/SearchMethodParams.scala | 33 +- .../algoliasearch/search/SearchParams.scala | 33 +- .../search/SearchParamsObject.scala | 338 +- .../search/SearchParamsQuery.scala | 35 +- .../search/SearchParamsString.scala | 33 +- .../algoliasearch/search/SearchQuery.scala | 33 +- .../algoliasearch/search/SearchResponse.scala | 50 +- .../search/SearchResponses.scala | 33 +- .../algoliasearch/search/SearchResult.scala | 33 +- .../search/SearchRulesParams.scala | 48 +- .../search/SearchRulesResponse.scala | 37 +- .../algoliasearch/search/SearchStrategy.scala | 37 +- .../search/SearchSynonymsParams.scala | 37 +- .../search/SearchSynonymsResponse.scala | 37 +- .../search/SearchTypeDefault.scala | 33 +- .../search/SearchTypeFacet.scala | 33 +- .../search/SearchUserIdsParams.scala | 35 +- .../search/SearchUserIdsResponse.scala | 37 +- .../search/SecuredAPIKeyRestrictions.scala | 62 +- .../algoliasearch/search/SemanticSearch.scala | 39 +- .../algoliasearch/search/SnippetResult.scala | 33 +- .../search/SnippetResultOption.scala | 37 +- .../search/SortRemainingBy.scala | 39 +- .../scala/algoliasearch/search/Source.scala | 33 +- .../search/StandardEntries.scala | 33 +- .../algoliasearch/search/SynonymHit.scala | 33 +- .../algoliasearch/search/SynonymType.scala | 33 +- .../algoliasearch/search/TagFilters.scala | 38 +- .../algoliasearch/search/TaskStatus.scala | 35 +- .../algoliasearch/search/TimeRange.scala | 37 +- .../algoliasearch/search/TypoTolerance.scala | 39 +- .../search/TypoToleranceEnum.scala | 38 +- .../search/UpdateApiKeyResponse.scala | 33 +- .../search/UpdatedAtResponse.scala | 36 +- .../UpdatedAtWithObjectIdResponse.scala | 38 +- .../search/UpdatedRuleResponse.scala | 38 +- .../search/UserHighlightResult.scala | 33 +- .../scala/algoliasearch/search/UserHit.scala | 35 +- .../scala/algoliasearch/search/UserId.scala | 35 +- .../scala/algoliasearch/search/Value.scala | 36 +- .../Sources/Abtesting/AbtestingClient.swift | 10 +- .../Abtesting/Models/ABTestResponse.swift | 5 +- .../Sources/Analytics/AnalyticsClient.swift | 340 +- .../Models/SearchNoResultEvent.swift | 2 +- .../Sources/Analytics/Models/TopSearch.swift | 2 +- .../Models/TopSearchWithAnalytics.swift | 2 +- .../Sources/Recommend/Models/Anchoring.swift | 6 +- .../Recommend/Models/AroundPrecision.swift | 4 +- .../AroundPrecisionFromValueInner.swift | 5 + .../Recommend/Models/AroundRadius.swift | 7 +- .../Recommend/Models/AroundRadiusAll.swift | 1 + .../Models/AutomaticFacetFilter.swift | 11 +- .../Models/AutomaticFacetFilters.swift | 5 +- .../Models/BaseRecommendRequest.swift | 2 +- .../Models/BaseRecommendationsQuery.swift | 2 +- ...BaseRecommendedForYouQueryParameters.swift | 4 +- .../Recommend/Models/BaseSearchParams.swift | 131 +- .../Models/BaseSearchParamsWithoutQuery.swift | 129 +- .../Recommend/Models/BaseSearchResponse.swift | 19 +- .../Sources/Recommend/Models/Condition.swift | 22 +- .../Recommend/Models/Consequence.swift | 18 +- .../Recommend/Models/ConsequenceHide.swift | 4 +- .../Recommend/Models/ConsequenceParams.swift | 305 +- .../Recommend/Models/ConsequenceQuery.swift | 4 +- .../Models/ConsequenceQueryObject.swift | 4 +- .../Recommend/Models/DeletedAtResponse.swift | 5 +- .../Sources/Recommend/Models/Distinct.swift | 5 +- .../Sources/Recommend/Models/Edit.swift | 2 +- .../Models/ExactOnSingleWordQuery.swift | 10 +- .../Recommend/Models/FacetFilters.swift | 7 +- .../Recommend/Models/FacetOrdering.swift | 4 +- .../Sources/Recommend/Models/Facets.swift | 5 +- .../Models/HighlightResultOption.swift | 6 +- .../Recommend/Models/IgnorePlurals.swift | 10 +- .../Models/IndexSettingsAsSearchParams.swift | 176 +- .../Sources/Recommend/Models/MatchLevel.swift | 2 +- .../Sources/Recommend/Models/Mode.swift | 3 +- .../Recommend/Models/NumericFilters.swift | 7 +- .../Recommend/Models/OptionalFilters.swift | 8 +- .../Sources/Recommend/Models/Params.swift | 3 +- .../Recommend/Models/PromoteObjectID.swift | 5 +- .../Recommend/Models/PromoteObjectIDs.swift | 6 +- .../Sources/Recommend/Models/QueryType.swift | 5 +- .../Recommend/Models/RankingInfo.swift | 71 +- .../Models/ReRankingApplyFilter.swift | 4 +- .../Recommend/Models/RecommendHit.swift | 6 +- .../Models/RecommendationsHits.swift | 2 +- .../Models/RecommendationsQuery.swift | 4 +- .../Models/RecommendationsResults.swift | 21 +- .../Models/RecommendedForYouQuery.swift | 2 +- .../RecommendedForYouQueryParameters.swift | 307 +- .../Recommend/Models/RemoveStopWords.swift | 10 +- .../Models/RemoveWordsIfNoResults.swift | 10 +- .../Recommend/Models/RenderingContent.swift | 5 +- .../Recommend/Models/SearchParamsObject.swift | 307 +- .../Recommend/Models/SearchParamsQuery.swift | 2 +- .../Models/SearchRecommendRulesParams.swift | 4 +- .../Models/SearchRecommendRulesResponse.swift | 13 +- .../Recommend/Models/SemanticSearch.swift | 6 +- .../Models/SnippetResultOption.swift | 4 +- .../Recommend/Models/SortRemainingBy.swift | 8 +- .../Sources/Recommend/Models/TagFilters.swift | 5 +- .../Sources/Recommend/Models/TaskStatus.swift | 2 +- .../Models/TrendingFacetsQuery.swift | 2 +- .../Recommend/Models/TrendingItemsQuery.swift | 2 +- .../Recommend/Models/TypoTolerance.swift | 5 +- .../Recommend/Models/TypoToleranceEnum.swift | 4 + .../Sources/Recommend/Models/Value.swift | 3 +- .../Sources/Recommend/RecommendClient.swift | 24 +- .../Sources/Search/Models/Acl.swift | 9 +- .../Sources/Search/Models/Action.swift | 2 +- .../Search/Models/AddApiKeyResponse.swift | 2 +- .../Sources/Search/Models/Anchoring.swift | 6 +- .../Sources/Search/Models/ApiKey.swift | 52 +- .../Search/Models/AroundPrecision.swift | 4 +- .../AroundPrecisionFromValueInner.swift | 5 + .../Sources/Search/Models/AroundRadius.swift | 7 +- .../Search/Models/AroundRadiusAll.swift | 1 + .../Search/Models/AutomaticFacetFilter.swift | 11 +- .../Search/Models/AutomaticFacetFilters.swift | 5 +- .../Search/Models/BaseIndexSettings.swift | 108 +- .../Search/Models/BaseSearchParams.swift | 131 +- .../Models/BaseSearchParamsWithoutQuery.swift | 129 +- .../Search/Models/BaseSearchResponse.swift | 19 +- .../Models/BatchDictionaryEntriesParams.swift | 6 +- .../Sources/Search/Models/BatchResponse.swift | 7 +- .../Search/Models/BrowseParamsObject.swift | 312 +- .../Search/Models/BrowseResponse.swift | 28 +- .../Search/Models/BuiltInOperation.swift | 4 +- .../Search/Models/BuiltInOperationType.swift | 2 +- .../Sources/Search/Models/Condition.swift | 22 +- .../Sources/Search/Models/Consequence.swift | 18 +- .../Search/Models/ConsequenceHide.swift | 4 +- .../Search/Models/ConsequenceParams.swift | 305 +- .../Search/Models/ConsequenceQuery.swift | 4 +- .../Models/ConsequenceQueryObject.swift | 4 +- .../Search/Models/CreatedAtResponse.swift | 2 +- .../Sources/Search/Models/Cursor.swift | 5 +- .../Search/Models/DeleteByParams.swift | 32 +- .../Search/Models/DeletedAtResponse.swift | 5 +- .../Search/Models/DictionaryEntry.swift | 18 +- .../Search/Models/DictionaryEntryState.swift | 2 +- .../Search/Models/DictionaryLanguage.swift | 5 +- .../Models/DictionarySettingsParams.swift | 2 +- .../Sources/Search/Models/Distinct.swift | 5 +- .../Sources/Search/Models/Edit.swift | 2 +- .../Models/ExactOnSingleWordQuery.swift | 10 +- .../Sources/Search/Models/FacetFilters.swift | 7 +- .../Sources/Search/Models/FacetHits.swift | 5 +- .../Sources/Search/Models/FacetOrdering.swift | 4 +- .../Sources/Search/Models/Facets.swift | 5 +- .../Search/Models/GetApiKeyResponse.swift | 52 +- .../Search/Models/GetObjectsRequest.swift | 6 +- .../Search/Models/GetObjectsResponse.swift | 2 +- .../Models/HasPendingMappingsResponse.swift | 2 +- .../Search/Models/HighlightResultOption.swift | 6 +- .../Sources/Search/Models/Hit.swift | 9 +- .../Sources/Search/Models/IgnorePlurals.swift | 10 +- .../Sources/Search/Models/IndexSettings.swift | 286 +- .../Models/IndexSettingsAsSearchParams.swift | 176 +- .../Sources/Search/Models/Log.swift | 24 +- .../Sources/Search/Models/LogQuery.swift | 2 +- .../Sources/Search/Models/MatchLevel.swift | 2 +- .../Sources/Search/Models/Mode.swift | 3 +- .../Search/Models/MultipleBatchResponse.swift | 4 +- .../Search/Models/NumericFilters.swift | 7 +- .../Search/Models/OperationIndexParams.swift | 7 +- .../Sources/Search/Models/OperationType.swift | 2 +- .../Search/Models/OptionalFilters.swift | 8 +- .../Sources/Search/Models/Params.swift | 3 +- .../Search/Models/PromoteObjectID.swift | 5 +- .../Search/Models/PromoteObjectIDs.swift | 6 +- .../Sources/Search/Models/QueryType.swift | 5 +- .../Sources/Search/Models/RankingInfo.swift | 71 +- .../Search/Models/ReRankingApplyFilter.swift | 4 +- .../Search/Models/RemoveStopWords.swift | 10 +- .../Models/RemoveWordsIfNoResults.swift | 10 +- .../Search/Models/RenderingContent.swift | 5 +- .../Sources/Search/Models/Rule.swift | 14 +- .../Search/Models/SaveObjectResponse.swift | 9 +- .../Search/Models/SaveSynonymResponse.swift | 5 +- .../SearchDictionaryEntriesParams.swift | 15 +- .../SearchDictionaryEntriesResponse.swift | 48 + .../Models/SearchForFacetValuesRequest.swift | 2 +- .../Models/SearchForFacetValuesResponse.swift | 1 + .../Search/Models/SearchForFacets.swift | 309 +- .../Models/SearchForFacetsOptions.swift | 4 +- .../Sources/Search/Models/SearchForHits.swift | 309 +- .../Search/Models/SearchForHitsOptions.swift | 2 +- .../Sources/Search/Models/SearchHits.swift | 4 +- .../Search/Models/SearchParamsObject.swift | 307 +- .../Search/Models/SearchParamsQuery.swift | 2 +- .../Search/Models/SearchResponse.swift | 23 +- .../Search/Models/SearchRulesParams.swift | 17 +- .../Search/Models/SearchRulesResponse.swift | 4 +- .../Search/Models/SearchStrategy.swift | 4 +- .../Search/Models/SearchSynonymsParams.swift | 11 +- .../Models/SearchSynonymsResponse.swift | 4 +- .../Search/Models/SearchUserIdsParams.swift | 9 +- .../Search/Models/SearchUserIdsResponse.swift | 11 +- .../Models/SecuredAPIKeyRestrictions.swift | 29 +- .../Search/Models/SemanticSearch.swift | 6 +- .../Search/Models/SnippetResultOption.swift | 4 +- .../Search/Models/SortRemainingBy.swift | 8 +- .../Sources/Search/Models/TagFilters.swift | 5 +- .../Sources/Search/Models/TaskStatus.swift | 2 +- .../Sources/Search/Models/TimeRange.swift | 4 +- .../Sources/Search/Models/TypoTolerance.swift | 5 +- .../Search/Models/TypoToleranceEnum.swift | 4 + .../Search/Models/UpdatedAtResponse.swift | 5 +- .../UpdatedAtWithObjectIdResponse.swift | 7 +- .../Search/Models/UpdatedRuleResponse.swift | 7 +- .../Sources/Search/Models/UserHit.swift | 2 +- .../Sources/Search/Models/UserId.swift | 2 +- .../Sources/Search/Models/Value.swift | 3 +- .../Sources/Search/SearchClient.swift | 589 +-- snippets/csharp/src/Search.cs | 4 +- snippets/dart/lib/search.dart | 4 +- snippets/go/src/search.go | 4 +- .../src/test/java/com/algolia/Search.java | 2 +- snippets/javascript/src/search.ts | 4 +- .../kotlin/com/algolia/snippets/Search.kt | 4 +- snippets/php/src/Search.php | 4 +- snippets/python/search.py | 4 +- snippets/ruby/search.rb | 4 +- snippets/scala/src/main/scala/Search.scala | 4 +- snippets/swift/Sources/Search.swift | 4 +- specs/bundled/abtesting.doc.yml | 8 +- specs/bundled/abtesting.yml | 8 +- specs/bundled/algoliasearch.yml | 2693 +++++++++---- specs/bundled/analytics.doc.yml | 19 +- specs/bundled/analytics.yml | 19 +- specs/bundled/recommend.doc.yml | 1585 ++++++-- specs/bundled/recommend.yml | 1585 ++++++-- specs/bundled/search.doc.yml | 3543 +++++++++++----- specs/bundled/search.yml | 3563 ++++++++++++----- .../src/generated/requests/Insights.test.cs | 10 +- .../src/generated/requests/Search.test.cs | 33 +- .../test/requests/algoliasearch_test.dart | 9 +- .../dart/test/requests/insights_test.dart | 6 +- .../dart/test/requests/search_test.dart | 17 +- .../output/go/tests/requests/insights_test.go | 10 +- tests/output/go/tests/requests/search_test.go | 42 +- .../com/algolia/requests/Insights.test.java | 12 +- .../com/algolia/requests/Search.test.java | 22 +- .../src/requests/algoliasearch.test.ts | 4 - .../javascript/src/requests/insights.test.ts | 12 +- .../javascript/src/requests/search.test.ts | 32 +- .../com/algolia/requests/InsightsTest.kt | 6 +- .../kotlin/com/algolia/requests/SearchTest.kt | 12 +- .../output/php/src/requests/InsightsTest.php | 10 +- tests/output/php/src/requests/SearchTest.php | 29 +- .../python/tests/requests/insights_test.py | 14 +- .../python/tests/requests/search_test.py | 40 +- .../ruby/test/requests/insights_test.rb | 14 +- .../output/ruby/test/requests/search_test.rb | 36 +- .../algoliasearch/requests/InsightsTest.scala | 10 +- .../algoliasearch/requests/SearchTest.scala | 26 +- .../swift/Tests/requests/InsightsTests.swift | 10 +- .../swift/Tests/requests/SearchTests.swift | 47 +- 2162 files changed, 44952 insertions(+), 30998 deletions(-) create mode 100644 clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesResponse.cs create mode 100644 clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.dart create mode 100644 clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.g.dart create mode 100644 clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.dart create mode 100644 clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.g.dart create mode 100644 clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_response.go create mode 100644 clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesResponse.java create mode 100644 clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchDictionaryEntriesResponse.ts create mode 100644 clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesResponse.ts create mode 100644 clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesResponse.kt create mode 100644 clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesResponse.php create mode 100644 clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_response.py create mode 100644 clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_response.rb create mode 100644 clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesResponse.scala create mode 100644 clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesResponse.swift diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/AbtestingClient.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/AbtestingClient.cs index 71a62f4d4b..c8deada1b8 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/AbtestingClient.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/AbtestingClient.cs @@ -204,8 +204,8 @@ public interface IAbtestingClient /// /// List all A/B tests. /// - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) - /// Number of records to return (page size). (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) + /// Number of items to return. (optional, default to 10) /// Only return A/B tests for indices starting with this prefix. (optional) /// Only return A/B tests for indices ending with this suffix. (optional) /// Add extra http header or query parameters to Algolia. @@ -219,8 +219,8 @@ public interface IAbtestingClient /// /// List all A/B tests. (Synchronous version) /// - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) - /// Number of records to return (page size). (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) + /// Number of items to return. (optional, default to 10) /// Only return A/B tests for indices starting with this prefix. (optional) /// Only return A/B tests for indices ending with this suffix. (optional) /// Add extra http header or query parameters to Algolia. @@ -621,8 +621,8 @@ public ABTest GetABTest(int id, RequestOptions options = null, CancellationToken /// /// Required API Key ACLs: /// - analytics - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) - /// Number of records to return (page size). (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) + /// Number of items to return. (optional, default to 10) /// Only return A/B tests for indices starting with this prefix. (optional) /// Only return A/B tests for indices ending with this suffix. (optional) /// Add extra http header or query parameters to Algolia. @@ -650,8 +650,8 @@ public async Task ListABTestsAsync(int? offset = default, i /// /// Required API Key ACLs: /// - analytics - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) - /// Number of records to return (page size). (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) + /// Number of items to return. (optional, default to 10) /// Only return A/B tests for indices starting with this prefix. (optional) /// Only return A/B tests for indices ending with this suffix. (optional) /// Add extra http header or query parameters to Algolia. diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/AnalyticsClient.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/AnalyticsClient.cs index 5201f33237..9072aa4a1e 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/AnalyticsClient.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/AnalyticsClient.cs @@ -132,9 +132,9 @@ public interface IAnalyticsClient /// /// Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -147,9 +147,9 @@ public interface IAnalyticsClient /// /// Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -162,9 +162,9 @@ public interface IAnalyticsClient /// /// Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -177,9 +177,9 @@ public interface IAnalyticsClient /// /// Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -192,9 +192,9 @@ public interface IAnalyticsClient /// /// Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -207,9 +207,9 @@ public interface IAnalyticsClient /// /// Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -222,9 +222,9 @@ public interface IAnalyticsClient /// /// Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -237,9 +237,9 @@ public interface IAnalyticsClient /// /// Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -252,9 +252,9 @@ public interface IAnalyticsClient /// /// Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -267,9 +267,9 @@ public interface IAnalyticsClient /// /// Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -282,9 +282,9 @@ public interface IAnalyticsClient /// /// Returns the rate at which searches didn't return any results. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -297,9 +297,9 @@ public interface IAnalyticsClient /// /// Returns the rate at which searches didn't return any results. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -312,9 +312,9 @@ public interface IAnalyticsClient /// /// Returns the number of searches within a time range. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -327,9 +327,9 @@ public interface IAnalyticsClient /// /// Returns the number of searches within a time range. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -342,11 +342,11 @@ public interface IAnalyticsClient /// /// Return the most popular of the last 1,000 searches that didn't lead to any clicks. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -359,11 +359,11 @@ public interface IAnalyticsClient /// /// Return the most popular of the last 1,000 searches that didn't lead to any clicks. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -376,11 +376,11 @@ public interface IAnalyticsClient /// /// Returns the most popular of the latest 1,000 searches that didn't return any results. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -393,11 +393,11 @@ public interface IAnalyticsClient /// /// Returns the most popular of the latest 1,000 searches that didn't return any results. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -410,7 +410,7 @@ public interface IAnalyticsClient /// /// Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5 minutes. /// - /// Index name to target. + /// Index name. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -422,7 +422,7 @@ public interface IAnalyticsClient /// /// Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5 minutes. (Synchronous version) /// - /// Index name to target. + /// Index name. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -434,11 +434,11 @@ public interface IAnalyticsClient /// /// Returns top countries. Limited to the 1,000 most frequent ones. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -451,11 +451,11 @@ public interface IAnalyticsClient /// /// Returns top countries. Limited to the 1,000 most frequent ones. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -468,12 +468,12 @@ public interface IAnalyticsClient /// /// Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters. /// - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -486,12 +486,12 @@ public interface IAnalyticsClient /// /// Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters. (Synchronous version) /// - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -505,12 +505,12 @@ public interface IAnalyticsClient /// Returns the most popular filter values for an attribute in the 1,000 most recently used filters. /// /// Attribute name. - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -524,12 +524,12 @@ public interface IAnalyticsClient /// Returns the most popular filter values for an attribute in the 1,000 most recently used filters. (Synchronous version) /// /// Attribute name. - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -542,12 +542,12 @@ public interface IAnalyticsClient /// /// Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters. /// - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -560,12 +560,12 @@ public interface IAnalyticsClient /// /// Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters. (Synchronous version) /// - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -578,13 +578,13 @@ public interface IAnalyticsClient /// /// Return the most popular clicked results in the last 1,000 searches. /// - /// Index name to target. + /// Index name. /// User query. (optional) /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -597,13 +597,13 @@ public interface IAnalyticsClient /// /// Return the most popular clicked results in the last 1,000 searches. (Synchronous version) /// - /// Index name to target. + /// Index name. /// User query. (optional) /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -616,14 +616,14 @@ public interface IAnalyticsClient /// /// Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits. /// - /// Index name to target. + /// Index name. /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Reorder the results. (optional) /// Sorting direction of the results: ascending or descending. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -636,14 +636,14 @@ public interface IAnalyticsClient /// /// Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits. (Synchronous version) /// - /// Index name to target. + /// Index name. /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Reorder the results. (optional) /// Sorting direction of the results: ascending or descending. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -656,9 +656,9 @@ public interface IAnalyticsClient /// /// Return the count of unique users. /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -671,9 +671,9 @@ public interface IAnalyticsClient /// /// Return the count of unique users. (Synchronous version) /// - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -923,9 +923,9 @@ public object CustomPut(string path, Dictionary parameters = def /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -956,9 +956,9 @@ public async Task GetAverageClickPositionAsync( /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -976,9 +976,9 @@ public GetAverageClickPositionResponse GetAverageClickPosition(string index, str /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1009,9 +1009,9 @@ public async Task GetClickPositionsAsync(string index /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1029,9 +1029,9 @@ public GetClickPositionsResponse GetClickPositions(string index, string startDat /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1062,9 +1062,9 @@ public async Task GetClickThroughRateAsync(string i /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1082,9 +1082,9 @@ public GetClickThroughRateResponse GetClickThroughRate(string index, string star /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1115,9 +1115,9 @@ public async Task GetConversationRateAsync(string i /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1135,9 +1135,9 @@ public GetConversationRateResponse GetConversationRate(string index, string star /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1168,9 +1168,9 @@ public async Task GetNoClickRateAsync(string index, stri /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1188,9 +1188,9 @@ public GetNoClickRateResponse GetNoClickRate(string index, string startDate = de /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1221,9 +1221,9 @@ public async Task GetNoResultsRateAsync(string index, /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1241,9 +1241,9 @@ public GetNoResultsRateResponse GetNoResultsRate(string index, string startDate /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1274,9 +1274,9 @@ public async Task GetSearchesCountAsync(string index, /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1294,11 +1294,11 @@ public GetSearchesCountResponse GetSearchesCount(string index, string startDate /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1331,11 +1331,11 @@ public async Task GetSearchesNoClicksAsync(string i /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1353,11 +1353,11 @@ public GetSearchesNoClicksResponse GetSearchesNoClicks(string index, string star /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1390,11 +1390,11 @@ public async Task GetSearchesNoResultsAsync(string /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1412,7 +1412,7 @@ public GetSearchesNoResultsResponse GetSearchesNoResults(string index, string st /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1439,7 +1439,7 @@ public async Task GetStatusAsync(string index, RequestOptions /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1456,11 +1456,11 @@ public GetStatusResponse GetStatus(string index, RequestOptions options = null, /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1493,11 +1493,11 @@ public async Task GetTopCountriesAsync(string index, st /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1515,12 +1515,12 @@ public GetTopCountriesResponse GetTopCountries(string index, string startDate = /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1554,12 +1554,12 @@ public async Task GetTopFilterAttributesAsync(st /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1578,12 +1578,12 @@ public GetTopFilterAttributesResponse GetTopFilterAttributes(string index, strin /// Required API Key ACLs: /// - analytics /// Attribute name. - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1623,12 +1623,12 @@ public async Task GetTopFilterForAttributeAsyn /// Required API Key ACLs: /// - analytics /// Attribute name. - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1646,12 +1646,12 @@ public GetTopFilterForAttributeResponse GetTopFilterForAttribute(string attribut /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1685,12 +1685,12 @@ public async Task GetTopFiltersNoResultsAsync(st /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// User query. (optional) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1708,13 +1708,13 @@ public GetTopFiltersNoResultsResponse GetTopFiltersNoResults(string index, strin /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// User query. (optional) /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1749,13 +1749,13 @@ public async Task GetTopHitsAsync(string index, string searc /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// User query. (optional) /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1773,14 +1773,14 @@ public GetTopHitsResponse GetTopHits(string index, string search = default, bool /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Reorder the results. (optional) /// Sorting direction of the results: ascending or descending. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1816,14 +1816,14 @@ public async Task GetTopSearchesAsync(string index, bool /// /// Required API Key ACLs: /// - analytics - /// Index name to target. + /// Index name. /// Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Reorder the results. (optional) /// Sorting direction of the results: ascending or descending. (optional) - /// Number of records to return (page size). (optional, default to 10) - /// Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + /// Number of items to return. (optional, default to 10) + /// Position of the first item to return. (optional, default to 0) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1841,9 +1841,9 @@ public GetTopSearchesResponse GetTopSearches(string index, bool? clickAnalytics /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1874,9 +1874,9 @@ public async Task GetUsersCountAsync(string index, string /// /// Required API Key ACLs: /// - analytics - /// Index name to target. - /// Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - /// End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + /// Index name. + /// Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/RecommendClient.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/RecommendClient.cs index 3c92cad53a..9b334e13f5 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/RecommendClient.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/RecommendClient.cs @@ -132,9 +132,9 @@ public interface IRecommendClient /// /// Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -146,9 +146,9 @@ public interface IRecommendClient /// /// Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -160,9 +160,9 @@ public interface IRecommendClient /// /// Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -174,9 +174,9 @@ public interface IRecommendClient /// /// Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -188,7 +188,7 @@ public interface IRecommendClient /// /// Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// Unique identifier of a task. Numeric value (up to 64bits). /// Add extra http header or query parameters to Algolia. @@ -202,7 +202,7 @@ public interface IRecommendClient /// /// Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// Unique identifier of a task. Numeric value (up to 64bits). /// Add extra http header or query parameters to Algolia. @@ -240,7 +240,7 @@ public interface IRecommendClient /// /// List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// (optional) /// Add extra http header or query parameters to Algolia. @@ -254,7 +254,7 @@ public interface IRecommendClient /// /// List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// (optional) /// Add extra http header or query parameters to Algolia. @@ -505,9 +505,9 @@ public object CustomPut(string path, Dictionary parameters = def /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -541,9 +541,9 @@ public async Task DeleteRecommendRuleAsync(string indexName, /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -560,9 +560,9 @@ public DeletedAtResponse DeleteRecommendRule(string indexName, RecommendModels m /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -596,9 +596,9 @@ public async Task GetRecommendRuleAsync(string indexName, Recommen /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// Unique record (object) identifier. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -615,7 +615,7 @@ public RuleResponse GetRecommendRule(string indexName, RecommendModels model, st /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// Unique identifier of a task. Numeric value (up to 64bits). /// Add extra http header or query parameters to Algolia. @@ -648,7 +648,7 @@ public async Task GetRecommendStatusAsync(string index /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// Unique identifier of a task. Numeric value (up to 64bits). /// Add extra http header or query parameters to Algolia. @@ -712,7 +712,7 @@ public GetRecommendationsResponse GetRecommendations(GetRecommendationsParams ge /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// (optional) /// Add extra http header or query parameters to Algolia. @@ -745,7 +745,7 @@ public async Task SearchRecommendRulesAsync(string /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// (optional) /// Add extra http header or query parameters to Algolia. diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs index 958f8217e0..395ce9c97f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs @@ -22,7 +22,7 @@ namespace Algolia.Search.Clients; public interface ISearchClient { /// - /// Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + /// Creates a new API key with specific permissions and restrictions. /// /// /// Add extra http header or query parameters to Algolia. @@ -34,7 +34,7 @@ public interface ISearchClient Task AddApiKeyAsync(ApiKey apiKey, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. (Synchronous version) + /// Creates a new API key with specific permissions and restrictions. (Synchronous version) /// /// /// Add extra http header or query parameters to Algolia. @@ -46,11 +46,11 @@ public interface ISearchClient AddApiKeyResponse AddApiKey(ApiKey apiKey, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + /// If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). /// - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Algolia record. + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -60,11 +60,11 @@ public interface ISearchClient Task AddOrUpdateObjectAsync(string indexName, string objectID, object body, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) + /// If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) /// - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Algolia record. + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -74,7 +74,7 @@ public interface ISearchClient UpdatedAtWithObjectIdResponse AddOrUpdateObject(string indexName, string objectID, object body, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add a source to the list of allowed sources. + /// Adds a source to the list of allowed sources. /// /// Source to add. /// Add extra http header or query parameters to Algolia. @@ -86,7 +86,7 @@ public interface ISearchClient Task AppendSourceAsync(Source varSource, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add a source to the list of allowed sources. (Synchronous version) + /// Adds a source to the list of allowed sources. (Synchronous version) /// /// Source to add. /// Add extra http header or query parameters to Algolia. @@ -98,9 +98,9 @@ public interface ISearchClient CreatedAtResponse AppendSource(Source varSource, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + /// Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. /// - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -111,9 +111,9 @@ public interface ISearchClient Task AssignUserIdAsync(string xAlgoliaUserID, AssignUserIdParams assignUserIdParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. (Synchronous version) + /// Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. (Synchronous version) /// - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -124,9 +124,9 @@ public interface ISearchClient CreatedAtResponse AssignUserId(string xAlgoliaUserID, AssignUserIdParams assignUserIdParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + /// Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -137,9 +137,9 @@ public interface ISearchClient Task BatchAsync(string indexName, BatchWriteParams batchWriteParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. (Synchronous version) + /// Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -150,9 +150,9 @@ public interface ISearchClient BatchResponse Batch(string indexName, BatchWriteParams batchWriteParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + /// Assigns multiple user IDs to a cluster. **You can't move users with this operation**. /// - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -163,9 +163,9 @@ public interface ISearchClient Task BatchAssignUserIdsAsync(string xAlgoliaUserID, BatchAssignUserIdsParams batchAssignUserIdsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. (Synchronous version) + /// Assigns multiple user IDs to a cluster. **You can't move users with this operation**. (Synchronous version) /// - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -176,9 +176,9 @@ public interface ISearchClient CreatedAtResponse BatchAssignUserIds(string xAlgoliaUserID, BatchAssignUserIdsParams batchAssignUserIdsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add or remove a batch of dictionary entries. + /// Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. /// - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -189,9 +189,9 @@ public interface ISearchClient Task BatchDictionaryEntriesAsync(DictionaryType dictionaryName, BatchDictionaryEntriesParams batchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add or remove a batch of dictionary entries. (Synchronous version) + /// Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. (Synchronous version) /// - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -202,9 +202,9 @@ public interface ISearchClient UpdatedAtResponse BatchDictionaryEntries(DictionaryType dictionaryName, BatchDictionaryEntriesParams batchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + /// Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -215,9 +215,9 @@ public interface ISearchClient Task> BrowseAsync(string indexName, BrowseParams browseParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. (Synchronous version) + /// Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -228,9 +228,9 @@ public interface ISearchClient BrowseResponse Browse(string indexName, BrowseParams browseParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete the records but leave settings and index-specific API keys untouched. + /// Deletes only the records from an index while keeping settings, synonyms, and rules. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -240,9 +240,9 @@ public interface ISearchClient Task ClearObjectsAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete the records but leave settings and index-specific API keys untouched. (Synchronous version) + /// Deletes only the records from an index while keeping settings, synonyms, and rules. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -252,10 +252,10 @@ public interface ISearchClient UpdatedAtResponse ClearObjects(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete all rules in the index. + /// Deletes all rules from the index. /// - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -265,10 +265,10 @@ public interface ISearchClient Task ClearRulesAsync(string indexName, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete all rules in the index. (Synchronous version) + /// Deletes all rules from the index. (Synchronous version) /// - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -278,10 +278,10 @@ public interface ISearchClient UpdatedAtResponse ClearRules(string indexName, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete all synonyms in the index. + /// Deletes all synonyms from the index. /// - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -291,10 +291,10 @@ public interface ISearchClient Task ClearSynonymsAsync(string indexName, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete all synonyms in the index. (Synchronous version) + /// Deletes all synonyms from the index. (Synchronous version) /// - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -412,7 +412,7 @@ public interface ISearchClient object CustomPut(string path, Dictionary parameters = default, object body = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete an existing API key. The request must be authenticated with the admin API key. + /// Deletes the API key. /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -424,7 +424,7 @@ public interface ISearchClient Task DeleteApiKeyAsync(string key, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete an existing API key. The request must be authenticated with the admin API key. (Synchronous version) + /// Deletes the API key. (Synchronous version) /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -436,9 +436,9 @@ public interface ISearchClient DeleteApiKeyResponse DeleteApiKey(string key, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + /// This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -449,9 +449,9 @@ public interface ISearchClient Task DeleteByAsync(string indexName, DeleteByParams deleteByParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. (Synchronous version) + /// This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -462,9 +462,9 @@ public interface ISearchClient DeletedAtResponse DeleteBy(string indexName, DeleteByParams deleteByParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete an existing index. + /// Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -474,9 +474,9 @@ public interface ISearchClient Task DeleteIndexAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete an existing index. (Synchronous version) + /// Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -486,10 +486,10 @@ public interface ISearchClient DeletedAtResponse DeleteIndex(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + /// Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). /// - /// Index on which to perform the request. - /// Unique record (object) identifier. + /// Name of the index on which to perform the operation. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -499,10 +499,10 @@ public interface ISearchClient Task DeleteObjectAsync(string indexName, string objectID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. (Synchronous version) + /// Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). (Synchronous version) /// - /// Index on which to perform the request. - /// Unique record (object) identifier. + /// Name of the index on which to perform the operation. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -512,11 +512,11 @@ public interface ISearchClient DeletedAtResponse DeleteObject(string indexName, string objectID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + /// Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -526,11 +526,11 @@ public interface ISearchClient Task DeleteRuleAsync(string indexName, string objectID, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) + /// Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -540,7 +540,7 @@ public interface ISearchClient UpdatedAtResponse DeleteRule(string indexName, string objectID, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Remove a source from the list of allowed sources. + /// Deletes a source from the list of allowed sources. /// /// IP address range of the source. /// Add extra http header or query parameters to Algolia. @@ -552,7 +552,7 @@ public interface ISearchClient Task DeleteSourceAsync(string varSource, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Remove a source from the list of allowed sources. (Synchronous version) + /// Deletes a source from the list of allowed sources. (Synchronous version) /// /// IP address range of the source. /// Add extra http header or query parameters to Algolia. @@ -564,11 +564,11 @@ public interface ISearchClient DeleteSourceResponse DeleteSource(string varSource, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + /// Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -578,11 +578,11 @@ public interface ISearchClient Task DeleteSynonymAsync(string indexName, string objectID, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) + /// Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -592,7 +592,7 @@ public interface ISearchClient DeletedAtResponse DeleteSynonym(string indexName, string objectID, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + /// Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -604,7 +604,7 @@ public interface ISearchClient Task GetApiKeyAsync(string key, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. (Synchronous version) + /// Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. (Synchronous version) /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -616,7 +616,7 @@ public interface ISearchClient GetApiKeyResponse GetApiKey(string key, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + /// Lists supported languages with their supported dictionary types and number of custom entries. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -627,7 +627,7 @@ public interface ISearchClient Task> GetDictionaryLanguagesAsync(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. (Synchronous version) + /// Lists supported languages with their supported dictionary types and number of custom entries. (Synchronous version) /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -638,7 +638,7 @@ public interface ISearchClient Dictionary GetDictionaryLanguages(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + /// Retrieves the languages for which standard dictionary entries are turned off. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -649,7 +649,7 @@ public interface ISearchClient Task GetDictionarySettingsAsync(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). (Synchronous version) + /// Retrieves the languages for which standard dictionary entries are turned off. (Synchronous version) /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -660,12 +660,12 @@ public interface ISearchClient GetDictionarySettingsResponse GetDictionarySettings(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. /// - /// First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (optional, default to 0) + /// First log entry to retrieve. The most recent entries are listed first. (optional, default to 0) /// Maximum number of entries to retrieve. (optional, default to 10) - /// Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. (optional) - /// Type of log entries to retrieve. When omitted, all log entries are retrieved. (optional) + /// Index for which to retrieve log entries. By default, log entries are retrieved for all indices. (optional) + /// Type of log entries to retrieve. By default, all log entries are retrieved. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -675,12 +675,12 @@ public interface ISearchClient Task GetLogsAsync(int? offset = default, int? length = default, string indexName = default, LogType? type = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). (Synchronous version) + /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. (Synchronous version) /// - /// First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (optional, default to 0) + /// First log entry to retrieve. The most recent entries are listed first. (optional, default to 0) /// Maximum number of entries to retrieve. (optional, default to 10) - /// Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. (optional) - /// Type of log entries to retrieve. When omitted, all log entries are retrieved. (optional) + /// Index for which to retrieve log entries. By default, log entries are retrieved for all indices. (optional) + /// Type of log entries to retrieve. By default, all log entries are retrieved. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -690,11 +690,11 @@ public interface ISearchClient GetLogsResponse GetLogs(int? offset = default, int? length = default, string indexName = default, LogType? type = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + /// Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). /// - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. (optional) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -704,11 +704,11 @@ public interface ISearchClient Task> GetObjectAsync(string indexName, string objectID, List attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). (Synchronous version) + /// Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). (Synchronous version) /// - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. (optional) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -718,7 +718,7 @@ public interface ISearchClient Dictionary GetObject(string indexName, string objectID, List attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + /// Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. /// /// Request object. /// Add extra http header or query parameters to Algolia. @@ -730,7 +730,7 @@ public interface ISearchClient Task> GetObjectsAsync(GetObjectsParams getObjectsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. (Synchronous version) + /// Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. (Synchronous version) /// /// Request object. /// Add extra http header or query parameters to Algolia. @@ -742,9 +742,9 @@ public interface ISearchClient GetObjectsResponse GetObjects(GetObjectsParams getObjectsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + /// Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -755,9 +755,9 @@ public interface ISearchClient Task GetRuleAsync(string indexName, string objectID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) + /// Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -768,9 +768,9 @@ public interface ISearchClient Rule GetRule(string indexName, string objectID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + /// Retrieves an object with non-null index settings. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -780,9 +780,9 @@ public interface ISearchClient Task GetSettingsAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). (Synchronous version) + /// Retrieves an object with non-null index settings. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -792,7 +792,7 @@ public interface ISearchClient IndexSettings GetSettings(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get all allowed sources (IP addresses). + /// Retrieves all allowed IP addresses with access to your application. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -803,7 +803,7 @@ public interface ISearchClient Task> GetSourcesAsync(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get all allowed sources (IP addresses). (Synchronous version) + /// Retrieves all allowed IP addresses with access to your application. (Synchronous version) /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -814,9 +814,9 @@ public interface ISearchClient List GetSources(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + /// Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -827,9 +827,9 @@ public interface ISearchClient Task GetSynonymAsync(string indexName, string objectID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) + /// Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -840,9 +840,9 @@ public interface ISearchClient SynonymHit GetSynonym(string indexName, string objectID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + /// Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique task identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -853,9 +853,9 @@ public interface ISearchClient Task GetTaskAsync(string indexName, long taskID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. (Synchronous version) + /// Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique task identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -866,7 +866,7 @@ public interface ISearchClient GetTaskResponse GetTask(string indexName, long taskID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -877,7 +877,7 @@ public interface ISearchClient Task GetTopUserIdsAsync(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) + /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -888,9 +888,9 @@ public interface ISearchClient GetTopUserIdsResponse GetTopUserIds(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -900,9 +900,9 @@ public interface ISearchClient Task GetUserIdAsync(string userID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) + /// Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) /// - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -914,7 +914,7 @@ public interface ISearchClient /// /// To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process. /// - /// Indicates whether to include the cluster's pending mapping state in the response. (optional) + /// Whether to include the cluster's pending mapping state in the response. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -926,7 +926,7 @@ public interface ISearchClient /// /// To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process. (Synchronous version) /// - /// Indicates whether to include the cluster's pending mapping state in the response. (optional) + /// Whether to include the cluster's pending mapping state in the response. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -936,7 +936,7 @@ public interface ISearchClient HasPendingMappingsResponse HasPendingMappings(bool? getClusters = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List all API keys associated with your Algolia application, including their permissions and restrictions. + /// Lists all API keys associated with your Algolia application, including their permissions and restrictions. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -947,7 +947,7 @@ public interface ISearchClient Task ListApiKeysAsync(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List all API keys associated with your Algolia application, including their permissions and restrictions. (Synchronous version) + /// Lists all API keys associated with your Algolia application, including their permissions and restrictions. (Synchronous version) /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -958,7 +958,7 @@ public interface ISearchClient ListApiKeysResponse ListApiKeys(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List the available clusters in a multi-cluster setup. + /// Lists the available clusters in a multi-cluster setup. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -969,7 +969,7 @@ public interface ISearchClient Task ListClustersAsync(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List the available clusters in a multi-cluster setup. (Synchronous version) + /// Lists the available clusters in a multi-cluster setup. (Synchronous version) /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -980,10 +980,10 @@ public interface ISearchClient ListClustersResponse ListClusters(RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List indices in an Algolia application. + /// Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. /// - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -993,10 +993,10 @@ public interface ISearchClient Task ListIndicesAsync(int? page = default, int? hitsPerPage = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List indices in an Algolia application. (Synchronous version) + /// Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. (Synchronous version) /// - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1006,10 +1006,10 @@ public interface ISearchClient ListIndicesResponse ListIndices(int? page = default, int? hitsPerPage = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1019,10 +1019,10 @@ public interface ISearchClient Task ListUserIdsAsync(int? page = default, int? hitsPerPage = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) + /// Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) /// - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1032,7 +1032,7 @@ public interface ISearchClient ListUserIdsResponse ListUserIds(int? page = default, int? hitsPerPage = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + /// Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. /// /// /// Add extra http header or query parameters to Algolia. @@ -1044,7 +1044,7 @@ public interface ISearchClient Task MultipleBatchAsync(BatchParams batchParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. (Synchronous version) + /// Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. (Synchronous version) /// /// /// Add extra http header or query parameters to Algolia. @@ -1056,9 +1056,9 @@ public interface ISearchClient MultipleBatchResponse MultipleBatch(BatchParams batchParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + /// Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1069,9 +1069,9 @@ public interface ISearchClient Task OperationIndexAsync(string indexName, OperationIndexParams operationIndexParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). (Synchronous version) + /// Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1082,12 +1082,12 @@ public interface ISearchClient UpdatedAtResponse OperationIndex(string indexName, OperationIndexParams operationIndexParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + /// Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. /// - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Object with attributes to update. - /// Indicates whether to create a new record if it doesn't exist yet. (optional, default to true) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes with their values. + /// Whether to create a new record if it doesn't exist. (optional, default to true) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1097,12 +1097,12 @@ public interface ISearchClient Task PartialUpdateObjectAsync(string indexName, string objectID, Dictionary attributesToUpdate, bool? createIfNotExists = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. (Synchronous version) + /// Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. (Synchronous version) /// - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Object with attributes to update. - /// Indicates whether to create a new record if it doesn't exist yet. (optional, default to true) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes with their values. + /// Whether to create a new record if it doesn't exist. (optional, default to true) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1112,9 +1112,9 @@ public interface ISearchClient UpdatedAtWithObjectIdResponse PartialUpdateObject(string indexName, string objectID, Dictionary attributesToUpdate, bool? createIfNotExists = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Remove a userID and its associated data from the multi-clusters. + /// Deletes a user ID and its associated data from the clusters. /// - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1124,9 +1124,9 @@ public interface ISearchClient Task RemoveUserIdAsync(string userID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Remove a userID and its associated data from the multi-clusters. (Synchronous version) + /// Deletes a user ID and its associated data from the clusters. (Synchronous version) /// - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1136,7 +1136,7 @@ public interface ISearchClient RemoveUserIdResponse RemoveUserId(string userID, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Replace all allowed sources. + /// Replaces the list of allowed sources. /// /// Allowed sources. /// Add extra http header or query parameters to Algolia. @@ -1148,7 +1148,7 @@ public interface ISearchClient Task ReplaceSourcesAsync(List varSource, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Replace all allowed sources. (Synchronous version) + /// Replaces the list of allowed sources. (Synchronous version) /// /// Allowed sources. /// Add extra http header or query parameters to Algolia. @@ -1160,7 +1160,7 @@ public interface ISearchClient ReplaceSourceResponse ReplaceSources(List varSource, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + /// Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -1172,7 +1172,7 @@ public interface ISearchClient Task RestoreApiKeyAsync(string key, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. (Synchronous version) + /// Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. (Synchronous version) /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -1184,10 +1184,10 @@ public interface ISearchClient AddApiKeyResponse RestoreApiKey(string key, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + /// Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). /// - /// Index on which to perform the request. - /// The Algolia record. + /// Name of the index on which to perform the operation. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1197,10 +1197,10 @@ public interface ISearchClient Task SaveObjectAsync(string indexName, object body, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) + /// Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) /// - /// Index on which to perform the request. - /// The Algolia record. + /// Name of the index on which to perform the operation. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1210,12 +1210,12 @@ public interface ISearchClient SaveObjectResponse SaveObject(string indexName, object body, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + /// If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1225,12 +1225,12 @@ public interface ISearchClient Task SaveRuleAsync(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). (Synchronous version) + /// If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1240,12 +1240,12 @@ public interface ISearchClient UpdatedRuleResponse SaveRule(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Create or update multiple rules. + /// Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether existing rules should be deleted before adding this batch. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether existing rules should be deleted before adding this batch. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1255,12 +1255,12 @@ public interface ISearchClient Task SaveRulesAsync(string indexName, List rules, bool? forwardToReplicas = default, bool? clearExistingRules = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Create or update multiple rules. (Synchronous version) + /// Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether existing rules should be deleted before adding this batch. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether existing rules should be deleted before adding this batch. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1270,12 +1270,12 @@ public interface ISearchClient UpdatedAtResponse SaveRules(string indexName, List rules, bool? forwardToReplicas = default, bool? clearExistingRules = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + /// If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1285,12 +1285,12 @@ public interface ISearchClient Task SaveSynonymAsync(string indexName, string objectID, SynonymHit synonymHit, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). (Synchronous version) + /// If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1300,12 +1300,12 @@ public interface ISearchClient SaveSynonymResponse SaveSynonym(string indexName, string objectID, SynonymHit synonymHit, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Create or update multiple synonyms. + /// If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether to replace all synonyms in the index with the ones sent with this request. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether to replace all synonyms in the index with the ones sent with this request. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1315,12 +1315,12 @@ public interface ISearchClient Task SaveSynonymsAsync(string indexName, List synonymHit, bool? forwardToReplicas = default, bool? replaceExistingSynonyms = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Create or update multiple synonyms. (Synchronous version) + /// If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether to replace all synonyms in the index with the ones sent with this request. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether to replace all synonyms in the index with the ones sent with this request. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1330,9 +1330,9 @@ public interface ISearchClient UpdatedAtResponse SaveSynonyms(string indexName, List synonymHit, bool? forwardToReplicas = default, bool? replaceExistingSynonyms = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Send multiple search queries to one or more indices. + /// Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. /// - /// Query requests and strategies. Results will be received in the same order as the queries. + /// Muli-search request body. Results are returned in the same order as the requests. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1342,9 +1342,9 @@ public interface ISearchClient Task> SearchAsync(SearchMethodParams searchMethodParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Send multiple search queries to one or more indices. (Synchronous version) + /// Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. (Synchronous version) /// - /// Query requests and strategies. Results will be received in the same order as the queries. + /// Muli-search request body. Results are returned in the same order as the requests. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1354,36 +1354,36 @@ public interface ISearchClient SearchResponses Search(SearchMethodParams searchMethodParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + /// Searches for standard and custom dictionary entries. /// - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of UpdatedAtResponse - Task SearchDictionaryEntriesAsync(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default); + /// Task of SearchDictionaryEntriesResponse + Task SearchDictionaryEntriesAsync(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. (Synchronous version) + /// Searches for standard and custom dictionary entries. (Synchronous version) /// - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// UpdatedAtResponse - UpdatedAtResponse SearchDictionaryEntries(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default); + /// SearchDictionaryEntriesResponse + SearchDictionaryEntriesResponse SearchDictionaryEntries(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + /// Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. /// - /// Index on which to perform the request. - /// Facet name. + /// Name of the index on which to perform the operation. + /// Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1394,10 +1394,10 @@ public interface ISearchClient Task SearchForFacetValuesAsync(string indexName, string facetName, SearchForFacetValuesRequest searchForFacetValuesRequest = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. (Synchronous version) + /// Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. (Synchronous version) /// - /// Index on which to perform the request. - /// Facet name. + /// Name of the index on which to perform the operation. + /// Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1408,9 +1408,9 @@ public interface ISearchClient SearchForFacetValuesResponse SearchForFacetValues(string indexName, string facetName, SearchForFacetValuesRequest searchForFacetValuesRequest = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + /// Searches for rules in your index. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1421,9 +1421,9 @@ public interface ISearchClient Task SearchRulesAsync(string indexName, SearchRulesParams searchRulesParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. (Synchronous version) + /// Searches for rules in your index. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1434,9 +1434,9 @@ public interface ISearchClient SearchRulesResponse SearchRules(string indexName, SearchRulesParams searchRulesParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Return records that match the query. + /// Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1447,9 +1447,9 @@ public interface ISearchClient Task> SearchSingleIndexAsync(string indexName, SearchParams searchParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Return records that match the query. (Synchronous version) + /// Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1460,9 +1460,9 @@ public interface ISearchClient SearchResponse SearchSingleIndex(string indexName, SearchParams searchParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + /// Searches for synonyms in your index. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Body of the `searchSynonyms` operation. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1473,9 +1473,9 @@ public interface ISearchClient Task SearchSynonymsAsync(string indexName, SearchSynonymsParams searchSynonymsParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. (Synchronous version) + /// Searches for synonyms in your index. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Body of the `searchSynonyms` operation. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1486,7 +1486,7 @@ public interface ISearchClient SearchSynonymsResponse SearchSynonyms(string indexName, SearchSynonymsParams searchSynonymsParams = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + /// Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). /// /// /// Add extra http header or query parameters to Algolia. @@ -1498,7 +1498,7 @@ public interface ISearchClient Task SearchUserIdsAsync(SearchUserIdsParams searchUserIdsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). (Synchronous version) + /// Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). (Synchronous version) /// /// /// Add extra http header or query parameters to Algolia. @@ -1510,7 +1510,7 @@ public interface ISearchClient SearchUserIdsResponse SearchUserIds(SearchUserIdsParams searchUserIdsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Set stop word settings for a specific language. + /// Turns standard stop word dictionary entries on or off for a given language. /// /// /// Add extra http header or query parameters to Algolia. @@ -1522,7 +1522,7 @@ public interface ISearchClient Task SetDictionarySettingsAsync(DictionarySettingsParams dictionarySettingsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Set stop word settings for a specific language. (Synchronous version) + /// Turns standard stop word dictionary entries on or off for a given language. (Synchronous version) /// /// /// Add extra http header or query parameters to Algolia. @@ -1534,11 +1534,11 @@ public interface ISearchClient UpdatedAtResponse SetDictionarySettings(DictionarySettingsParams dictionarySettingsParams, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + /// Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1548,11 +1548,11 @@ public interface ISearchClient Task SetSettingsAsync(string indexName, IndexSettings indexSettings, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. (Synchronous version) + /// Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1562,7 +1562,7 @@ public interface ISearchClient UpdatedAtResponse SetSettings(string indexName, IndexSettings indexSettings, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + /// Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. /// /// API key. /// @@ -1575,7 +1575,7 @@ public interface ISearchClient Task UpdateApiKeyAsync(string key, ApiKey apiKey, RequestOptions options = null, CancellationToken cancellationToken = default); /// - /// Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. (Synchronous version) + /// Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. (Synchronous version) /// /// API key. /// @@ -1656,7 +1656,7 @@ public SearchClient(SearchConfig config, IHttpRequester httpRequester, ILoggerFa /// - /// Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + /// Creates a new API key with specific permissions and restrictions. /// /// /// Required API Key ACLs: @@ -1683,7 +1683,7 @@ public async Task AddApiKeyAsync(ApiKey apiKey, RequestOption /// - /// Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. (Synchronous version) + /// Creates a new API key with specific permissions and restrictions. (Synchronous version) /// /// /// Required API Key ACLs: @@ -1700,14 +1700,14 @@ public AddApiKeyResponse AddApiKey(ApiKey apiKey, RequestOptions options = null, /// - /// If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + /// If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Algolia record. + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1739,14 +1739,14 @@ public async Task AddOrUpdateObjectAsync(string i /// - /// If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) + /// If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Algolia record. + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -1758,7 +1758,7 @@ public UpdatedAtWithObjectIdResponse AddOrUpdateObject(string indexName, string /// - /// Add a source to the list of allowed sources. + /// Adds a source to the list of allowed sources. /// /// /// Required API Key ACLs: @@ -1785,7 +1785,7 @@ public async Task AppendSourceAsync(Source varSource, Request /// - /// Add a source to the list of allowed sources. (Synchronous version) + /// Adds a source to the list of allowed sources. (Synchronous version) /// /// /// Required API Key ACLs: @@ -1802,12 +1802,12 @@ public CreatedAtResponse AppendSource(Source varSource, RequestOptions options = /// - /// Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + /// Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1835,12 +1835,12 @@ public async Task AssignUserIdAsync(string xAlgoliaUserID, As /// - /// Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. (Synchronous version) + /// Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. (Synchronous version) /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1853,9 +1853,9 @@ public CreatedAtResponse AssignUserId(string xAlgoliaUserID, AssignUserIdParams /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + /// Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1883,9 +1883,9 @@ public async Task BatchAsync(string indexName, BatchWriteParams b /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. (Synchronous version) + /// Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. (Synchronous version) /// - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1898,12 +1898,12 @@ public BatchResponse Batch(string indexName, BatchWriteParams batchWriteParams, /// - /// Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + /// Assigns multiple user IDs to a cluster. **You can't move users with this operation**. /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1931,12 +1931,12 @@ public async Task BatchAssignUserIdsAsync(string xAlgoliaUser /// - /// Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. (Synchronous version) + /// Assigns multiple user IDs to a cluster. **You can't move users with this operation**. (Synchronous version) /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1949,12 +1949,12 @@ public CreatedAtResponse BatchAssignUserIds(string xAlgoliaUserID, BatchAssignUs /// - /// Add or remove a batch of dictionary entries. + /// Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. /// /// /// Required API Key ACLs: /// - editSettings - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1979,12 +1979,12 @@ public async Task BatchDictionaryEntriesAsync(DictionaryType /// - /// Add or remove a batch of dictionary entries. (Synchronous version) + /// Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -1997,12 +1997,12 @@ public UpdatedAtResponse BatchDictionaryEntries(DictionaryType dictionaryName, B /// - /// Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + /// Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. /// /// /// Required API Key ACLs: /// - browse - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -2026,12 +2026,12 @@ public async Task> BrowseAsync(string indexName, BrowsePara /// - /// Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. (Synchronous version) + /// Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. (Synchronous version) /// /// /// Required API Key ACLs: /// - browse - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -2044,12 +2044,12 @@ public BrowseResponse Browse(string indexName, BrowseParams browseParams = /// - /// Delete the records but leave settings and index-specific API keys untouched. + /// Deletes only the records from an index while keeping settings, synonyms, and rules. /// /// /// Required API Key ACLs: /// - deleteIndex - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2071,12 +2071,12 @@ public async Task ClearObjectsAsync(string indexName, Request /// - /// Delete the records but leave settings and index-specific API keys untouched. (Synchronous version) + /// Deletes only the records from an index while keeping settings, synonyms, and rules. (Synchronous version) /// /// /// Required API Key ACLs: /// - deleteIndex - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2088,13 +2088,13 @@ public UpdatedAtResponse ClearObjects(string indexName, RequestOptions options = /// - /// Delete all rules in the index. + /// Deletes all rules from the index. /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2117,13 +2117,13 @@ public async Task ClearRulesAsync(string indexName, bool? for /// - /// Delete all rules in the index. (Synchronous version) + /// Deletes all rules from the index. (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2135,13 +2135,13 @@ public UpdatedAtResponse ClearRules(string indexName, bool? forwardToReplicas = /// - /// Delete all synonyms in the index. + /// Deletes all synonyms from the index. /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2164,13 +2164,13 @@ public async Task ClearSynonymsAsync(string indexName, bool? /// - /// Delete all synonyms in the index. (Synchronous version) + /// Deletes all synonyms from the index. (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Name of the index on which to perform the operation. + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2348,7 +2348,7 @@ public object CustomPut(string path, Dictionary parameters = def /// - /// Delete an existing API key. The request must be authenticated with the admin API key. + /// Deletes the API key. /// /// /// Required API Key ACLs: @@ -2375,7 +2375,7 @@ public async Task DeleteApiKeyAsync(string key, RequestOpt /// - /// Delete an existing API key. The request must be authenticated with the admin API key. (Synchronous version) + /// Deletes the API key. (Synchronous version) /// /// /// Required API Key ACLs: @@ -2392,12 +2392,12 @@ public DeleteApiKeyResponse DeleteApiKey(string key, RequestOptions options = nu /// - /// This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + /// This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). /// /// /// Required API Key ACLs: /// - deleteIndex - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -2425,12 +2425,12 @@ public async Task DeleteByAsync(string indexName, DeleteByPar /// - /// This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. (Synchronous version) + /// This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). (Synchronous version) /// /// /// Required API Key ACLs: /// - deleteIndex - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -2443,12 +2443,12 @@ public DeletedAtResponse DeleteBy(string indexName, DeleteByParams deleteByParam /// - /// Delete an existing index. + /// Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). /// /// /// Required API Key ACLs: /// - deleteIndex - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2470,12 +2470,12 @@ public async Task DeleteIndexAsync(string indexName, RequestO /// - /// Delete an existing index. (Synchronous version) + /// Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). (Synchronous version) /// /// /// Required API Key ACLs: /// - deleteIndex - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2487,13 +2487,13 @@ public DeletedAtResponse DeleteIndex(string indexName, RequestOptions options = /// - /// To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + /// Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). /// /// /// Required API Key ACLs: /// - deleteObject - /// Index on which to perform the request. - /// Unique record (object) identifier. + /// Name of the index on which to perform the operation. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2520,13 +2520,13 @@ public async Task DeleteObjectAsync(string indexName, string /// - /// To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. (Synchronous version) + /// Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). (Synchronous version) /// /// /// Required API Key ACLs: /// - deleteObject - /// Index on which to perform the request. - /// Unique record (object) identifier. + /// Name of the index on which to perform the operation. + /// Unique record identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2538,14 +2538,14 @@ public DeletedAtResponse DeleteObject(string indexName, string objectID, Request /// - /// Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + /// Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2573,14 +2573,14 @@ public async Task DeleteRuleAsync(string indexName, string ob /// - /// Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) + /// Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2592,7 +2592,7 @@ public UpdatedAtResponse DeleteRule(string indexName, string objectID, bool? for /// - /// Remove a source from the list of allowed sources. + /// Deletes a source from the list of allowed sources. /// /// /// Required API Key ACLs: @@ -2619,7 +2619,7 @@ public async Task DeleteSourceAsync(string varSource, Requ /// - /// Remove a source from the list of allowed sources. (Synchronous version) + /// Deletes a source from the list of allowed sources. (Synchronous version) /// /// /// Required API Key ACLs: @@ -2636,14 +2636,14 @@ public DeleteSourceResponse DeleteSource(string varSource, RequestOptions option /// - /// Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + /// Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2671,14 +2671,14 @@ public async Task DeleteSynonymAsync(string indexName, string /// - /// Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) + /// Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2690,7 +2690,7 @@ public DeletedAtResponse DeleteSynonym(string indexName, string objectID, bool? /// - /// Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + /// Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -2714,7 +2714,7 @@ public async Task GetApiKeyAsync(string key, RequestOptions o /// - /// Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. (Synchronous version) + /// Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. (Synchronous version) /// /// API key. /// Add extra http header or query parameters to Algolia. @@ -2728,7 +2728,7 @@ public GetApiKeyResponse GetApiKey(string key, RequestOptions options = null, Ca /// - /// Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + /// Lists supported languages with their supported dictionary types and number of custom entries. /// /// /// Required API Key ACLs: @@ -2749,7 +2749,7 @@ public async Task> GetDictionaryLanguagesAsync(Req /// - /// Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. (Synchronous version) + /// Lists supported languages with their supported dictionary types and number of custom entries. (Synchronous version) /// /// /// Required API Key ACLs: @@ -2765,7 +2765,7 @@ public Dictionary GetDictionaryLanguages(RequestOptions optio /// - /// Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + /// Retrieves the languages for which standard dictionary entries are turned off. /// /// /// Required API Key ACLs: @@ -2786,7 +2786,7 @@ public async Task GetDictionarySettingsAsync(Requ /// - /// Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). (Synchronous version) + /// Retrieves the languages for which standard dictionary entries are turned off. (Synchronous version) /// /// /// Required API Key ACLs: @@ -2802,15 +2802,15 @@ public GetDictionarySettingsResponse GetDictionarySettings(RequestOptions option /// - /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. /// /// /// Required API Key ACLs: /// - logs - /// First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (optional, default to 0) + /// First log entry to retrieve. The most recent entries are listed first. (optional, default to 0) /// Maximum number of entries to retrieve. (optional, default to 10) - /// Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. (optional) - /// Type of log entries to retrieve. When omitted, all log entries are retrieved. (optional) + /// Index for which to retrieve log entries. By default, log entries are retrieved for all indices. (optional) + /// Type of log entries to retrieve. By default, all log entries are retrieved. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2831,15 +2831,15 @@ public async Task GetLogsAsync(int? offset = default, int? leng /// - /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). (Synchronous version) + /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. (Synchronous version) /// /// /// Required API Key ACLs: /// - logs - /// First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (optional, default to 0) + /// First log entry to retrieve. The most recent entries are listed first. (optional, default to 0) /// Maximum number of entries to retrieve. (optional, default to 10) - /// Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. (optional) - /// Type of log entries to retrieve. When omitted, all log entries are retrieved. (optional) + /// Index for which to retrieve log entries. By default, log entries are retrieved for all indices. (optional) + /// Type of log entries to retrieve. By default, all log entries are retrieved. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2851,14 +2851,14 @@ public GetLogsResponse GetLogs(int? offset = default, int? length = default, str /// - /// To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + /// Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. (optional) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2886,14 +2886,14 @@ public async Task> GetObjectAsync(string indexName, s /// - /// To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). (Synchronous version) + /// Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). (Synchronous version) /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. (optional) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -2905,7 +2905,7 @@ public Dictionary GetObject(string indexName, string objectID, L /// - /// Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + /// Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. /// /// /// Required API Key ACLs: @@ -2933,7 +2933,7 @@ public async Task> GetObjectsAsync(GetObjectsParams get /// - /// Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. (Synchronous version) + /// Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. (Synchronous version) /// /// /// Required API Key ACLs: @@ -2950,12 +2950,12 @@ public GetObjectsResponse GetObjects(GetObjectsParams getObjectsParams, Re /// - /// Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + /// Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -2983,12 +2983,12 @@ public async Task GetRuleAsync(string indexName, string objectID, RequestO /// - /// Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) + /// Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). (Synchronous version) /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -3001,12 +3001,12 @@ public Rule GetRule(string indexName, string objectID, RequestOptions options = /// - /// Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + /// Retrieves an object with non-null index settings. /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3028,12 +3028,12 @@ public async Task GetSettingsAsync(string indexName, RequestOptio /// - /// Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). (Synchronous version) + /// Retrieves an object with non-null index settings. (Synchronous version) /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3045,7 +3045,7 @@ public IndexSettings GetSettings(string indexName, RequestOptions options = null /// - /// Get all allowed sources (IP addresses). + /// Retrieves all allowed IP addresses with access to your application. /// /// /// Required API Key ACLs: @@ -3066,7 +3066,7 @@ public async Task> GetSourcesAsync(RequestOptions options = null, C /// - /// Get all allowed sources (IP addresses). (Synchronous version) + /// Retrieves all allowed IP addresses with access to your application. (Synchronous version) /// /// /// Required API Key ACLs: @@ -3082,12 +3082,12 @@ public List GetSources(RequestOptions options = null, CancellationToken /// - /// Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + /// Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -3115,12 +3115,12 @@ public async Task GetSynonymAsync(string indexName, string objectID, /// - /// Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) + /// Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). (Synchronous version) /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -3133,12 +3133,12 @@ public SynonymHit GetSynonym(string indexName, string objectID, RequestOptions o /// - /// Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + /// Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique task identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -3163,12 +3163,12 @@ public async Task GetTaskAsync(string indexName, long taskID, R /// - /// Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. (Synchronous version) + /// Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. (Synchronous version) /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique task identifier. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -3181,7 +3181,7 @@ public GetTaskResponse GetTask(string indexName, long taskID, RequestOptions opt /// - /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// /// /// Required API Key ACLs: @@ -3202,7 +3202,7 @@ public async Task GetTopUserIdsAsync(RequestOptions optio /// - /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) + /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) /// /// /// Required API Key ACLs: @@ -3218,12 +3218,12 @@ public GetTopUserIdsResponse GetTopUserIds(RequestOptions options = null, Cancel /// - /// Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3245,12 +3245,12 @@ public async Task GetUserIdAsync(string userID, RequestOptions options = /// - /// Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) + /// Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3267,7 +3267,7 @@ public UserId GetUserId(string userID, RequestOptions options = null, Cancellati /// /// Required API Key ACLs: /// - admin - /// Indicates whether to include the cluster's pending mapping state in the response. (optional) + /// Whether to include the cluster's pending mapping state in the response. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3290,7 +3290,7 @@ public async Task HasPendingMappingsAsync(bool? getC /// /// Required API Key ACLs: /// - admin - /// Indicates whether to include the cluster's pending mapping state in the response. (optional) + /// Whether to include the cluster's pending mapping state in the response. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3302,7 +3302,7 @@ public HasPendingMappingsResponse HasPendingMappings(bool? getClusters = default /// - /// List all API keys associated with your Algolia application, including their permissions and restrictions. + /// Lists all API keys associated with your Algolia application, including their permissions and restrictions. /// /// /// Required API Key ACLs: @@ -3323,7 +3323,7 @@ public async Task ListApiKeysAsync(RequestOptions options = /// - /// List all API keys associated with your Algolia application, including their permissions and restrictions. (Synchronous version) + /// Lists all API keys associated with your Algolia application, including their permissions and restrictions. (Synchronous version) /// /// /// Required API Key ACLs: @@ -3339,7 +3339,7 @@ public ListApiKeysResponse ListApiKeys(RequestOptions options = null, Cancellati /// - /// List the available clusters in a multi-cluster setup. + /// Lists the available clusters in a multi-cluster setup. /// /// /// Required API Key ACLs: @@ -3360,7 +3360,7 @@ public async Task ListClustersAsync(RequestOptions options /// - /// List the available clusters in a multi-cluster setup. (Synchronous version) + /// Lists the available clusters in a multi-cluster setup. (Synchronous version) /// /// /// Required API Key ACLs: @@ -3376,13 +3376,13 @@ public ListClustersResponse ListClusters(RequestOptions options = null, Cancella /// - /// List indices in an Algolia application. + /// Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. /// /// /// Required API Key ACLs: /// - listIndexes - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3401,13 +3401,13 @@ public async Task ListIndicesAsync(int? page = default, int /// - /// List indices in an Algolia application. (Synchronous version) + /// Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. (Synchronous version) /// /// /// Required API Key ACLs: /// - listIndexes - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3419,13 +3419,13 @@ public ListIndicesResponse ListIndices(int? page = default, int? hitsPerPage = d /// - /// List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// /// /// Required API Key ACLs: /// - admin - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3444,13 +3444,13 @@ public async Task ListUserIdsAsync(int? page = default, int /// - /// List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) + /// Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. (Synchronous version) /// /// /// Required API Key ACLs: /// - admin - /// Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - /// Maximum number of hits per page. (optional, default to 100) + /// Requested page of the API response. If `null`, the API response is not paginated. (optional) + /// Number of hits per page. (optional, default to 100) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3462,7 +3462,7 @@ public ListUserIdsResponse ListUserIds(int? page = default, int? hitsPerPage = d /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + /// Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. /// /// /// Add extra http header or query parameters to Algolia. @@ -3486,7 +3486,7 @@ public async Task MultipleBatchAsync(BatchParams batchPar /// - /// To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. (Synchronous version) + /// Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. (Synchronous version) /// /// /// Add extra http header or query parameters to Algolia. @@ -3500,12 +3500,12 @@ public MultipleBatchResponse MultipleBatch(BatchParams batchParams, RequestOptio /// - /// This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + /// Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -3533,12 +3533,12 @@ public async Task OperationIndexAsync(string indexName, Opera /// - /// This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). (Synchronous version) + /// Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). (Synchronous version) /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -3551,15 +3551,15 @@ public UpdatedAtResponse OperationIndex(string indexName, OperationIndexParams o /// - /// Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + /// Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Object with attributes to update. - /// Indicates whether to create a new record if it doesn't exist yet. (optional, default to true) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes with their values. + /// Whether to create a new record if it doesn't exist. (optional, default to true) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3592,15 +3592,15 @@ public async Task PartialUpdateObjectAsync(string /// - /// Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. (Synchronous version) + /// Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. (Synchronous version) /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. - /// Unique record (object) identifier. - /// Object with attributes to update. - /// Indicates whether to create a new record if it doesn't exist yet. (optional, default to true) + /// Name of the index on which to perform the operation. + /// Unique record identifier. + /// Attributes with their values. + /// Whether to create a new record if it doesn't exist. (optional, default to true) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3612,12 +3612,12 @@ public UpdatedAtWithObjectIdResponse PartialUpdateObject(string indexName, strin /// - /// Remove a userID and its associated data from the multi-clusters. + /// Deletes a user ID and its associated data from the clusters. /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3639,12 +3639,12 @@ public async Task RemoveUserIdAsync(string userID, Request /// - /// Remove a userID and its associated data from the multi-clusters. (Synchronous version) + /// Deletes a user ID and its associated data from the clusters. (Synchronous version) /// /// /// Required API Key ACLs: /// - admin - /// userID to assign. + /// User ID to assign. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3656,7 +3656,7 @@ public RemoveUserIdResponse RemoveUserId(string userID, RequestOptions options = /// - /// Replace all allowed sources. + /// Replaces the list of allowed sources. /// /// /// Required API Key ACLs: @@ -3683,7 +3683,7 @@ public async Task ReplaceSourcesAsync(List varSou /// - /// Replace all allowed sources. (Synchronous version) + /// Replaces the list of allowed sources. (Synchronous version) /// /// /// Required API Key ACLs: @@ -3700,7 +3700,7 @@ public ReplaceSourceResponse ReplaceSources(List varSource, RequestOptio /// - /// Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + /// Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. /// /// /// Required API Key ACLs: @@ -3727,7 +3727,7 @@ public async Task RestoreApiKeyAsync(string key, RequestOptio /// - /// Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. (Synchronous version) + /// Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. (Synchronous version) /// /// /// Required API Key ACLs: @@ -3744,13 +3744,13 @@ public AddApiKeyResponse RestoreApiKey(string key, RequestOptions options = null /// - /// Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + /// Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. - /// The Algolia record. + /// Name of the index on which to perform the operation. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3777,13 +3777,13 @@ public async Task SaveObjectAsync(string indexName, object b /// - /// Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) + /// Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). (Synchronous version) /// /// /// Required API Key ACLs: /// - addObject - /// Index on which to perform the request. - /// The Algolia record. + /// Name of the index on which to perform the operation. + /// The record, a schemaless object with attributes that are useful in the context of search and discovery. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3795,15 +3795,15 @@ public SaveObjectResponse SaveObject(string indexName, object body, RequestOptio /// - /// To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + /// If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3836,15 +3836,15 @@ public async Task SaveRuleAsync(string indexName, string ob /// - /// To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). (Synchronous version) + /// If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a rule object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3856,15 +3856,15 @@ public UpdatedRuleResponse SaveRule(string indexName, string objectID, Rule rule /// - /// Create or update multiple rules. + /// Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether existing rules should be deleted before adding this batch. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether existing rules should be deleted before adding this batch. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3893,15 +3893,15 @@ public async Task SaveRulesAsync(string indexName, List /// - /// Create or update multiple rules. (Synchronous version) + /// Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether existing rules should be deleted before adding this batch. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether existing rules should be deleted before adding this batch. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3913,15 +3913,15 @@ public UpdatedAtResponse SaveRules(string indexName, List rules, bool? for /// - /// Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + /// If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3954,15 +3954,15 @@ public async Task SaveSynonymAsync(string indexName, string /// - /// Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). (Synchronous version) + /// If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Unique identifier of a synonym object. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -3974,15 +3974,15 @@ public SaveSynonymResponse SaveSynonym(string indexName, string objectID, Synony /// - /// Create or update multiple synonyms. + /// If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether to replace all synonyms in the index with the ones sent with this request. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether to replace all synonyms in the index with the ones sent with this request. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -4011,15 +4011,15 @@ public async Task SaveSynonymsAsync(string indexName, List - /// Create or update multiple synonyms. (Synchronous version) + /// If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) - /// Indicates whether to replace all synonyms in the index with the ones sent with this request. (optional) + /// Whether changes are applied to replica indices. (optional) + /// Whether to replace all synonyms in the index with the ones sent with this request. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -4031,12 +4031,12 @@ public UpdatedAtResponse SaveSynonyms(string indexName, List synonym /// - /// Send multiple search queries to one or more indices. + /// Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. /// /// /// Required API Key ACLs: /// - search - /// Query requests and strategies. Results will be received in the same order as the queries. + /// Muli-search request body. Results are returned in the same order as the requests. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -4059,12 +4059,12 @@ public async Task> SearchAsync(SearchMethodParams searchMe /// - /// Send multiple search queries to one or more indices. (Synchronous version) + /// Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. (Synchronous version) /// /// /// Required API Key ACLs: /// - search - /// Query requests and strategies. Results will be received in the same order as the queries. + /// Muli-search request body. Results are returned in the same order as the requests. /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -4076,20 +4076,20 @@ public SearchResponses Search(SearchMethodParams searchMethodParams, Reque /// - /// Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + /// Searches for standard and custom dictionary entries. /// /// /// Required API Key ACLs: /// - settings - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of UpdatedAtResponse - public async Task SearchDictionaryEntriesAsync(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default) + /// Task of SearchDictionaryEntriesResponse + public async Task SearchDictionaryEntriesAsync(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default) { @@ -4102,36 +4102,36 @@ public async Task SearchDictionaryEntriesAsync(DictionaryType requestOptions.Data = searchDictionaryEntriesParams; requestOptions.UseReadTransporter = true; - return await _transport.ExecuteRequestAsync(new HttpMethod("POST"), "/1/dictionaries/{dictionaryName}/search", requestOptions, cancellationToken).ConfigureAwait(false); + return await _transport.ExecuteRequestAsync(new HttpMethod("POST"), "/1/dictionaries/{dictionaryName}/search", requestOptions, cancellationToken).ConfigureAwait(false); } /// - /// Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. (Synchronous version) + /// Searches for standard and custom dictionary entries. (Synchronous version) /// /// /// Required API Key ACLs: /// - settings - /// Dictionary to search in. + /// Dictionary type in which to search. /// /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// UpdatedAtResponse - public UpdatedAtResponse SearchDictionaryEntries(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default) => + /// SearchDictionaryEntriesResponse + public SearchDictionaryEntriesResponse SearchDictionaryEntries(DictionaryType dictionaryName, SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions options = null, CancellationToken cancellationToken = default) => AsyncHelper.RunSync(() => SearchDictionaryEntriesAsync(dictionaryName, searchDictionaryEntriesParams, options, cancellationToken)); /// - /// [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + /// Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. - /// Facet name. + /// Name of the index on which to perform the operation. + /// Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4161,13 +4161,13 @@ public async Task SearchForFacetValuesAsync(string /// - /// [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. (Synchronous version) + /// Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. (Synchronous version) /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. - /// Facet name. + /// Name of the index on which to perform the operation. + /// Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4180,12 +4180,12 @@ public SearchForFacetValuesResponse SearchForFacetValues(string indexName, strin /// - /// Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + /// Searches for rules in your index. /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4210,12 +4210,12 @@ public async Task SearchRulesAsync(string indexName, Search /// - /// Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. (Synchronous version) + /// Searches for rules in your index. (Synchronous version) /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4228,12 +4228,12 @@ public SearchRulesResponse SearchRules(string indexName, SearchRulesParams searc /// - /// Return records that match the query. + /// Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4258,12 +4258,12 @@ public async Task> SearchSingleIndexAsync(string indexName, /// - /// Return records that match the query. (Synchronous version) + /// Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. (Synchronous version) /// /// /// Required API Key ACLs: /// - search - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4276,12 +4276,12 @@ public SearchResponse SearchSingleIndex(string indexName, SearchParams sea /// - /// Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + /// Searches for synonyms in your index. /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Body of the `searchSynonyms` operation. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4306,12 +4306,12 @@ public async Task SearchSynonymsAsync(string indexName, /// - /// Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. (Synchronous version) + /// Searches for synonyms in your index. (Synchronous version) /// /// /// Required API Key ACLs: /// - settings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// Body of the `searchSynonyms` operation. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -4324,7 +4324,7 @@ public SearchSynonymsResponse SearchSynonyms(string indexName, SearchSynonymsPar /// - /// Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + /// Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). /// /// /// Required API Key ACLs: @@ -4352,7 +4352,7 @@ public async Task SearchUserIdsAsync(SearchUserIdsParams /// - /// Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). (Synchronous version) + /// Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). (Synchronous version) /// /// /// Required API Key ACLs: @@ -4369,7 +4369,7 @@ public SearchUserIdsResponse SearchUserIds(SearchUserIdsParams searchUserIdsPara /// - /// Set stop word settings for a specific language. + /// Turns standard stop word dictionary entries on or off for a given language. /// /// /// Required API Key ACLs: @@ -4396,7 +4396,7 @@ public async Task SetDictionarySettingsAsync(DictionarySettin /// - /// Set stop word settings for a specific language. (Synchronous version) + /// Turns standard stop word dictionary entries on or off for a given language. (Synchronous version) /// /// /// Required API Key ACLs: @@ -4413,14 +4413,14 @@ public UpdatedAtResponse SetDictionarySettings(DictionarySettingsParams dictiona /// - /// Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + /// Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -4448,14 +4448,14 @@ public async Task SetSettingsAsync(string indexName, IndexSet /// - /// Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. (Synchronous version) + /// Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. (Synchronous version) /// /// /// Required API Key ACLs: /// - editSettings - /// Index on which to perform the request. + /// Name of the index on which to perform the operation. /// - /// Indicates whether changed index settings are forwarded to the replica indices. (optional) + /// Whether changes are applied to replica indices. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct @@ -4467,7 +4467,7 @@ public UpdatedAtResponse SetSettings(string indexName, IndexSettings indexSettin /// - /// Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + /// Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. /// /// /// Required API Key ACLs: @@ -4500,7 +4500,7 @@ public async Task UpdateApiKeyAsync(string key, ApiKey api /// - /// Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. (Synchronous version) + /// Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. (Synchronous version) /// /// /// Required API Key ACLs: diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchConfiguration.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchConfiguration.cs index 32ab8f3da4..2983449e54 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchConfiguration.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchConfiguration.cs @@ -1,7 +1,7 @@ /* * Search API * -* Use the Search REST API to manage your data (indices and records), implement search, and improve relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use the official open source API [clients, libraries, and tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +* The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these headers:
x-algolia-application-id
Your Algolia application ID.
x-algolia-api-key
An API key with the necessary permissions to make the request. The required access control list (ACL) to make a request is listed in each endpoint's reference.
You can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT requests. Query parameters must be [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/ABTestResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/ABTestResponse.cs index 88b2f2ad0c..9029a86aaa 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/ABTestResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/ABTestResponse.cs @@ -26,7 +26,7 @@ public ABTestResponse() { } /// /// A/B test index. (required). /// Unique A/B test ID. (required). - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). public ABTestResponse(string index, int abTestID, long taskID) { Index = index ?? throw new ArgumentNullException(nameof(index)); @@ -49,9 +49,9 @@ public ABTestResponse(string index, int abTestID, long taskID) public int AbTestID { get; set; } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/SearchNoResultEvent.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/SearchNoResultEvent.cs index f78fcf46e0..7f45004ad0 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/SearchNoResultEvent.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/SearchNoResultEvent.cs @@ -26,7 +26,7 @@ public SearchNoResultEvent() { } /// /// User query. (required). /// Number of occurrences. (required). - /// Number of hits the search query matched. (required). + /// Number of results (hits). (required). public SearchNoResultEvent(string search, int count, int nbHits) { Search = search ?? throw new ArgumentNullException(nameof(search)); @@ -49,9 +49,9 @@ public SearchNoResultEvent(string search, int count, int nbHits) public int Count { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearch.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearch.cs index 964a1ca2e3..2a3719de0b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearch.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearch.cs @@ -26,7 +26,7 @@ public TopSearch() { } /// /// User query. (required). /// Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). (required). - /// Number of hits the search query matched. (required). + /// Number of results (hits). (required). public TopSearch(string search, int count, int nbHits) { Search = search ?? throw new ArgumentNullException(nameof(search)); @@ -49,9 +49,9 @@ public TopSearch(string search, int count, int nbHits) public int Count { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs index 8426707d3f..db48dc2838 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs @@ -32,7 +32,7 @@ public TopSearchWithAnalytics() { } /// Number of tracked searches. This is the number of search requests where the `clickAnalytics` parameter is `true`. (required). /// Number of click events. (required). /// Number of converted clicks. (required). - /// Number of hits the search query matched. (required). + /// Number of results (hits). (required). public TopSearchWithAnalytics(string search, int count, double clickThroughRate, int averageClickPosition, double conversionRate, int? trackedSearchCount, int clickCount, int conversionCount, int nbHits) { Search = search ?? throw new ArgumentNullException(nameof(search)); @@ -103,9 +103,9 @@ public TopSearchWithAnalytics(string search, int count, double clickThroughRate, public int ConversionCount { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Anchoring.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Anchoring.cs index cd809e3a77..5020b16b01 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Anchoring.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Anchoring.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. /// -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. public enum Anchoring { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs index 4c9890ee2d..e1be7844cf 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +/// Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. /// [JsonConverter(typeof(AroundPrecisionJsonConverter))] public partial class AroundPrecision : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecisionFromValueInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecisionFromValueInner.cs index 4e20abbd00..69ec54d5b3 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecisionFromValueInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecisionFromValueInner.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// AroundPrecisionFromValueInner +/// Range object with lower and upper values in meters to define custom ranges. /// public partial class AroundPrecisionFromValueInner { @@ -24,14 +24,16 @@ public AroundPrecisionFromValueInner() } /// - /// Gets or Sets From + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. /// + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. [JsonPropertyName("from")] public int? From { get; set; } /// - /// Gets or Sets Value + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. /// + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. [JsonPropertyName("value")] public int? Value { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadius.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadius.cs index 2614126abe..a6251c5754 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadius.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadius.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). +/// Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. /// [JsonConverter(typeof(AroundRadiusJsonConverter))] public partial class AroundRadius : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadiusAll.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadiusAll.cs index 7b6f72b28e..b8bec40579 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadiusAll.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundRadiusAll.cs @@ -12,8 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Defines aroundRadiusAll +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. /// +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. public enum AroundRadiusAll { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilter.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilter.cs index 83e44ba3dd..542618b816 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilter.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilter.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Automatic facet Filter. +/// Filter or optional filter to be applied to the search. /// public partial class AutomaticFacetFilter { @@ -24,30 +24,30 @@ public AutomaticFacetFilter() { } /// /// Initializes a new instance of the AutomaticFacetFilter class. /// - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. (required). + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. (required). public AutomaticFacetFilter(string facet) { Facet = facet ?? throw new ArgumentNullException(nameof(facet)); } /// - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. /// - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. [JsonPropertyName("facet")] public string Facet { get; set; } /// - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. /// - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. [JsonPropertyName("score")] public int? Score { get; set; } /// - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. /// - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. [JsonPropertyName("disjunctive")] public bool? Disjunctive { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilters.cs index 2a834fefd0..4e2382d945 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AutomaticFacetFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. +/// Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. /// [JsonConverter(typeof(AutomaticFacetFiltersJsonConverter))] public partial class AutomaticFacetFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendRequest.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendRequest.cs index d82babbd8f..2dc8e910c5 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendRequest.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendRequest.cs @@ -24,16 +24,16 @@ public BaseRecommendRequest() { } /// /// Initializes a new instance of the BaseRecommendRequest class. /// - /// Algolia index name. (required). + /// Index name. (required). public BaseRecommendRequest(string indexName) { IndexName = indexName ?? throw new ArgumentNullException(nameof(indexName)); } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendationsQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendationsQuery.cs index ceca8cc26d..7d4af8fb13 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendationsQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendationsQuery.cs @@ -31,7 +31,7 @@ public BaseRecommendationsQuery() { } /// Initializes a new instance of the BaseRecommendationsQuery class. /// /// model (required). - /// Unique object identifier. (required). + /// Unique record identifier. (required). public BaseRecommendationsQuery(RecommendationModels? model, string objectID) { Model = model; @@ -39,9 +39,9 @@ public BaseRecommendationsQuery(RecommendationModels? model, string objectID) } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendedForYouQueryParameters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendedForYouQueryParameters.cs index 09dffc861c..16960b8622 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendedForYouQueryParameters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseRecommendedForYouQueryParameters.cs @@ -24,16 +24,16 @@ public BaseRecommendedForYouQueryParameters() { } /// /// Initializes a new instance of the BaseRecommendedForYouQueryParameters class. /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. (required). + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). (required). public BaseRecommendedForYouQueryParameters(string userToken) { UserToken = userToken ?? throw new ArgumentNullException(nameof(userToken)); } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParams.cs index 098f7042d3..3e43410956 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParams.cs @@ -24,23 +24,23 @@ public BaseSearchParams() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -69,65 +69,65 @@ public BaseSearchParams() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -144,86 +144,79 @@ public BaseSearchParams() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -235,16 +228,16 @@ public BaseSearchParams() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } @@ -282,7 +275,6 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); @@ -341,7 +333,6 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && @@ -436,10 +427,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParamsWithoutQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParamsWithoutQuery.cs index 8cdbcd56d3..9182406f2e 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParamsWithoutQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchParamsWithoutQuery.cs @@ -24,16 +24,16 @@ public BaseSearchParamsWithoutQuery() } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -62,65 +62,65 @@ public BaseSearchParamsWithoutQuery() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -137,86 +137,79 @@ public BaseSearchParamsWithoutQuery() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -228,16 +221,16 @@ public BaseSearchParamsWithoutQuery() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } @@ -274,7 +267,6 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); @@ -332,7 +324,6 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && @@ -423,10 +414,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchResponse.cs index 5a5e60c374..b2d4191f6b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchResponse.cs @@ -28,9 +28,9 @@ public BaseSearchResponse() /// Initializes a new instance of the BaseSearchResponse class. /// /// Number of hits per page. (required) (default to 20). - /// Number of hits the search query matched. (required). - /// Number of pages of results for the current query. (required). - /// Page to retrieve (the first page is `0`, not `1`). (required) (default to 0). + /// Number of results (hits). (required). + /// Number of pages of results. (required). + /// Page of search results to retrieve. (required) (default to 0). /// Time the server took to process the request, in milliseconds. (required). public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int processingTimeMS) { @@ -64,9 +64,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public string AroundLatLng { get; set; } /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. [JsonPropertyName("automaticRadius")] public string AutomaticRadius { get; set; } @@ -101,9 +101,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public bool? ExhaustiveTypo { get; set; } /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. [JsonPropertyName("facets")] public Dictionary> Facets { get; set; } @@ -143,16 +143,16 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public string Message { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } /// - /// Number of pages of results for the current query. + /// Number of pages of results. /// - /// Number of pages of results for the current query. + /// Number of pages of results. [JsonPropertyName("nbPages")] public int NbPages { get; set; } @@ -164,9 +164,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public int? NbSortedHits { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int Page { get; set; } @@ -225,9 +225,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public string ServerUsed { get; set; } /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. [JsonPropertyName("userData")] public object UserData { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Condition.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Condition.cs index 7751a0080c..5b08e9f8a7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Condition.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Condition.cs @@ -30,26 +30,33 @@ public Condition() } /// - /// Query pattern syntax. + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". /// - /// Query pattern syntax. + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". [JsonPropertyName("pattern")] public string Pattern { get; set; } /// - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. /// - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. [JsonPropertyName("alternatives")] public bool? Alternatives { get; set; } /// - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. /// - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. [JsonPropertyName("context")] public string Context { get; set; } + /// + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + /// + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + [JsonPropertyName("filters")] + public string Filters { get; set; } + /// /// Returns the string presentation of the object /// @@ -62,6 +69,7 @@ public override string ToString() sb.Append(" Anchoring: ").Append(Anchoring).Append("\n"); sb.Append(" Alternatives: ").Append(Alternatives).Append("\n"); sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" Filters: ").Append(Filters).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -91,7 +99,8 @@ public override bool Equals(object obj) (Pattern == input.Pattern || (Pattern != null && Pattern.Equals(input.Pattern))) && (Anchoring == input.Anchoring || Anchoring.Equals(input.Anchoring)) && (Alternatives == input.Alternatives || Alternatives.Equals(input.Alternatives)) && - (Context == input.Context || (Context != null && Context.Equals(input.Context))); + (Context == input.Context || (Context != null && Context.Equals(input.Context))) && + (Filters == input.Filters || (Filters != null && Filters.Equals(input.Filters))); } /// @@ -113,6 +122,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Context.GetHashCode(); } + if (Filters != null) + { + hashCode = (hashCode * 59) + Filters.GetHashCode(); + } return hashCode; } } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Consequence.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Consequence.cs index 0eb19540cc..ce722e3888 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Consequence.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Consequence.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +/// Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). /// public partial class Consequence { @@ -30,30 +30,30 @@ public Consequence() public ConsequenceParams VarParams { get; set; } /// - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. /// - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. [JsonPropertyName("promote")] public List Promote { get; set; } /// - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. /// - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. [JsonPropertyName("filterPromotes")] public bool? FilterPromotes { get; set; } /// - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. /// - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. [JsonPropertyName("hide")] public List Hide { get; set; } /// - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. /// - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. [JsonPropertyName("userData")] public object UserData { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceHide.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceHide.cs index 54cf98be54..5559d5d90d 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceHide.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceHide.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Unique identifier of the record to hide. +/// Object ID of the record to hide. /// public partial class ConsequenceHide { @@ -24,16 +24,16 @@ public ConsequenceHide() { } /// /// Initializes a new instance of the ConsequenceHide class. /// - /// Unique object identifier. (required). + /// Unique record identifier. (required). public ConsequenceHide(string objectID) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceParams.cs index 7028ae7e2d..3b3f437882 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceParams.cs @@ -48,16 +48,16 @@ public ConsequenceParams() } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -86,65 +86,65 @@ public ConsequenceParams() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -161,86 +161,79 @@ public ConsequenceParams() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -252,79 +245,72 @@ public ConsequenceParams() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -336,9 +322,9 @@ public ConsequenceParams() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -350,16 +336,16 @@ public ConsequenceParams() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -370,16 +356,16 @@ public ConsequenceParams() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -396,37 +382,37 @@ public ConsequenceParams() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -437,37 +423,37 @@ public ConsequenceParams() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -478,30 +464,30 @@ public ConsequenceParams() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -513,16 +499,16 @@ public ConsequenceParams() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -533,9 +519,9 @@ public ConsequenceParams() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -596,14 +582,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -702,14 +686,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -841,10 +823,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -854,10 +832,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQuery.cs index a369b08fd2..5e811bc041 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQuery.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). +/// Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. /// [JsonConverter(typeof(ConsequenceQueryJsonConverter))] public partial class ConsequenceQuery : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQueryObject.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQueryObject.cs index 36c27c8892..b7ccbd2225 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQueryObject.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ConsequenceQueryObject.cs @@ -24,16 +24,16 @@ public ConsequenceQueryObject() } /// - /// Words to remove. + /// Words to remove from the search query. /// - /// Words to remove. + /// Words to remove from the search query. [JsonPropertyName("remove")] public List Remove { get; set; } /// - /// Edits to apply. + /// Changes to make to the search query. /// - /// Edits to apply. + /// Changes to make to the search query. [JsonPropertyName("edits")] public List Edits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/DeletedAtResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/DeletedAtResponse.cs index 4d93ae910d..827101d145 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/DeletedAtResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/DeletedAtResponse.cs @@ -24,7 +24,7 @@ public DeletedAtResponse() { } /// /// Initializes a new instance of the DeletedAtResponse class. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). /// Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). public DeletedAtResponse(long taskID, string deletedAt) { @@ -33,9 +33,9 @@ public DeletedAtResponse(long taskID, string deletedAt) } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Distinct.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Distinct.cs index 52585bebe1..58b9bb6759 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Distinct.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Distinct.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +/// Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. /// [JsonConverter(typeof(DistinctJsonConverter))] public partial class Distinct : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Edit.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Edit.cs index f56099dfcc..0f64db680c 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Edit.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Edit.cs @@ -37,9 +37,9 @@ public Edit() public string Delete { get; set; } /// - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. /// - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. [JsonPropertyName("insert")] public string Insert { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ExactOnSingleWordQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ExactOnSingleWordQuery.cs index 8e4b1af151..3b8311e5d9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ExactOnSingleWordQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ExactOnSingleWordQuery.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. ///
-/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't.
public enum ExactOnSingleWordQuery { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetFilters.cs index f0c1c01b7b..8b3e0f3b0c 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +/// Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. /// [JsonConverter(typeof(FacetFiltersJsonConverter))] public partial class FacetFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetOrdering.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetOrdering.cs index 4638d67d54..9f62cae448 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetOrdering.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FacetOrdering.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Defines the ordering of facets (widgets). +/// Order of facet names and facet values in your UI. /// public partial class FacetOrdering { @@ -30,9 +30,9 @@ public FacetOrdering() public Facets Facets { get; set; } /// - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. /// - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. [JsonPropertyName("values")] public Dictionary Values { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Facets.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Facets.cs index 875f26d558..990c52c468 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Facets.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Facets.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Ordering of facets (widgets). +/// Order of facet names. /// public partial class Facets { @@ -24,9 +24,9 @@ public Facets() } /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. [JsonPropertyName("order")] public List Order { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/HighlightResultOption.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/HighlightResultOption.cs index 2c76d2bbb7..c7eb5da2dc 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/HighlightResultOption.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/HighlightResultOption.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Show highlighted section and words matched on a query. +/// Surround words that match the query with HTML tags for highlighting. /// public partial class HighlightResultOption { @@ -30,9 +30,9 @@ public HighlightResultOption() { } /// /// Initializes a new instance of the HighlightResultOption class. /// - /// Markup text with `facetQuery` matches highlighted. (required). + /// Highlighted attribute value, including HTML tags. (required). /// matchLevel (required). - /// List of words from the query that matched the object. (required). + /// List of matched words from the search query. (required). public HighlightResultOption(string value, MatchLevel? matchLevel, List matchedWords) { Value = value ?? throw new ArgumentNullException(nameof(value)); @@ -41,16 +41,16 @@ public HighlightResultOption(string value, MatchLevel? matchLevel, List } /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. [JsonPropertyName("value")] public string Value { get; set; } /// - /// List of words from the query that matched the object. + /// List of matched words from the search query. /// - /// List of words from the query that matched the object. + /// List of matched words from the search query. [JsonPropertyName("matchedWords")] public List MatchedWords { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IgnorePlurals.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IgnorePlurals.cs index 43e4d51552..948d71d97f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IgnorePlurals.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IgnorePlurals.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). +/// Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. /// [JsonConverter(typeof(IgnorePluralsJsonConverter))] public partial class IgnorePlurals : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IndexSettingsAsSearchParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IndexSettingsAsSearchParams.cs index 1c84d496c2..17e0583cc8 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IndexSettingsAsSearchParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/IndexSettingsAsSearchParams.cs @@ -48,65 +48,58 @@ public IndexSettingsAsSearchParams() } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -118,9 +111,9 @@ public IndexSettingsAsSearchParams() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -132,16 +125,16 @@ public IndexSettingsAsSearchParams() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -152,16 +145,16 @@ public IndexSettingsAsSearchParams() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -178,37 +171,37 @@ public IndexSettingsAsSearchParams() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -219,37 +212,37 @@ public IndexSettingsAsSearchParams() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -260,30 +253,30 @@ public IndexSettingsAsSearchParams() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -295,16 +288,16 @@ public IndexSettingsAsSearchParams() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -315,9 +308,9 @@ public IndexSettingsAsSearchParams() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -335,7 +328,6 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IndexSettingsAsSearchParams {\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -406,7 +398,6 @@ public override bool Equals(object obj) } return - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -462,10 +453,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/MatchLevel.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/MatchLevel.cs index b1f51301c7..0d52e4cecb 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/MatchLevel.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/MatchLevel.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. /// -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. public enum MatchLevel { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Mode.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Mode.cs index f120737625..1952f1382a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Mode.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Mode.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. /// -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. public enum Mode { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/NumericFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/NumericFilters.cs index ab7ba35f25..c276167055 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/NumericFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/NumericFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +/// Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. /// [JsonConverter(typeof(NumericFiltersJsonConverter))] public partial class NumericFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/OptionalFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/OptionalFilters.cs index 205feaafc3..b97b5c974a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/OptionalFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/OptionalFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. +/// Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. /// [JsonConverter(typeof(OptionalFiltersJsonConverter))] public partial class OptionalFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Params.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Params.cs index c71b792bf3..44ca7995a2 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Params.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Params.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Additional search parameters. +/// Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. /// public partial class Params { diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectID.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectID.cs index 1931db8be8..045a699db7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectID.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectID.cs @@ -24,8 +24,8 @@ public PromoteObjectID() { } /// /// Initializes a new instance of the PromoteObjectID class. /// - /// Unique identifier of the record to promote. (required). - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. (required). + /// Unique record identifier. (required). + /// Position in the search results where you want to show the promoted records. (required). public PromoteObjectID(string objectID, int position) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); @@ -33,16 +33,16 @@ public PromoteObjectID(string objectID, int position) } /// - /// Unique identifier of the record to promote. + /// Unique record identifier. /// - /// Unique identifier of the record to promote. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. [JsonPropertyName("position")] public int Position { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectIDs.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectIDs.cs index 552437bc9e..f67e5e00d9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectIDs.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/PromoteObjectIDs.cs @@ -24,8 +24,8 @@ public PromoteObjectIDs() { } /// /// Initializes a new instance of the PromoteObjectIDs class. /// - /// Unique identifiers of the records to promote. (required). - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. (required). + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. (required). + /// Position in the search results where you want to show the promoted records. (required). public PromoteObjectIDs(List objectIDs, int position) { ObjectIDs = objectIDs ?? throw new ArgumentNullException(nameof(objectIDs)); @@ -33,16 +33,16 @@ public PromoteObjectIDs(List objectIDs, int position) } /// - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. /// - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. [JsonPropertyName("objectIDs")] public List ObjectIDs { get; set; } /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. [JsonPropertyName("position")] public int Position { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/QueryType.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/QueryType.cs index b350cb9aab..bcb742367c 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/QueryType.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/QueryType.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). /// -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). public enum QueryType { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RankingInfo.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RankingInfo.cs index 41ecfccb63..43b62edc44 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RankingInfo.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RankingInfo.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// RankingInfo +/// Object with detailed information about the record's ranking. /// public partial class RankingInfo { @@ -24,14 +24,14 @@ public RankingInfo() { } /// /// Initializes a new instance of the RankingInfo class. /// - /// This field is reserved for advanced usage. (required). - /// Position of the most important matched attribute in the attributes to index list. (required). + /// Whether a filter matched the query. (required). + /// Position of the first matched word in the best matching attribute of the record. (required). /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). (required). /// Number of exactly matched words. (required). /// Number of typos encountered when matching the record. (required). - /// Present and set to true if a Rule promoted the hit. (required). - /// Custom ranking for the object, expressed as a single integer value. (required). - /// Number of matched words, including prefixes and typos. (required). + /// Whether the record was promoted by a rule. (required). + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. (required). + /// Number of matched words. (required). public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExactWords, int nbTypos, bool promoted, int userScore, int words) { Filters = filters; @@ -45,16 +45,16 @@ public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExa } /// - /// This field is reserved for advanced usage. + /// Whether a filter matched the query. /// - /// This field is reserved for advanced usage. + /// Whether a filter matched the query. [JsonPropertyName("filters")] public int Filters { get; set; } /// - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. /// - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. [JsonPropertyName("firstMatchedWord")] public int FirstMatchedWord { get; set; } @@ -99,37 +99,37 @@ public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExa public int NbTypos { get; set; } /// - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. /// - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. [JsonPropertyName("promoted")] public bool Promoted { get; set; } /// - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. /// - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. [JsonPropertyName("proximityDistance")] public int? ProximityDistance { get; set; } /// - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. /// - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. [JsonPropertyName("userScore")] public int UserScore { get; set; } /// - /// Number of matched words, including prefixes and typos. + /// Number of matched words. /// - /// Number of matched words, including prefixes and typos. + /// Number of matched words. [JsonPropertyName("words")] public int Words { get; set; } /// - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. /// - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. [JsonPropertyName("promotedByReRanking")] public bool? PromotedByReRanking { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ReRankingApplyFilter.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ReRankingApplyFilter.cs index b9c37fd5ee..7b963c879a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ReRankingApplyFilter.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/ReRankingApplyFilter.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. +/// Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. /// [JsonConverter(typeof(ReRankingApplyFilterJsonConverter))] public partial class ReRankingApplyFilter : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendHit.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendHit.cs index 6f0d40048e..3ddc6407da 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendHit.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendHit.cs @@ -27,7 +27,7 @@ public RecommendHit() /// /// Initializes a new instance of the RecommendHit class. /// - /// Unique object identifier. (required). + /// Unique record identifier. (required). /// Recommendation score. (required). public RecommendHit(string objectID, double score) { @@ -37,23 +37,23 @@ public RecommendHit(string objectID, double score) } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } /// - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. /// - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. [JsonPropertyName("_highlightResult")] public Dictionary HighlightResult { get; set; } /// - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. /// - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. [JsonPropertyName("_snippetResult")] public Dictionary SnippetResult { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsHits.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsHits.cs index 52a49b5c46..13ae2bb3cf 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsHits.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsHits.cs @@ -37,9 +37,9 @@ public RecommendationsHits(List hits) public List Hits { get; set; } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsQuery.cs index b2c6497a25..65818675f6 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsQuery.cs @@ -30,9 +30,9 @@ public RecommendationsQuery() { } /// /// Initializes a new instance of the RecommendationsQuery class. /// - /// Algolia index name. (required). + /// Index name. (required). /// model (required). - /// Unique object identifier. (required). + /// Unique record identifier. (required). public RecommendationsQuery(string indexName, RecommendationModels? model, string objectID) { IndexName = indexName ?? throw new ArgumentNullException(nameof(indexName)); @@ -41,9 +41,9 @@ public RecommendationsQuery(string indexName, RecommendationModels? model, strin } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } @@ -62,9 +62,9 @@ public RecommendationsQuery(string indexName, RecommendationModels? model, strin public int? MaxRecommendations { get; set; } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsResults.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsResults.cs index 906bdef483..3ca8b84c11 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsResults.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendationsResults.cs @@ -25,9 +25,9 @@ public RecommendationsResults() { } /// Initializes a new instance of the RecommendationsResults class. /// /// Number of hits per page. (required) (default to 20). - /// Number of hits the search query matched. (required). - /// Number of pages of results for the current query. (required). - /// Page to retrieve (the first page is `0`, not `1`). (required) (default to 0). + /// Number of results (hits). (required). + /// Number of pages of results. (required). + /// Page of search results to retrieve. (required) (default to 0). /// Time the server took to process the request, in milliseconds. (required). /// hits (required). public RecommendationsResults(int hitsPerPage, int nbHits, int nbPages, int page, int processingTimeMS, List hits) @@ -62,9 +62,9 @@ public RecommendationsResults(int hitsPerPage, int nbHits, int nbPages, int page public string AroundLatLng { get; set; } /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. [JsonPropertyName("automaticRadius")] public string AutomaticRadius { get; set; } @@ -99,9 +99,9 @@ public RecommendationsResults(int hitsPerPage, int nbHits, int nbPages, int page public bool? ExhaustiveTypo { get; set; } /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. [JsonPropertyName("facets")] public Dictionary> Facets { get; set; } @@ -141,16 +141,16 @@ public RecommendationsResults(int hitsPerPage, int nbHits, int nbPages, int page public string Message { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } /// - /// Number of pages of results for the current query. + /// Number of pages of results. /// - /// Number of pages of results for the current query. + /// Number of pages of results. [JsonPropertyName("nbPages")] public int NbPages { get; set; } @@ -162,9 +162,9 @@ public RecommendationsResults(int hitsPerPage, int nbHits, int nbPages, int page public int? NbSortedHits { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int Page { get; set; } @@ -223,9 +223,9 @@ public RecommendationsResults(int hitsPerPage, int nbHits, int nbPages, int page public string ServerUsed { get; set; } /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. [JsonPropertyName("userData")] public object UserData { get; set; } @@ -243,9 +243,9 @@ public RecommendationsResults(int hitsPerPage, int nbHits, int nbPages, int page public List Hits { get; set; } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQuery.cs index de89ac49e0..af2e2dc19d 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQuery.cs @@ -30,7 +30,7 @@ public RecommendedForYouQuery() { } /// /// Initializes a new instance of the RecommendedForYouQuery class. /// - /// Algolia index name. (required). + /// Index name. (required). /// model (required). public RecommendedForYouQuery(string indexName, RecommendedForYouModel? model) { @@ -39,9 +39,9 @@ public RecommendedForYouQuery(string indexName, RecommendedForYouModel? model) } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQueryParameters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQueryParameters.cs index 50e2ceff8b..4339a5f4e5 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQueryParameters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendedForYouQueryParameters.cs @@ -48,30 +48,30 @@ public RecommendedForYouQueryParameters() { } /// /// Initializes a new instance of the RecommendedForYouQueryParameters class. /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. (required). + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). (required). public RecommendedForYouQueryParameters(string userToken) { UserToken = userToken ?? throw new ArgumentNullException(nameof(userToken)); } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -100,65 +100,65 @@ public RecommendedForYouQueryParameters(string userToken) public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -175,86 +175,79 @@ public RecommendedForYouQueryParameters(string userToken) public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -266,79 +259,72 @@ public RecommendedForYouQueryParameters(string userToken) public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -350,9 +336,9 @@ public RecommendedForYouQueryParameters(string userToken) public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -364,16 +350,16 @@ public RecommendedForYouQueryParameters(string userToken) public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -384,16 +370,16 @@ public RecommendedForYouQueryParameters(string userToken) public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -410,37 +396,37 @@ public RecommendedForYouQueryParameters(string userToken) public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -451,37 +437,37 @@ public RecommendedForYouQueryParameters(string userToken) public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -492,30 +478,30 @@ public RecommendedForYouQueryParameters(string userToken) public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -527,16 +513,16 @@ public RecommendedForYouQueryParameters(string userToken) public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -547,9 +533,9 @@ public RecommendedForYouQueryParameters(string userToken) public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -593,14 +579,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -697,14 +681,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -837,10 +819,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -850,10 +828,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveStopWords.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveStopWords.cs index 0b9a0fcbdd..1a82346fc0 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveStopWords.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveStopWords.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. +/// Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. /// [JsonConverter(typeof(RemoveStopWordsJsonConverter))] public partial class RemoveStopWords : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveWordsIfNoResults.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveWordsIfNoResults.cs index f2c2c5922e..97c6f31355 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveWordsIfNoResults.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RemoveWordsIfNoResults.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). ///
-/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
public enum RemoveWordsIfNoResults { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RenderingContent.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RenderingContent.cs index f3cdfb909b..eb1b3a45dc 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RenderingContent.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RenderingContent.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +/// Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. /// public partial class RenderingContent { diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsObject.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsObject.cs index 0396cb2071..ca97d0e8fc 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsObject.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsObject.cs @@ -48,23 +48,23 @@ public SearchParamsObject() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -93,65 +93,65 @@ public SearchParamsObject() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -168,86 +168,79 @@ public SearchParamsObject() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -259,79 +252,72 @@ public SearchParamsObject() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -343,9 +329,9 @@ public SearchParamsObject() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -357,16 +343,16 @@ public SearchParamsObject() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -377,16 +363,16 @@ public SearchParamsObject() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -403,37 +389,37 @@ public SearchParamsObject() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -444,37 +430,37 @@ public SearchParamsObject() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -485,30 +471,30 @@ public SearchParamsObject() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -520,16 +506,16 @@ public SearchParamsObject() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -540,9 +526,9 @@ public SearchParamsObject() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -586,14 +572,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -690,14 +674,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -830,10 +812,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -843,10 +821,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsQuery.cs index 5212befc7e..d6d6a9d10b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchParamsQuery.cs @@ -24,9 +24,9 @@ public SearchParamsQuery() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesParams.cs index 7e8ad17ded..a017d5110f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesParams.cs @@ -24,9 +24,9 @@ public SearchRecommendRulesParams() } /// - /// Full-text query. + /// Search query. /// - /// Full-text query. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } @@ -38,9 +38,9 @@ public SearchRecommendRulesParams() public string Context { get; set; } /// - /// Requested page (the first page is page 0). + /// Requested page of the API response. /// - /// Requested page (the first page is page 0). + /// Requested page of the API response. [JsonPropertyName("page")] public int? Page { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesResponse.cs index d17725ad56..ace3d95ae9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SearchRecommendRulesResponse.cs @@ -25,9 +25,9 @@ public SearchRecommendRulesResponse() { } /// Initializes a new instance of the SearchRecommendRulesResponse class. ///
/// Fetched rules. (required). - /// Number of hits the search query matched. (required). - /// Page to retrieve (the first page is `0`, not `1`). (required) (default to 0). - /// Number of pages of results for the current query. (required). + /// Number of results (hits). (required). + /// Page of search results to retrieve. (required) (default to 0). + /// Number of pages of results. (required). public SearchRecommendRulesResponse(List hits, int nbHits, int page, int nbPages) { Hits = hits ?? throw new ArgumentNullException(nameof(hits)); @@ -44,23 +44,23 @@ public SearchRecommendRulesResponse(List hits, int nbHits, int pag public List Hits { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int Page { get; set; } /// - /// Number of pages of results for the current query. + /// Number of pages of results. /// - /// Number of pages of results for the current query. + /// Number of pages of results. [JsonPropertyName("nbPages")] public int NbPages { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SemanticSearch.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SemanticSearch.cs index dc2f64f780..91c08e597a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SemanticSearch.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SemanticSearch.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. /// public partial class SemanticSearch { @@ -24,9 +24,9 @@ public SemanticSearch() } /// - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. /// - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. [JsonPropertyName("eventSources")] public List EventSources { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SnippetResultOption.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SnippetResultOption.cs index d45aff8a21..3f50393865 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SnippetResultOption.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SnippetResultOption.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +/// Snippets that show the context around a matching search query. /// public partial class SnippetResultOption { @@ -30,7 +30,7 @@ public SnippetResultOption() { } /// /// Initializes a new instance of the SnippetResultOption class. /// - /// Markup text with `facetQuery` matches highlighted. (required). + /// Highlighted attribute value, including HTML tags. (required). /// matchLevel (required). public SnippetResultOption(string value, MatchLevel? matchLevel) { @@ -39,9 +39,9 @@ public SnippetResultOption(string value, MatchLevel? matchLevel) } /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. [JsonPropertyName("value")] public string Value { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SortRemainingBy.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SortRemainingBy.cs index 92f174b837..6380ed4b70 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SortRemainingBy.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/SortRemainingBy.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. ///
-/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
.
public enum SortRemainingBy { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TagFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TagFilters.cs index 4c3b356879..e5f0561506 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TagFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TagFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +/// Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. /// [JsonConverter(typeof(TagFiltersJsonConverter))] public partial class TagFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TaskStatus.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TaskStatus.cs index 46fd97880a..f3926f5e82 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TaskStatus.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TaskStatus.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. /// -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. public enum TaskStatus { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingFacetsQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingFacetsQuery.cs index ab3c728d1e..9f0f956954 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingFacetsQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingFacetsQuery.cs @@ -30,7 +30,7 @@ public TrendingFacetsQuery() { } /// /// Initializes a new instance of the TrendingFacetsQuery class. /// - /// Algolia index name. (required). + /// Index name. (required). /// Facet name for trending models. (required). public TrendingFacetsQuery(string indexName, string facetName) { @@ -39,9 +39,9 @@ public TrendingFacetsQuery(string indexName, string facetName) } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingItemsQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingItemsQuery.cs index 0ef81f6165..816ff25230 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingItemsQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TrendingItemsQuery.cs @@ -30,16 +30,16 @@ public TrendingItemsQuery() { } /// /// Initializes a new instance of the TrendingItemsQuery class. /// - /// Algolia index name. (required). + /// Index name. (required). public TrendingItemsQuery(string indexName) { IndexName = indexName ?? throw new ArgumentNullException(nameof(indexName)); } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoTolerance.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoTolerance.cs index cca5c1a583..b30b2b3928 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoTolerance.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoTolerance.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Recommend; /// -/// Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. +/// Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. /// [JsonConverter(typeof(TypoToleranceJsonConverter))] public partial class TypoTolerance : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoToleranceEnum.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoToleranceEnum.cs index 44009b3c6a..11c6d28754 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoToleranceEnum.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/TypoToleranceEnum.cs @@ -12,8 +12,9 @@ namespace Algolia.Search.Models.Recommend; /// -/// Defines typoToleranceEnum +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. /// +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. public enum TypoToleranceEnum { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Value.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Value.cs index 85269036c8..e3590c496a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Value.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Value.cs @@ -30,9 +30,9 @@ public Value() } /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. [JsonPropertyName("order")] public List Order { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Acl.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Acl.cs index 6790a2cb53..df32021032 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Acl.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Acl.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. +/// Access control list permissions. /// -/// API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. +/// Access control list permissions. public enum Acl { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Action.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Action.cs index faf8eea6ca..f92203d138 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Action.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Action.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Type of batch operation. +/// Type of indexing operation. /// -/// Type of batch operation. +/// Type of indexing operation. public enum Action { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AddApiKeyResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AddApiKeyResponse.cs index c6a17dd45f..fa320a4b82 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AddApiKeyResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AddApiKeyResponse.cs @@ -25,7 +25,7 @@ public AddApiKeyResponse() { } /// Initializes a new instance of the AddApiKeyResponse class. /// /// API key. (required). - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. (required). + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). public AddApiKeyResponse(string key, string createdAt) { Key = key ?? throw new ArgumentNullException(nameof(key)); @@ -40,9 +40,9 @@ public AddApiKeyResponse(string key, string createdAt) public string Key { get; set; } /// - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. /// - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. [JsonPropertyName("createdAt")] public string CreatedAt { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Anchoring.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Anchoring.cs index fa50c748f1..e935692f22 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Anchoring.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Anchoring.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. /// -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. public enum Anchoring { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ApiKey.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ApiKey.cs index e5bae743cd..ec64c11d54 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ApiKey.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ApiKey.cs @@ -24,65 +24,65 @@ public ApiKey() { } /// /// Initializes a new instance of the ApiKey class. /// - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. (required). + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). (required). public ApiKey(List acl) { Acl = acl ?? throw new ArgumentNullException(nameof(acl)); } /// - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). /// - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). [JsonPropertyName("acl")] public List Acl { get; set; } /// - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. /// - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. [JsonPropertyName("description")] public string Description { get; set; } /// - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". /// - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". [JsonPropertyName("indexes")] public List Indexes { get; set; } /// - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. /// - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. [JsonPropertyName("maxHitsPerQuery")] public int? MaxHitsPerQuery { get; set; } /// - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. /// - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. [JsonPropertyName("maxQueriesPerIPPerHour")] public int? MaxQueriesPerIPPerHour { get; set; } /// - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. /// - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. [JsonPropertyName("queryParameters")] public string QueryParameters { get; set; } /// - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). /// - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). [JsonPropertyName("referers")] public List Referers { get; set; } /// - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. /// - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. [JsonPropertyName("validity")] public int? Validity { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs index 34cc915645..39da18b262 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +/// Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. /// [JsonConverter(typeof(AroundPrecisionJsonConverter))] public partial class AroundPrecision : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecisionFromValueInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecisionFromValueInner.cs index 49f36c7988..da70103ff5 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecisionFromValueInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecisionFromValueInner.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// AroundPrecisionFromValueInner +/// Range object with lower and upper values in meters to define custom ranges. /// public partial class AroundPrecisionFromValueInner { @@ -24,14 +24,16 @@ public AroundPrecisionFromValueInner() } /// - /// Gets or Sets From + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. /// + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. [JsonPropertyName("from")] public int? From { get; set; } /// - /// Gets or Sets Value + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. /// + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. [JsonPropertyName("value")] public int? Value { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadius.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadius.cs index 80c9aab5be..54c63c45e7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadius.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadius.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). +/// Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. /// [JsonConverter(typeof(AroundRadiusJsonConverter))] public partial class AroundRadius : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadiusAll.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadiusAll.cs index 5551934920..f404226335 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadiusAll.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundRadiusAll.cs @@ -12,8 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Defines aroundRadiusAll +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. /// +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. public enum AroundRadiusAll { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilter.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilter.cs index ae9f455ce4..c9656db165 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilter.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilter.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Automatic facet Filter. +/// Filter or optional filter to be applied to the search. /// public partial class AutomaticFacetFilter { @@ -24,30 +24,30 @@ public AutomaticFacetFilter() { } /// /// Initializes a new instance of the AutomaticFacetFilter class. /// - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. (required). + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. (required). public AutomaticFacetFilter(string facet) { Facet = facet ?? throw new ArgumentNullException(nameof(facet)); } /// - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. /// - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. [JsonPropertyName("facet")] public string Facet { get; set; } /// - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. /// - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. [JsonPropertyName("score")] public int? Score { get; set; } /// - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. /// - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. [JsonPropertyName("disjunctive")] public bool? Disjunctive { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilters.cs index 130f301911..54728ea735 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AutomaticFacetFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. +/// Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. /// [JsonConverter(typeof(AutomaticFacetFiltersJsonConverter))] public partial class AutomaticFacetFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseIndexSettings.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseIndexSettings.cs index 319d3f95fa..a72c654350 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseIndexSettings.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseIndexSettings.cs @@ -24,114 +24,121 @@ public BaseIndexSettings() } /// - /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. ///
- /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet.
+ [JsonPropertyName("attributesForFaceting")] + public List AttributesForFaceting { get; set; } + + /// + /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). + ///
+ /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/).
[JsonPropertyName("replicas")] public List Replicas { get; set; } /// - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. /// - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. [JsonPropertyName("paginationLimitedTo")] public int? PaginationLimitedTo { get; set; } /// - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. /// - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. [JsonPropertyName("unretrievableAttributes")] public List UnretrievableAttributes { get; set; } /// - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. /// - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. [JsonPropertyName("disableTypoToleranceOnWords")] public List DisableTypoToleranceOnWords { get; set; } /// - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. /// - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. [JsonPropertyName("attributesToTransliterate")] public List AttributesToTransliterate { get; set; } /// - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. /// - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. [JsonPropertyName("camelCaseAttributes")] public List CamelCaseAttributes { get; set; } /// - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). /// - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). [JsonPropertyName("decompoundedAttributes")] public object DecompoundedAttributes { get; set; } /// - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("indexLanguages")] public List IndexLanguages { get; set; } /// - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). /// - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). [JsonPropertyName("disablePrefixOnAttributes")] public List DisablePrefixOnAttributes { get; set; } /// - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. /// - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. [JsonPropertyName("allowCompressionOfIntegerArray")] public bool? AllowCompressionOfIntegerArray { get; set; } /// - /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. ///
- /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported.
[JsonPropertyName("numericAttributesForFiltering")] public List NumericAttributesForFiltering { get; set; } /// - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. /// - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. [JsonPropertyName("separatorsToIndex")] public string SeparatorsToIndex { get; set; } /// - /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. ///
- /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
[JsonPropertyName("searchableAttributes")] public List SearchableAttributes { get; set; } /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. [JsonPropertyName("userData")] public object UserData { get; set; } /// - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). /// - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). [JsonPropertyName("customNormalization")] public Dictionary> CustomNormalization { get; set; } /// - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. /// - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. [JsonPropertyName("attributeForDistinct")] public string AttributeForDistinct { get; set; } @@ -143,6 +150,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class BaseIndexSettings {\n"); + sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" Replicas: ").Append(Replicas).Append("\n"); sb.Append(" PaginationLimitedTo: ").Append(PaginationLimitedTo).Append("\n"); sb.Append(" UnretrievableAttributes: ").Append(UnretrievableAttributes).Append("\n"); @@ -185,6 +193,7 @@ public override bool Equals(object obj) } return + (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (Replicas == input.Replicas || Replicas != null && input.Replicas != null && Replicas.SequenceEqual(input.Replicas)) && (PaginationLimitedTo == input.PaginationLimitedTo || PaginationLimitedTo.Equals(input.PaginationLimitedTo)) && (UnretrievableAttributes == input.UnretrievableAttributes || UnretrievableAttributes != null && input.UnretrievableAttributes != null && UnretrievableAttributes.SequenceEqual(input.UnretrievableAttributes)) && @@ -212,6 +221,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (AttributesForFaceting != null) + { + hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); + } if (Replicas != null) { hashCode = (hashCode * 59) + Replicas.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParams.cs index d3aa514d72..8f6dd7549c 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParams.cs @@ -24,23 +24,23 @@ public BaseSearchParams() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -69,65 +69,65 @@ public BaseSearchParams() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -144,86 +144,79 @@ public BaseSearchParams() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -235,16 +228,16 @@ public BaseSearchParams() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } @@ -282,7 +275,6 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); @@ -341,7 +333,6 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && @@ -436,10 +427,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParamsWithoutQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParamsWithoutQuery.cs index 0d25f3ba7b..818ebe623b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParamsWithoutQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchParamsWithoutQuery.cs @@ -24,16 +24,16 @@ public BaseSearchParamsWithoutQuery() } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -62,65 +62,65 @@ public BaseSearchParamsWithoutQuery() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -137,86 +137,79 @@ public BaseSearchParamsWithoutQuery() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -228,16 +221,16 @@ public BaseSearchParamsWithoutQuery() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } @@ -274,7 +267,6 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); @@ -332,7 +324,6 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && @@ -423,10 +414,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchResponse.cs index 04038ed020..a65693f7cb 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BaseSearchResponse.cs @@ -28,9 +28,9 @@ public BaseSearchResponse() /// Initializes a new instance of the BaseSearchResponse class. ///
/// Number of hits per page. (required) (default to 20). - /// Number of hits the search query matched. (required). - /// Number of pages of results for the current query. (required). - /// Page to retrieve (the first page is `0`, not `1`). (required) (default to 0). + /// Number of results (hits). (required). + /// Number of pages of results. (required). + /// Page of search results to retrieve. (required) (default to 0). /// Time the server took to process the request, in milliseconds. (required). public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int processingTimeMS) { @@ -64,9 +64,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public string AroundLatLng { get; set; } /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. [JsonPropertyName("automaticRadius")] public string AutomaticRadius { get; set; } @@ -101,9 +101,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public bool? ExhaustiveTypo { get; set; } /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. [JsonPropertyName("facets")] public Dictionary> Facets { get; set; } @@ -143,16 +143,16 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public string Message { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } /// - /// Number of pages of results for the current query. + /// Number of pages of results. /// - /// Number of pages of results for the current query. + /// Number of pages of results. [JsonPropertyName("nbPages")] public int NbPages { get; set; } @@ -164,9 +164,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public int? NbSortedHits { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int Page { get; set; } @@ -225,9 +225,9 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in public string ServerUsed { get; set; } /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. [JsonPropertyName("userData")] public object UserData { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchDictionaryEntriesParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchDictionaryEntriesParams.cs index f191820ad6..4a44f2f40f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchDictionaryEntriesParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchDictionaryEntriesParams.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// `batchDictionaryEntries` parameters. +/// Request body for updating dictionary entries. /// public partial class BatchDictionaryEntriesParams { @@ -24,23 +24,23 @@ public BatchDictionaryEntriesParams() { } /// /// Initializes a new instance of the BatchDictionaryEntriesParams class. /// - /// Operations to batch. (required). + /// List of additions and deletions to your dictionaries. (required). public BatchDictionaryEntriesParams(List requests) { Requests = requests ?? throw new ArgumentNullException(nameof(requests)); } /// - /// Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + /// Whether to replace all custom entries in the dictionary with the ones sent with this request. /// - /// Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + /// Whether to replace all custom entries in the dictionary with the ones sent with this request. [JsonPropertyName("clearExistingDictionaryEntries")] public bool? ClearExistingDictionaryEntries { get; set; } /// - /// Operations to batch. + /// List of additions and deletions to your dictionaries. /// - /// Operations to batch. + /// List of additions and deletions to your dictionaries. [JsonPropertyName("requests")] public List Requests { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchResponse.cs index 4d2e0ab80e..aaf48d031b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BatchResponse.cs @@ -24,8 +24,8 @@ public BatchResponse() { } /// /// Initializes a new instance of the BatchResponse class. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). - /// Unique object (record) identifiers. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). + /// Unique record identifiers. (required). public BatchResponse(long taskID, List objectIDs) { TaskID = taskID; @@ -33,16 +33,16 @@ public BatchResponse(long taskID, List objectIDs) } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } /// - /// Unique object (record) identifiers. + /// Unique record identifiers. /// - /// Unique object (record) identifiers. + /// Unique record identifiers. [JsonPropertyName("objectIDs")] public List ObjectIDs { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs index 3e736a9e0f..9a1b7c6c08 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs @@ -48,23 +48,23 @@ public BrowseParamsObject() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -93,65 +93,65 @@ public BrowseParamsObject() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -168,86 +168,79 @@ public BrowseParamsObject() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -259,79 +252,72 @@ public BrowseParamsObject() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -343,9 +329,9 @@ public BrowseParamsObject() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -357,16 +343,16 @@ public BrowseParamsObject() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -377,16 +363,16 @@ public BrowseParamsObject() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -403,37 +389,37 @@ public BrowseParamsObject() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -444,37 +430,37 @@ public BrowseParamsObject() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -485,30 +471,30 @@ public BrowseParamsObject() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -520,16 +506,16 @@ public BrowseParamsObject() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -540,9 +526,9 @@ public BrowseParamsObject() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -553,9 +539,9 @@ public BrowseParamsObject() public ReRankingApplyFilter ReRankingApplyFilter { get; set; } /// - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. /// - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. [JsonPropertyName("cursor")] public string Cursor { get; set; } @@ -593,14 +579,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -698,14 +682,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -839,10 +821,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -852,10 +830,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseResponse.cs index 4c45e003b5..cb1751cb15 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseResponse.cs @@ -25,12 +25,12 @@ public BrowseResponse() { } /// Initializes a new instance of the BrowseResponse class. ///
/// Number of hits per page. (required) (default to 20). - /// Number of hits the search query matched. (required). - /// Number of pages of results for the current query. (required). - /// Page to retrieve (the first page is `0`, not `1`). (required) (default to 0). + /// Number of results (hits). (required). + /// Number of pages of results. (required). + /// Page of search results to retrieve. (required) (default to 0). /// Time the server took to process the request, in milliseconds. (required). - /// hits (required). - /// Text to search for in an index. (required) (default to ""). + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. (required). + /// Search query. (required) (default to ""). /// URL-encoded string of all search parameters. (required). public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int processingTimeMS, List hits, string query, string varParams) { @@ -66,9 +66,9 @@ public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string AroundLatLng { get; set; } /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. [JsonPropertyName("automaticRadius")] public string AutomaticRadius { get; set; } @@ -103,9 +103,9 @@ public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public bool? ExhaustiveTypo { get; set; } /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. [JsonPropertyName("facets")] public Dictionary> Facets { get; set; } @@ -145,16 +145,16 @@ public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string Message { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } /// - /// Number of pages of results for the current query. + /// Number of pages of results. /// - /// Number of pages of results for the current query. + /// Number of pages of results. [JsonPropertyName("nbPages")] public int NbPages { get; set; } @@ -166,9 +166,9 @@ public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public int? NbSortedHits { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int Page { get; set; } @@ -227,9 +227,9 @@ public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string ServerUsed { get; set; } /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. [JsonPropertyName("userData")] public object UserData { get; set; } @@ -241,15 +241,16 @@ public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string QueryID { get; set; } /// - /// Gets or Sets Hits + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. /// + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. [JsonPropertyName("hits")] public List Hits { get; set; } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } @@ -261,9 +262,9 @@ public BrowseResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string VarParams { get; set; } /// - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. /// - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. [JsonPropertyName("cursor")] public string Cursor { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperation.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperation.cs index b2f2c3ab0e..0b2d1c42bc 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperation.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperation.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// To update an attribute without pushing the entire record, you can use these built-in operations. +/// Update to perform on the attribute. /// public partial class BuiltInOperation { @@ -31,7 +31,7 @@ public BuiltInOperation() { } /// Initializes a new instance of the BuiltInOperation class. ///
/// operation (required). - /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. (required). + /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. (required). public BuiltInOperation(BuiltInOperationType? operation, string value) { Operation = operation; @@ -39,9 +39,9 @@ public BuiltInOperation(BuiltInOperationType? operation, string value) } /// - /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. /// - /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. [JsonPropertyName("value")] public string Value { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperationType.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperationType.cs index 19a8283eb7..c130b5b514 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperationType.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BuiltInOperationType.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Operation to apply to the attribute. +/// How to change the attribute. /// -/// Operation to apply to the attribute. +/// How to change the attribute. public enum BuiltInOperationType { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Condition.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Condition.cs index aa25fbe775..c9df7fb904 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Condition.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Condition.cs @@ -30,26 +30,33 @@ public Condition() } /// - /// Query pattern syntax. + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". /// - /// Query pattern syntax. + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". [JsonPropertyName("pattern")] public string Pattern { get; set; } /// - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. /// - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. [JsonPropertyName("alternatives")] public bool? Alternatives { get; set; } /// - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. /// - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. [JsonPropertyName("context")] public string Context { get; set; } + /// + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + /// + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + [JsonPropertyName("filters")] + public string Filters { get; set; } + /// /// Returns the string presentation of the object /// @@ -62,6 +69,7 @@ public override string ToString() sb.Append(" Anchoring: ").Append(Anchoring).Append("\n"); sb.Append(" Alternatives: ").Append(Alternatives).Append("\n"); sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" Filters: ").Append(Filters).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -91,7 +99,8 @@ public override bool Equals(object obj) (Pattern == input.Pattern || (Pattern != null && Pattern.Equals(input.Pattern))) && (Anchoring == input.Anchoring || Anchoring.Equals(input.Anchoring)) && (Alternatives == input.Alternatives || Alternatives.Equals(input.Alternatives)) && - (Context == input.Context || (Context != null && Context.Equals(input.Context))); + (Context == input.Context || (Context != null && Context.Equals(input.Context))) && + (Filters == input.Filters || (Filters != null && Filters.Equals(input.Filters))); } /// @@ -113,6 +122,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Context.GetHashCode(); } + if (Filters != null) + { + hashCode = (hashCode * 59) + Filters.GetHashCode(); + } return hashCode; } } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Consequence.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Consequence.cs index b237cd37ab..43691b3b77 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Consequence.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Consequence.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +/// Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). /// public partial class Consequence { @@ -30,30 +30,30 @@ public Consequence() public ConsequenceParams VarParams { get; set; } /// - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. /// - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. [JsonPropertyName("promote")] public List Promote { get; set; } /// - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. /// - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. [JsonPropertyName("filterPromotes")] public bool? FilterPromotes { get; set; } /// - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. /// - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. [JsonPropertyName("hide")] public List Hide { get; set; } /// - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. /// - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. [JsonPropertyName("userData")] public object UserData { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceHide.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceHide.cs index e60c396ed2..97fefd4573 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceHide.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceHide.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Unique identifier of the record to hide. +/// Object ID of the record to hide. /// public partial class ConsequenceHide { @@ -24,16 +24,16 @@ public ConsequenceHide() { } /// /// Initializes a new instance of the ConsequenceHide class. /// - /// Unique object identifier. (required). + /// Unique record identifier. (required). public ConsequenceHide(string objectID) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs index f4ed0a0e61..4a54cdea52 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs @@ -48,16 +48,16 @@ public ConsequenceParams() } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -86,65 +86,65 @@ public ConsequenceParams() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -161,86 +161,79 @@ public ConsequenceParams() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -252,79 +245,72 @@ public ConsequenceParams() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -336,9 +322,9 @@ public ConsequenceParams() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -350,16 +336,16 @@ public ConsequenceParams() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -370,16 +356,16 @@ public ConsequenceParams() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -396,37 +382,37 @@ public ConsequenceParams() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -437,37 +423,37 @@ public ConsequenceParams() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -478,30 +464,30 @@ public ConsequenceParams() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -513,16 +499,16 @@ public ConsequenceParams() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -533,9 +519,9 @@ public ConsequenceParams() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -596,14 +582,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -702,14 +686,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -841,10 +823,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -854,10 +832,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQuery.cs index b8ca359faf..4d561a1d6a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQuery.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). +/// Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. /// [JsonConverter(typeof(ConsequenceQueryJsonConverter))] public partial class ConsequenceQuery : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQueryObject.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQueryObject.cs index 84142a8b6e..cc81b93ca7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQueryObject.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceQueryObject.cs @@ -24,16 +24,16 @@ public ConsequenceQueryObject() } /// - /// Words to remove. + /// Words to remove from the search query. /// - /// Words to remove. + /// Words to remove from the search query. [JsonPropertyName("remove")] public List Remove { get; set; } /// - /// Edits to apply. + /// Changes to make to the search query. /// - /// Edits to apply. + /// Changes to make to the search query. [JsonPropertyName("edits")] public List Edits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/CreatedAtResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/CreatedAtResponse.cs index cc1fe0227f..25537d185d 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/CreatedAtResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/CreatedAtResponse.cs @@ -24,16 +24,16 @@ public CreatedAtResponse() { } /// /// Initializes a new instance of the CreatedAtResponse class. /// - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. (required). + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). public CreatedAtResponse(string createdAt) { CreatedAt = createdAt ?? throw new ArgumentNullException(nameof(createdAt)); } /// - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. /// - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. [JsonPropertyName("createdAt")] public string CreatedAt { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Cursor.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Cursor.cs index d471bc387b..9f1f602abf 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Cursor.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Cursor.cs @@ -24,9 +24,9 @@ public Cursor() } /// - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. /// - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. [JsonPropertyName("cursor")] public string VarCursor { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeleteByParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeleteByParams.cs index 60c73dd8b8..e9fa51e5bb 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeleteByParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeleteByParams.cs @@ -30,9 +30,9 @@ public DeleteByParams() public FacetFilters FacetFilters { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -49,9 +49,9 @@ public DeleteByParams() public TagFilters TagFilters { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } @@ -62,16 +62,16 @@ public DeleteByParams() public AroundRadius AroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeletedAtResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeletedAtResponse.cs index 12f5d6bd57..df8b716e60 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeletedAtResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DeletedAtResponse.cs @@ -24,7 +24,7 @@ public DeletedAtResponse() { } /// /// Initializes a new instance of the DeletedAtResponse class. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). /// Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). public DeletedAtResponse(long taskID, string deletedAt) { @@ -33,9 +33,9 @@ public DeletedAtResponse(long taskID, string deletedAt) } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntry.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntry.cs index 66ca746aa8..aec526a4a2 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntry.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntry.cs @@ -33,8 +33,8 @@ public DictionaryEntry() /// /// Initializes a new instance of the DictionaryEntry class. /// - /// Unique identifier for a dictionary object. (required). - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). (required). + /// Unique identifier for the dictionary entry. (required). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). (required). public DictionaryEntry(string objectID, string language) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); @@ -43,37 +43,37 @@ public DictionaryEntry(string objectID, string language) } /// - /// Unique identifier for a dictionary object. + /// Unique identifier for the dictionary entry. /// - /// Unique identifier for a dictionary object. + /// Unique identifier for the dictionary entry. [JsonPropertyName("objectID")] public string ObjectID { get; set; } /// - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). /// - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). [JsonPropertyName("language")] public string Language { get; set; } /// - /// Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + /// Matching dictionary word for `stopwords` and `compounds` dictionaries. /// - /// Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + /// Matching dictionary word for `stopwords` and `compounds` dictionaries. [JsonPropertyName("word")] public string Word { get; set; } /// - /// Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + /// Matching words in the `plurals` dictionary including declensions. /// - /// Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + /// Matching words in the `plurals` dictionary including declensions. [JsonPropertyName("words")] public List Words { get; set; } /// - /// For compound entries, governs the behavior of the `word` parameter. + /// Invividual components of a compound word in the `compounds` dictionary. /// - /// For compound entries, governs the behavior of the `word` parameter. + /// Invividual components of a compound word in the `compounds` dictionary. [JsonPropertyName("decomposition")] public List Decomposition { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntryState.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntryState.cs index 197aade338..a038b87735 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntryState.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntryState.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). +/// Whether a dictionary entry is active. /// -/// Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). +/// Whether a dictionary entry is active. public enum DictionaryEntryState { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryLanguage.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryLanguage.cs index 6cb0292e7e..3dee1dc2c1 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryLanguage.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryLanguage.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Custom entries for a dictionary. +/// Dictionary type. If `null`, this dictionary type isn't supported for the language. /// public partial class DictionaryLanguage { @@ -24,9 +24,9 @@ public DictionaryLanguage() } /// - /// If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + /// Number of custom dictionary entries. /// - /// If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + /// Number of custom dictionary entries. [JsonPropertyName("nbCustomEntries")] public int? NbCustomEntries { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionarySettingsParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionarySettingsParams.cs index d58a83c7f9..5a72e22608 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionarySettingsParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionarySettingsParams.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Enable or turn off the built-in Algolia stop words for a specific language. +/// Turn on or off the built-in Algolia stop words for a specific language. /// public partial class DictionarySettingsParams { diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Distinct.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Distinct.cs index 39ae9fc97b..6752431801 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Distinct.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Distinct.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +/// Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. /// [JsonConverter(typeof(DistinctJsonConverter))] public partial class Distinct : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Edit.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Edit.cs index 55c5531866..47fb2b246a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Edit.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Edit.cs @@ -37,9 +37,9 @@ public Edit() public string Delete { get; set; } /// - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. /// - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. [JsonPropertyName("insert")] public string Insert { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ExactOnSingleWordQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ExactOnSingleWordQuery.cs index ae48699e1c..02aa45ffc1 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ExactOnSingleWordQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ExactOnSingleWordQuery.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. ///
-/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't.
public enum ExactOnSingleWordQuery { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetFilters.cs index 24bf5a448e..1fbb9d55d2 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +/// Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. /// [JsonConverter(typeof(FacetFiltersJsonConverter))] public partial class FacetFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetHits.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetHits.cs index d095fdb92d..ebcb7436d7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetHits.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetHits.cs @@ -25,8 +25,8 @@ public FacetHits() { } /// Initializes a new instance of the FacetHits class. /// /// Facet value. (required). - /// Markup text with `facetQuery` matches highlighted. (required). - /// Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). (required). + /// Highlighted attribute value, including HTML tags. (required). + /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). (required). public FacetHits(string value, string highlighted, int count) { Value = value ?? throw new ArgumentNullException(nameof(value)); @@ -42,16 +42,16 @@ public FacetHits(string value, string highlighted, int count) public string Value { get; set; } /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. [JsonPropertyName("highlighted")] public string Highlighted { get; set; } /// - /// Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). /// - /// Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). [JsonPropertyName("count")] public int Count { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetOrdering.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetOrdering.cs index 9b8015c8f3..26d1798580 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetOrdering.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/FacetOrdering.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Defines the ordering of facets (widgets). +/// Order of facet names and facet values in your UI. /// public partial class FacetOrdering { @@ -30,9 +30,9 @@ public FacetOrdering() public Facets Facets { get; set; } /// - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. /// - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. [JsonPropertyName("values")] public Dictionary Values { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Facets.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Facets.cs index 3415c6429e..39c8e72743 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Facets.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Facets.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Ordering of facets (widgets). +/// Order of facet names. /// public partial class Facets { @@ -24,9 +24,9 @@ public Facets() } /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. [JsonPropertyName("order")] public List Order { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetApiKeyResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetApiKeyResponse.cs index aec7608790..cdb98f084f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetApiKeyResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetApiKeyResponse.cs @@ -25,7 +25,7 @@ public GetApiKeyResponse() { } /// Initializes a new instance of the GetApiKeyResponse class. ///
/// Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). (required). - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. (required). + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). (required). public GetApiKeyResponse(long createdAt, List acl) { CreatedAt = createdAt; @@ -47,58 +47,58 @@ public GetApiKeyResponse(long createdAt, List acl) public long CreatedAt { get; set; } /// - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). /// - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). [JsonPropertyName("acl")] public List Acl { get; set; } /// - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. /// - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. [JsonPropertyName("description")] public string Description { get; set; } /// - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". /// - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". [JsonPropertyName("indexes")] public List Indexes { get; set; } /// - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. /// - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. [JsonPropertyName("maxHitsPerQuery")] public int? MaxHitsPerQuery { get; set; } /// - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. /// - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. [JsonPropertyName("maxQueriesPerIPPerHour")] public int? MaxQueriesPerIPPerHour { get; set; } /// - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. /// - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. [JsonPropertyName("queryParameters")] public string QueryParameters { get; set; } /// - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). /// - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). [JsonPropertyName("referers")] public List Referers { get; set; } /// - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. /// - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. [JsonPropertyName("validity")] public int? Validity { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsRequest.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsRequest.cs index 46545b1f47..6096ac43be 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsRequest.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsRequest.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Record retrieval operation. +/// Request body for retrieving records. /// public partial class GetObjectsRequest { @@ -24,8 +24,8 @@ public GetObjectsRequest() { } /// /// Initializes a new instance of the GetObjectsRequest class. /// - /// Record's objectID. (required). - /// Name of the index containing the required records. (required). + /// Object ID for the record to retrieve. (required). + /// Index from which to retrieve the records. (required). public GetObjectsRequest(string objectID, string indexName) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); @@ -33,23 +33,23 @@ public GetObjectsRequest(string objectID, string indexName) } /// - /// Attributes to retrieve. If not specified, all retrievable attributes are returned. + /// Attributes to retrieve. If not specified, all retrievable attributes are returned. /// - /// Attributes to retrieve. If not specified, all retrievable attributes are returned. + /// Attributes to retrieve. If not specified, all retrievable attributes are returned. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Record's objectID. + /// Object ID for the record to retrieve. /// - /// Record's objectID. + /// Object ID for the record to retrieve. [JsonPropertyName("objectID")] public string ObjectID { get; set; } /// - /// Name of the index containing the required records. + /// Index from which to retrieve the records. /// - /// Name of the index containing the required records. + /// Index from which to retrieve the records. [JsonPropertyName("indexName")] public string IndexName { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsResponse.cs index cc79f52448..790cf1d4ff 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/GetObjectsResponse.cs @@ -24,16 +24,16 @@ public GetObjectsResponse() { } /// /// Initializes a new instance of the GetObjectsResponse class. /// - /// Retrieved results. (required). + /// Retrieved records. (required). public GetObjectsResponse(List results) { Results = results ?? throw new ArgumentNullException(nameof(results)); } /// - /// Retrieved results. + /// Retrieved records. /// - /// Retrieved results. + /// Retrieved records. [JsonPropertyName("results")] public List Results { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HasPendingMappingsResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HasPendingMappingsResponse.cs index cb95d72efa..62efb4023f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HasPendingMappingsResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HasPendingMappingsResponse.cs @@ -24,16 +24,16 @@ public HasPendingMappingsResponse() { } /// /// Initializes a new instance of the HasPendingMappingsResponse class. /// - /// Indicates whether there are clusters undergoing migration, creation, or deletion. (required). + /// Whether there are clusters undergoing migration, creation, or deletion. (required). public HasPendingMappingsResponse(bool pending) { Pending = pending; } /// - /// Indicates whether there are clusters undergoing migration, creation, or deletion. + /// Whether there are clusters undergoing migration, creation, or deletion. /// - /// Indicates whether there are clusters undergoing migration, creation, or deletion. + /// Whether there are clusters undergoing migration, creation, or deletion. [JsonPropertyName("pending")] public bool Pending { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HighlightResultOption.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HighlightResultOption.cs index a1607b199c..b64b63d3a9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HighlightResultOption.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/HighlightResultOption.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Show highlighted section and words matched on a query. +/// Surround words that match the query with HTML tags for highlighting. /// public partial class HighlightResultOption { @@ -30,9 +30,9 @@ public HighlightResultOption() { } /// /// Initializes a new instance of the HighlightResultOption class. /// - /// Markup text with `facetQuery` matches highlighted. (required). + /// Highlighted attribute value, including HTML tags. (required). /// matchLevel (required). - /// List of words from the query that matched the object. (required). + /// List of matched words from the search query. (required). public HighlightResultOption(string value, MatchLevel? matchLevel, List matchedWords) { Value = value ?? throw new ArgumentNullException(nameof(value)); @@ -41,16 +41,16 @@ public HighlightResultOption(string value, MatchLevel? matchLevel, List } /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. [JsonPropertyName("value")] public string Value { get; set; } /// - /// List of words from the query that matched the object. + /// List of matched words from the search query. /// - /// List of words from the query that matched the object. + /// List of matched words from the search query. [JsonPropertyName("matchedWords")] public List MatchedWords { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Hit.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Hit.cs index b32260cf95..80e90d98a0 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Hit.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Hit.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// A single hit. +/// Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. /// public partial class Hit { @@ -27,7 +27,7 @@ public Hit() /// /// Initializes a new instance of the Hit class. /// - /// Unique object identifier. (required). + /// Unique record identifier. (required). public Hit(string objectID) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); @@ -35,23 +35,23 @@ public Hit(string objectID) } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } /// - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. /// - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. [JsonPropertyName("_highlightResult")] public Dictionary HighlightResult { get; set; } /// - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. /// - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. [JsonPropertyName("_snippetResult")] public Dictionary SnippetResult { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IgnorePlurals.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IgnorePlurals.cs index 456f246fa6..7c41c27e80 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IgnorePlurals.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IgnorePlurals.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). +/// Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. /// [JsonConverter(typeof(IgnorePluralsJsonConverter))] public partial class IgnorePlurals : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs index 255f0168f3..1bbd58d05a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Algolia index settings. +/// Index settings. /// public partial class IndexSettings { @@ -48,177 +48,177 @@ public IndexSettings() } /// - /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. ///
- /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet.
+ [JsonPropertyName("attributesForFaceting")] + public List AttributesForFaceting { get; set; } + + /// + /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). + ///
+ /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/).
[JsonPropertyName("replicas")] public List Replicas { get; set; } /// - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. /// - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. [JsonPropertyName("paginationLimitedTo")] public int? PaginationLimitedTo { get; set; } /// - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. /// - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. [JsonPropertyName("unretrievableAttributes")] public List UnretrievableAttributes { get; set; } /// - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. /// - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. [JsonPropertyName("disableTypoToleranceOnWords")] public List DisableTypoToleranceOnWords { get; set; } /// - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. /// - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. [JsonPropertyName("attributesToTransliterate")] public List AttributesToTransliterate { get; set; } /// - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. /// - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. [JsonPropertyName("camelCaseAttributes")] public List CamelCaseAttributes { get; set; } /// - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). /// - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). [JsonPropertyName("decompoundedAttributes")] public object DecompoundedAttributes { get; set; } /// - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("indexLanguages")] public List IndexLanguages { get; set; } /// - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). /// - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). [JsonPropertyName("disablePrefixOnAttributes")] public List DisablePrefixOnAttributes { get; set; } /// - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. /// - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. [JsonPropertyName("allowCompressionOfIntegerArray")] public bool? AllowCompressionOfIntegerArray { get; set; } /// - /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. ///
- /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported.
[JsonPropertyName("numericAttributesForFiltering")] public List NumericAttributesForFiltering { get; set; } /// - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. /// - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. [JsonPropertyName("separatorsToIndex")] public string SeparatorsToIndex { get; set; } /// - /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. ///
- /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
[JsonPropertyName("searchableAttributes")] public List SearchableAttributes { get; set; } /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. [JsonPropertyName("userData")] public object UserData { get; set; } /// - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). /// - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). [JsonPropertyName("customNormalization")] public Dictionary> CustomNormalization { get; set; } /// - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. /// - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. [JsonPropertyName("attributeForDistinct")] public string AttributeForDistinct { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -230,9 +230,9 @@ public IndexSettings() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -244,16 +244,16 @@ public IndexSettings() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -264,16 +264,16 @@ public IndexSettings() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -290,37 +290,37 @@ public IndexSettings() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -331,37 +331,37 @@ public IndexSettings() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -372,30 +372,30 @@ public IndexSettings() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -407,16 +407,16 @@ public IndexSettings() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -427,9 +427,9 @@ public IndexSettings() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -447,6 +447,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IndexSettings {\n"); + sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" Replicas: ").Append(Replicas).Append("\n"); sb.Append(" PaginationLimitedTo: ").Append(PaginationLimitedTo).Append("\n"); sb.Append(" UnretrievableAttributes: ").Append(UnretrievableAttributes).Append("\n"); @@ -463,7 +464,6 @@ public override string ToString() sb.Append(" UserData: ").Append(UserData).Append("\n"); sb.Append(" CustomNormalization: ").Append(CustomNormalization).Append("\n"); sb.Append(" AttributeForDistinct: ").Append(AttributeForDistinct).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -534,6 +534,7 @@ public override bool Equals(object obj) } return + (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (Replicas == input.Replicas || Replicas != null && input.Replicas != null && Replicas.SequenceEqual(input.Replicas)) && (PaginationLimitedTo == input.PaginationLimitedTo || PaginationLimitedTo.Equals(input.PaginationLimitedTo)) && (UnretrievableAttributes == input.UnretrievableAttributes || UnretrievableAttributes != null && input.UnretrievableAttributes != null && UnretrievableAttributes.SequenceEqual(input.UnretrievableAttributes)) && @@ -550,7 +551,6 @@ public override bool Equals(object obj) (UserData == input.UserData || (UserData != null && UserData.Equals(input.UserData))) && (CustomNormalization == input.CustomNormalization || CustomNormalization != null && input.CustomNormalization != null && CustomNormalization.SequenceEqual(input.CustomNormalization)) && (AttributeForDistinct == input.AttributeForDistinct || (AttributeForDistinct != null && AttributeForDistinct.Equals(input.AttributeForDistinct))) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -606,6 +606,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (AttributesForFaceting != null) + { + hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); + } if (Replicas != null) { hashCode = (hashCode * 59) + Replicas.GetHashCode(); @@ -664,10 +668,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + AttributeForDistinct.GetHashCode(); } - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettingsAsSearchParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettingsAsSearchParams.cs index b04f4502bb..3cde54a342 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettingsAsSearchParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettingsAsSearchParams.cs @@ -48,65 +48,58 @@ public IndexSettingsAsSearchParams() } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -118,9 +111,9 @@ public IndexSettingsAsSearchParams() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -132,16 +125,16 @@ public IndexSettingsAsSearchParams() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -152,16 +145,16 @@ public IndexSettingsAsSearchParams() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -178,37 +171,37 @@ public IndexSettingsAsSearchParams() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -219,37 +212,37 @@ public IndexSettingsAsSearchParams() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -260,30 +253,30 @@ public IndexSettingsAsSearchParams() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -295,16 +288,16 @@ public IndexSettingsAsSearchParams() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -315,9 +308,9 @@ public IndexSettingsAsSearchParams() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -335,7 +328,6 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IndexSettingsAsSearchParams {\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -406,7 +398,6 @@ public override bool Equals(object obj) } return - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -462,10 +453,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Log.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Log.cs index 0e9f104ae6..c1d382d99e 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Log.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Log.cs @@ -24,17 +24,17 @@ public Log() { } /// /// Initializes a new instance of the Log class. /// - /// Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). - /// HTTP method of the performed request. (required). - /// HTTP response code. (required). - /// Request body. Truncated after 1,000 characters. (required). - /// Answer body. Truncated after 1,000 characters. (required). - /// Request URL. (required). + /// Timestamp of the API request in ISO 8601 format. (required). + /// HTTP method of the request. (required). + /// HTTP status code of the response. (required). + /// Request body. (required). + /// Response body. (required). + /// URL of the API endpoint. (required). /// IP address of the client that performed the request. (required). - /// Request headers (API key is obfuscated). (required). + /// Request headers (API keys are obfuscated). (required). /// SHA1 signature of the log entry. (required). - /// Number of API calls. (required). - /// Processing time for the query. Doesn't include network time. (required). + /// Number of API requests. (required). + /// Processing time for the query in milliseconds. This doesn't include latency due to the network. (required). public Log(string timestamp, string method, string answerCode, string queryBody, string answer, string url, string ip, string queryHeaders, string sha1, string nbApiCalls, string processingTimeMs) { Timestamp = timestamp ?? throw new ArgumentNullException(nameof(timestamp)); @@ -51,44 +51,44 @@ public Log(string timestamp, string method, string answerCode, string queryBody, } /// - /// Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of the API request in ISO 8601 format. /// - /// Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of the API request in ISO 8601 format. [JsonPropertyName("timestamp")] public string Timestamp { get; set; } /// - /// HTTP method of the performed request. + /// HTTP method of the request. /// - /// HTTP method of the performed request. + /// HTTP method of the request. [JsonPropertyName("method")] public string Method { get; set; } /// - /// HTTP response code. + /// HTTP status code of the response. /// - /// HTTP response code. + /// HTTP status code of the response. [JsonPropertyName("answer_code")] public string AnswerCode { get; set; } /// - /// Request body. Truncated after 1,000 characters. + /// Request body. /// - /// Request body. Truncated after 1,000 characters. + /// Request body. [JsonPropertyName("query_body")] public string QueryBody { get; set; } /// - /// Answer body. Truncated after 1,000 characters. + /// Response body. /// - /// Answer body. Truncated after 1,000 characters. + /// Response body. [JsonPropertyName("answer")] public string Answer { get; set; } /// - /// Request URL. + /// URL of the API endpoint. /// - /// Request URL. + /// URL of the API endpoint. [JsonPropertyName("url")] public string Url { get; set; } @@ -100,9 +100,9 @@ public Log(string timestamp, string method, string answerCode, string queryBody, public string Ip { get; set; } /// - /// Request headers (API key is obfuscated). + /// Request headers (API keys are obfuscated). /// - /// Request headers (API key is obfuscated). + /// Request headers (API keys are obfuscated). [JsonPropertyName("query_headers")] public string QueryHeaders { get; set; } @@ -114,16 +114,16 @@ public Log(string timestamp, string method, string answerCode, string queryBody, public string Sha1 { get; set; } /// - /// Number of API calls. + /// Number of API requests. /// - /// Number of API calls. + /// Number of API requests. [JsonPropertyName("nb_api_calls")] public string NbApiCalls { get; set; } /// - /// Processing time for the query. Doesn't include network time. + /// Processing time for the query in milliseconds. This doesn't include latency due to the network. /// - /// Processing time for the query. Doesn't include network time. + /// Processing time for the query in milliseconds. This doesn't include latency due to the network. [JsonPropertyName("processing_time_ms")] public string ProcessingTimeMs { get; set; } @@ -142,16 +142,16 @@ public Log(string timestamp, string method, string answerCode, string queryBody, public string QueryParams { get; set; } /// - /// Number of hits returned for the query. + /// Number of search results (hits) returned for the query. /// - /// Number of hits returned for the query. + /// Number of search results (hits) returned for the query. [JsonPropertyName("query_nb_hits")] public string QueryNbHits { get; set; } /// - /// Performed queries for the given request. + /// Queries performed for the given request. /// - /// Performed queries for the given request. + /// Queries performed for the given request. [JsonPropertyName("inner_queries")] public List InnerQueries { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/LogQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/LogQuery.cs index 344a29722f..cc1c85e70b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/LogQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/LogQuery.cs @@ -31,9 +31,9 @@ public LogQuery() public string IndexName { get; set; } /// - /// User identifier. + /// A user identifier. /// - /// User identifier. + /// A user identifier. [JsonPropertyName("user_token")] public string UserToken { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MatchLevel.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MatchLevel.cs index 452e736b6b..fcee95c670 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MatchLevel.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MatchLevel.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. /// -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. public enum MatchLevel { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Mode.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Mode.cs index 7167d2fe82..55747eebf8 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Mode.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Mode.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. /// -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. public enum Mode { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MultipleBatchResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MultipleBatchResponse.cs index dd4d22c9fb..6c64aa2a02 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MultipleBatchResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/MultipleBatchResponse.cs @@ -24,8 +24,8 @@ public MultipleBatchResponse() { } /// /// Initializes a new instance of the MultipleBatchResponse class. /// - /// TaskIDs per index. (required). - /// Unique object (record) identifiers. (required). + /// Task IDs. One for each index. (required). + /// Unique record identifiers. (required). public MultipleBatchResponse(Dictionary taskID, List objectIDs) { TaskID = taskID ?? throw new ArgumentNullException(nameof(taskID)); @@ -33,16 +33,16 @@ public MultipleBatchResponse(Dictionary taskID, List objec } /// - /// TaskIDs per index. + /// Task IDs. One for each index. /// - /// TaskIDs per index. + /// Task IDs. One for each index. [JsonPropertyName("taskID")] public Dictionary TaskID { get; set; } /// - /// Unique object (record) identifiers. + /// Unique record identifiers. /// - /// Unique object (record) identifiers. + /// Unique record identifiers. [JsonPropertyName("objectIDs")] public List ObjectIDs { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/NumericFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/NumericFilters.cs index 991f7eb45f..2d6d9ab4c1 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/NumericFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/NumericFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +/// Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. /// [JsonConverter(typeof(NumericFiltersJsonConverter))] public partial class NumericFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationIndexParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationIndexParams.cs index e7f98b5cd9..f5c4b04299 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationIndexParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationIndexParams.cs @@ -31,7 +31,7 @@ public OperationIndexParams() { } /// Initializes a new instance of the OperationIndexParams class. /// /// operation (required). - /// Algolia index name. (required). + /// Index name. (required). public OperationIndexParams(OperationType? operation, string destination) { Operation = operation; @@ -39,16 +39,16 @@ public OperationIndexParams(OperationType? operation, string destination) } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("destination")] public string Destination { get; set; } /// - /// **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + /// **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. /// - /// **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + /// **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. [JsonPropertyName("scope")] public List Scope { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationType.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationType.cs index ca45e43a3c..4e38ac4ad9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationType.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OperationType.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Operation to perform (_move_ or _copy_). +/// Operation to perform on the index. /// -/// Operation to perform (_move_ or _copy_). +/// Operation to perform on the index. public enum OperationType { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OptionalFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OptionalFilters.cs index 354611125f..db5fb873a8 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OptionalFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/OptionalFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. +/// Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. /// [JsonConverter(typeof(OptionalFiltersJsonConverter))] public partial class OptionalFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Params.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Params.cs index 49fe39c162..e971a76810 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Params.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Params.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Additional search parameters. +/// Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. /// public partial class Params { diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectID.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectID.cs index ef7a7c4996..b68aae67b1 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectID.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectID.cs @@ -24,8 +24,8 @@ public PromoteObjectID() { } /// /// Initializes a new instance of the PromoteObjectID class. /// - /// Unique identifier of the record to promote. (required). - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. (required). + /// Unique record identifier. (required). + /// Position in the search results where you want to show the promoted records. (required). public PromoteObjectID(string objectID, int position) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); @@ -33,16 +33,16 @@ public PromoteObjectID(string objectID, int position) } /// - /// Unique identifier of the record to promote. + /// Unique record identifier. /// - /// Unique identifier of the record to promote. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. [JsonPropertyName("position")] public int Position { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectIDs.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectIDs.cs index fcd178d2cf..1107b4ac1a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectIDs.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/PromoteObjectIDs.cs @@ -24,8 +24,8 @@ public PromoteObjectIDs() { } /// /// Initializes a new instance of the PromoteObjectIDs class. /// - /// Unique identifiers of the records to promote. (required). - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. (required). + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. (required). + /// Position in the search results where you want to show the promoted records. (required). public PromoteObjectIDs(List objectIDs, int position) { ObjectIDs = objectIDs ?? throw new ArgumentNullException(nameof(objectIDs)); @@ -33,16 +33,16 @@ public PromoteObjectIDs(List objectIDs, int position) } /// - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. /// - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. [JsonPropertyName("objectIDs")] public List ObjectIDs { get; set; } /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. /// - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. [JsonPropertyName("position")] public int Position { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/QueryType.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/QueryType.cs index 5b050309da..110ae7ef0a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/QueryType.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/QueryType.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). /// -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). public enum QueryType { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RankingInfo.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RankingInfo.cs index e5521f3445..d9a06bc411 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RankingInfo.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RankingInfo.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// RankingInfo +/// Object with detailed information about the record's ranking. /// public partial class RankingInfo { @@ -24,14 +24,14 @@ public RankingInfo() { } /// /// Initializes a new instance of the RankingInfo class. /// - /// This field is reserved for advanced usage. (required). - /// Position of the most important matched attribute in the attributes to index list. (required). + /// Whether a filter matched the query. (required). + /// Position of the first matched word in the best matching attribute of the record. (required). /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). (required). /// Number of exactly matched words. (required). /// Number of typos encountered when matching the record. (required). - /// Present and set to true if a Rule promoted the hit. (required). - /// Custom ranking for the object, expressed as a single integer value. (required). - /// Number of matched words, including prefixes and typos. (required). + /// Whether the record was promoted by a rule. (required). + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. (required). + /// Number of matched words. (required). public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExactWords, int nbTypos, bool promoted, int userScore, int words) { Filters = filters; @@ -45,16 +45,16 @@ public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExa } /// - /// This field is reserved for advanced usage. + /// Whether a filter matched the query. /// - /// This field is reserved for advanced usage. + /// Whether a filter matched the query. [JsonPropertyName("filters")] public int Filters { get; set; } /// - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. /// - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. [JsonPropertyName("firstMatchedWord")] public int FirstMatchedWord { get; set; } @@ -99,37 +99,37 @@ public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExa public int NbTypos { get; set; } /// - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. /// - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. [JsonPropertyName("promoted")] public bool Promoted { get; set; } /// - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. /// - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. [JsonPropertyName("proximityDistance")] public int? ProximityDistance { get; set; } /// - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. /// - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. [JsonPropertyName("userScore")] public int UserScore { get; set; } /// - /// Number of matched words, including prefixes and typos. + /// Number of matched words. /// - /// Number of matched words, including prefixes and typos. + /// Number of matched words. [JsonPropertyName("words")] public int Words { get; set; } /// - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. /// - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. [JsonPropertyName("promotedByReRanking")] public bool? PromotedByReRanking { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ReRankingApplyFilter.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ReRankingApplyFilter.cs index e1f92c70e4..7dd49fcee7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ReRankingApplyFilter.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ReRankingApplyFilter.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. +/// Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. /// [JsonConverter(typeof(ReRankingApplyFilterJsonConverter))] public partial class ReRankingApplyFilter : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveStopWords.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveStopWords.cs index 52eac3f766..6559616fce 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveStopWords.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveStopWords.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. +/// Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. /// [JsonConverter(typeof(RemoveStopWordsJsonConverter))] public partial class RemoveStopWords : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveWordsIfNoResults.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveWordsIfNoResults.cs index acbfbfc40a..98c5a516fe 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveWordsIfNoResults.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RemoveWordsIfNoResults.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). ///
-/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
public enum RemoveWordsIfNoResults { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RenderingContent.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RenderingContent.cs index 6439205e33..d8f73273bb 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RenderingContent.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RenderingContent.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +/// Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. /// public partial class RenderingContent { diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Rule.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Rule.cs index 33dd830e89..7a1a32ed89 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Rule.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Rule.cs @@ -24,23 +24,23 @@ public Rule() { } /// /// Initializes a new instance of the Rule class. /// - /// Unique identifier for a rule object. (required). + /// Unique identifier of a rule object. (required). public Rule(string objectID) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); } /// - /// Unique identifier for a rule object. + /// Unique identifier of a rule object. /// - /// Unique identifier for a rule object. + /// Unique identifier of a rule object. [JsonPropertyName("objectID")] public string ObjectID { get; set; } /// - /// [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + /// Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). /// - /// [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + /// Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). [JsonPropertyName("conditions")] public List Conditions { get; set; } @@ -51,23 +51,23 @@ public Rule(string objectID) public Consequence Consequence { get; set; } /// - /// Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + /// Description of the rule's purpose to help you distinguish between different rules. /// - /// Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + /// Description of the rule's purpose to help you distinguish between different rules. [JsonPropertyName("description")] public string Description { get; set; } /// - /// Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + /// Whether the rule is active. /// - /// Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + /// Whether the rule is active. [JsonPropertyName("enabled")] public bool? Enabled { get; set; } /// - /// If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + /// Time periods when the rule is active. /// - /// If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + /// Time periods when the rule is active. [JsonPropertyName("validity")] public List Validity { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveObjectResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveObjectResponse.cs index 5e88c36861..4c95ed3f06 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveObjectResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveObjectResponse.cs @@ -24,8 +24,8 @@ public SaveObjectResponse() { } /// /// Initializes a new instance of the SaveObjectResponse class. /// - /// Date of creation (ISO-8601 format). (required). - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). + /// Timestamp when the record was added, in ISO 8601 format. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). public SaveObjectResponse(string createdAt, long taskID) { CreatedAt = createdAt ?? throw new ArgumentNullException(nameof(createdAt)); @@ -33,23 +33,23 @@ public SaveObjectResponse(string createdAt, long taskID) } /// - /// Date of creation (ISO-8601 format). + /// Timestamp when the record was added, in ISO 8601 format. /// - /// Date of creation (ISO-8601 format). + /// Timestamp when the record was added, in ISO 8601 format. [JsonPropertyName("createdAt")] public string CreatedAt { get; set; } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveSynonymResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveSynonymResponse.cs index d7f7f03fd3..b8ef7800a3 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveSynonymResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SaveSynonymResponse.cs @@ -24,7 +24,7 @@ public SaveSynonymResponse() { } /// /// Initializes a new instance of the SaveSynonymResponse class. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). /// Unique identifier of a synonym object. (required). public SaveSynonymResponse(long taskID, string updatedAt, string id) @@ -35,9 +35,9 @@ public SaveSynonymResponse(long taskID, string updatedAt, string id) } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesParams.cs index 3e2258e0a1..45135b5c9d 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesParams.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// `searchDictionaryEntries` parameters. +/// Search parameter. /// public partial class SearchDictionaryEntriesParams { @@ -24,23 +24,23 @@ public SearchDictionaryEntriesParams() { } /// /// Initializes a new instance of the SearchDictionaryEntriesParams class. /// - /// Text to search for in an index. (required) (default to ""). + /// Search query. (required) (default to ""). public SearchDictionaryEntriesParams(string query) { Query = query ?? throw new ArgumentNullException(nameof(query)); } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } @@ -52,9 +52,9 @@ public SearchDictionaryEntriesParams(string query) public int? HitsPerPage { get; set; } /// - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). /// - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). [JsonPropertyName("language")] public string Language { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesResponse.cs new file mode 100644 index 0000000000..5ad3750118 --- /dev/null +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchDictionaryEntriesResponse.cs @@ -0,0 +1,132 @@ +// +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +// +using System; +using System.Text; +using System.Linq; +using System.Text.Json.Serialization; +using System.Collections.Generic; +using Algolia.Search.Serializer; +using System.Text.Json; + +namespace Algolia.Search.Models.Search; + +/// +/// SearchDictionaryEntriesResponse +/// +public partial class SearchDictionaryEntriesResponse +{ + /// + /// Initializes a new instance of the SearchDictionaryEntriesResponse class. + /// + [JsonConstructor] + public SearchDictionaryEntriesResponse() { } + /// + /// Initializes a new instance of the SearchDictionaryEntriesResponse class. + /// + /// Dictionary entries matching the search criteria. (required). + /// Requested page of the API response. (required). + /// Number of results (hits). (required). + /// Number of pages of results. (required). + public SearchDictionaryEntriesResponse(List hits, int page, int nbHits, int nbPages) + { + Hits = hits ?? throw new ArgumentNullException(nameof(hits)); + Page = page; + NbHits = nbHits; + NbPages = nbPages; + } + + /// + /// Dictionary entries matching the search criteria. + /// + /// Dictionary entries matching the search criteria. + [JsonPropertyName("hits")] + public List Hits { get; set; } + + /// + /// Requested page of the API response. + /// + /// Requested page of the API response. + [JsonPropertyName("page")] + public int Page { get; set; } + + /// + /// Number of results (hits). + /// + /// Number of results (hits). + [JsonPropertyName("nbHits")] + public int NbHits { get; set; } + + /// + /// Number of pages of results. + /// + /// Number of pages of results. + [JsonPropertyName("nbPages")] + public int NbPages { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SearchDictionaryEntriesResponse {\n"); + sb.Append(" Hits: ").Append(Hits).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" NbHits: ").Append(NbHits).Append("\n"); + sb.Append(" NbPages: ").Append(NbPages).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonSerializer.Serialize(this, JsonConfig.Options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is not SearchDictionaryEntriesResponse input) + { + return false; + } + + return + (Hits == input.Hits || Hits != null && input.Hits != null && Hits.SequenceEqual(input.Hits)) && + (Page == input.Page || Page.Equals(input.Page)) && + (NbHits == input.NbHits || NbHits.Equals(input.NbHits)) && + (NbPages == input.NbPages || NbPages.Equals(input.NbPages)); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Hits != null) + { + hashCode = (hashCode * 59) + Hits.GetHashCode(); + } + hashCode = (hashCode * 59) + Page.GetHashCode(); + hashCode = (hashCode * 59) + NbHits.GetHashCode(); + hashCode = (hashCode * 59) + NbPages.GetHashCode(); + return hashCode; + } + } + +} + diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesRequest.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesRequest.cs index 29a64f6807..d3682e4cf7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesRequest.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesRequest.cs @@ -38,9 +38,9 @@ public SearchForFacetValuesRequest() public string FacetQuery { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesResponse.cs index 6538305016..9df71fe2c5 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetValuesResponse.cs @@ -24,7 +24,7 @@ public SearchForFacetValuesResponse() { } /// /// Initializes a new instance of the SearchForFacetValuesResponse class. /// - /// facetHits (required). + /// Matching facet values. (required). /// See the `facetsCount` field of the `exhaustive` object in the response. (required). public SearchForFacetValuesResponse(List facetHits, bool exhaustiveFacetsCount) { @@ -33,8 +33,9 @@ public SearchForFacetValuesResponse(List facetHits, bool exhaustiveFa } /// - /// Gets or Sets FacetHits + /// Matching facet values. /// + /// Matching facet values. [JsonPropertyName("facetHits")] public List FacetHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs index 3e279cd502..0dbc40171a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs @@ -55,7 +55,7 @@ public SearchForFacets() { } /// Initializes a new instance of the SearchForFacets class. /// /// Facet name. (required). - /// Algolia index name. (required). + /// Index name. (required). /// type (required). public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) { @@ -72,23 +72,23 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public string VarParams { get; set; } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -117,65 +117,65 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -192,86 +192,79 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -283,79 +276,72 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -367,9 +353,9 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -381,16 +367,16 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -401,16 +387,16 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -427,37 +413,37 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -468,37 +454,37 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -509,30 +495,30 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -544,16 +530,16 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -564,9 +550,9 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -584,9 +570,9 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) public string Facet { get; set; } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } @@ -632,14 +618,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -741,14 +725,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -889,10 +871,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -902,10 +880,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetsOptions.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetsOptions.cs index 2f94fac99f..846b75ed6b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetsOptions.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacetsOptions.cs @@ -31,7 +31,7 @@ public SearchForFacetsOptions() { } /// Initializes a new instance of the SearchForFacetsOptions class. ///
/// Facet name. (required). - /// Algolia index name. (required). + /// Index name. (required). /// type (required). public SearchForFacetsOptions(string facet, string indexName, SearchTypeFacet? type) { @@ -48,9 +48,9 @@ public SearchForFacetsOptions(string facet, string indexName, SearchTypeFacet? t public string Facet { get; set; } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } @@ -62,9 +62,9 @@ public SearchForFacetsOptions(string facet, string indexName, SearchTypeFacet? t public string FacetQuery { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs index 8ac2a8b814..a68d3dc7d9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs @@ -54,7 +54,7 @@ public SearchForHits() { } /// /// Initializes a new instance of the SearchForHits class. /// - /// Algolia index name. (required). + /// Index name. (required). public SearchForHits(string indexName) { IndexName = indexName ?? throw new ArgumentNullException(nameof(indexName)); @@ -68,23 +68,23 @@ public SearchForHits(string indexName) public string VarParams { get; set; } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -113,65 +113,65 @@ public SearchForHits(string indexName) public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -188,86 +188,79 @@ public SearchForHits(string indexName) public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -279,79 +272,72 @@ public SearchForHits(string indexName) public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -363,9 +349,9 @@ public SearchForHits(string indexName) public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -377,16 +363,16 @@ public SearchForHits(string indexName) public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -397,16 +383,16 @@ public SearchForHits(string indexName) public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -423,37 +409,37 @@ public SearchForHits(string indexName) public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -464,37 +450,37 @@ public SearchForHits(string indexName) public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -505,30 +491,30 @@ public SearchForHits(string indexName) public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -540,16 +526,16 @@ public SearchForHits(string indexName) public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -560,9 +546,9 @@ public SearchForHits(string indexName) public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -573,9 +559,9 @@ public SearchForHits(string indexName) public ReRankingApplyFilter ReRankingApplyFilter { get; set; } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } @@ -614,14 +600,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -721,14 +705,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -867,10 +849,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -880,10 +858,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHitsOptions.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHitsOptions.cs index 50ca3d9ba9..f8bf690834 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHitsOptions.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHitsOptions.cs @@ -30,16 +30,16 @@ public SearchForHitsOptions() { } /// /// Initializes a new instance of the SearchForHitsOptions class. /// - /// Algolia index name. (required). + /// Index name. (required). public SearchForHitsOptions(string indexName) { IndexName = indexName ?? throw new ArgumentNullException(nameof(indexName)); } /// - /// Algolia index name. + /// Index name. /// - /// Algolia index name. + /// Index name. [JsonPropertyName("indexName")] public string IndexName { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchHits.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchHits.cs index 9f34777bb8..44925b6229 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchHits.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchHits.cs @@ -27,8 +27,8 @@ public SearchHits() /// /// Initializes a new instance of the SearchHits class. /// - /// hits (required). - /// Text to search for in an index. (required) (default to ""). + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. (required). + /// Search query. (required) (default to ""). /// URL-encoded string of all search parameters. (required). public SearchHits(List hits, string query, string varParams) { @@ -39,15 +39,16 @@ public SearchHits(List hits, string query, string varParams) } /// - /// Gets or Sets Hits + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. /// + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. [JsonPropertyName("hits")] public List Hits { get; set; } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs index 989b910097..4e54e97bad 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs @@ -48,23 +48,23 @@ public SearchParamsObject() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. /// - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. [JsonPropertyName("similarQuery")] public string SimilarQuery { get; set; } /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). /// - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). [JsonPropertyName("filters")] public string Filters { get; set; } @@ -93,65 +93,65 @@ public SearchParamsObject() public TagFilters TagFilters { get; set; } /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). /// - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). [JsonPropertyName("sumOrFiltersScores")] public bool? SumOrFiltersScores { get; set; } /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. /// - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. [JsonPropertyName("restrictSearchableAttributes")] public List RestrictSearchableAttributes { get; set; } /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). /// - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). [JsonPropertyName("facets")] public List Facets { get; set; } /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. /// - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. [JsonPropertyName("facetingAfterDistinct")] public bool? FacetingAfterDistinct { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. /// - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. [JsonPropertyName("offset")] public int? Offset { get; set; } /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). /// - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). [JsonPropertyName("length")] public int? Length { get; set; } /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. /// - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. [JsonPropertyName("aroundLatLng")] public string AroundLatLng { get; set; } /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. /// - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. [JsonPropertyName("aroundLatLngViaIP")] public bool? AroundLatLngViaIP { get; set; } @@ -168,86 +168,79 @@ public SearchParamsObject() public AroundPrecision AroundPrecision { get; set; } /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. /// - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. [JsonPropertyName("minimumAroundRadius")] public int? MinimumAroundRadius { get; set; } /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). /// - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). [JsonPropertyName("insideBoundingBox")] public List> InsideBoundingBox { get; set; } /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. /// - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. [JsonPropertyName("insidePolygon")] public List> InsidePolygon { get; set; } /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. /// - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. [JsonPropertyName("naturalLanguages")] public List NaturalLanguages { get; set; } /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. /// - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. [JsonPropertyName("ruleContexts")] public List RuleContexts { get; set; } /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). /// - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). [JsonPropertyName("personalizationImpact")] public int? PersonalizationImpact { get; set; } /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). /// - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). [JsonPropertyName("userToken")] public string UserToken { get; set; } /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. /// - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. [JsonPropertyName("getRankingInfo")] public bool? GetRankingInfo { get; set; } /// - /// Enriches the API's response with information about how the query was processed. + /// Whether to take into account an index's synonyms for this search. /// - /// Enriches the API's response with information about how the query was processed. - [JsonPropertyName("explain")] - public List Explain { get; set; } - - /// - /// Whether to take into account an index's synonyms for a particular search. - /// - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. [JsonPropertyName("synonyms")] public bool? Synonyms { get; set; } /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). /// - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). [JsonPropertyName("clickAnalytics")] public bool? ClickAnalytics { get; set; } /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. /// - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. [JsonPropertyName("analytics")] public bool? Analytics { get; set; } @@ -259,79 +252,72 @@ public SearchParamsObject() public List AnalyticsTags { get; set; } /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. /// - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. [JsonPropertyName("percentileComputation")] public bool? PercentileComputation { get; set; } /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. /// - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. [JsonPropertyName("enableABTest")] public bool? EnableABTest { get; set; } /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - /// - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - [JsonPropertyName("attributesForFaceting")] - public List AttributesForFaceting { get; set; } - - /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. /// - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. [JsonPropertyName("attributesToRetrieve")] public List AttributesToRetrieve { get; set; } /// - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ///
- /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
[JsonPropertyName("ranking")] public List Ranking { get; set; } /// - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ///
- /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
[JsonPropertyName("customRanking")] public List CustomRanking { get; set; } /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. /// - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. [JsonPropertyName("relevancyStrictness")] public int? RelevancyStrictness { get; set; } /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). /// - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). [JsonPropertyName("attributesToHighlight")] public List AttributesToHighlight { get; set; } /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. /// - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. [JsonPropertyName("attributesToSnippet")] public List AttributesToSnippet { get; set; } /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPreTag")] public string HighlightPreTag { get; set; } /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. /// - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. [JsonPropertyName("highlightPostTag")] public string HighlightPostTag { get; set; } @@ -343,9 +329,9 @@ public SearchParamsObject() public string SnippetEllipsisText { get; set; } /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. /// - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. [JsonPropertyName("restrictHighlightAndSnippetArrays")] public bool? RestrictHighlightAndSnippetArrays { get; set; } @@ -357,16 +343,16 @@ public SearchParamsObject() public int? HitsPerPage { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor1Typo")] public int? MinWordSizefor1Typo { get; set; } /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). /// - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). [JsonPropertyName("minWordSizefor2Typos")] public int? MinWordSizefor2Typos { get; set; } @@ -377,16 +363,16 @@ public SearchParamsObject() public TypoTolerance TypoTolerance { get; set; } /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. /// - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. [JsonPropertyName("allowTyposOnNumericTokens")] public bool? AllowTyposOnNumericTokens { get; set; } /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. /// - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. [JsonPropertyName("disableTypoToleranceOnAttributes")] public List DisableTypoToleranceOnAttributes { get; set; } @@ -403,37 +389,37 @@ public SearchParamsObject() public RemoveStopWords RemoveStopWords { get; set; } /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. /// - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. [JsonPropertyName("keepDiacriticsOnCharacters")] public string KeepDiacriticsOnCharacters { get; set; } /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). /// - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). [JsonPropertyName("queryLanguages")] public List QueryLanguages { get; set; } /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. /// - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. [JsonPropertyName("decompoundQuery")] public bool? DecompoundQuery { get; set; } /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. /// - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. [JsonPropertyName("enableRules")] public bool? EnableRules { get; set; } /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. /// - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. [JsonPropertyName("enablePersonalization")] public bool? EnablePersonalization { get; set; } @@ -444,37 +430,37 @@ public SearchParamsObject() public SemanticSearch SemanticSearch { get; set; } /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. /// - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. [JsonPropertyName("advancedSyntax")] public bool? AdvancedSyntax { get; set; } /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). /// - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). [JsonPropertyName("optionalWords")] public List OptionalWords { get; set; } /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. /// - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. [JsonPropertyName("disableExactOnAttributes")] public List DisableExactOnAttributes { get; set; } /// - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. ///
- /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
.
[JsonPropertyName("alternativesAsExact")] public List AlternativesAsExact { get; set; } /// - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. ///
- /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true.
[JsonPropertyName("advancedSyntaxFeatures")] public List AdvancedSyntaxFeatures { get; set; } @@ -485,30 +471,30 @@ public SearchParamsObject() public Distinct Distinct { get; set; } /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. /// - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. [JsonPropertyName("replaceSynonymsInHighlight")] public bool? ReplaceSynonymsInHighlight { get; set; } /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. /// - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. [JsonPropertyName("minProximity")] public int? MinProximity { get; set; } /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. /// - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. [JsonPropertyName("responseFields")] public List ResponseFields { get; set; } /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). /// - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } @@ -520,16 +506,16 @@ public SearchParamsObject() public int? MaxValuesPerFacet { get; set; } /// - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ///
- /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
[JsonPropertyName("sortFacetValuesBy")] public string SortFacetValuesBy { get; set; } /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. /// - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. [JsonPropertyName("attributeCriteriaComputedByMinProximity")] public bool? AttributeCriteriaComputedByMinProximity { get; set; } @@ -540,9 +526,9 @@ public SearchParamsObject() public RenderingContent RenderingContent { get; set; } /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. /// - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. [JsonPropertyName("enableReRanking")] public bool? EnableReRanking { get; set; } @@ -586,14 +572,12 @@ public override string ToString() sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append(" UserToken: ").Append(UserToken).Append("\n"); sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n"); - sb.Append(" Explain: ").Append(Explain).Append("\n"); sb.Append(" Synonyms: ").Append(Synonyms).Append("\n"); sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n"); sb.Append(" Analytics: ").Append(Analytics).Append("\n"); sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n"); sb.Append(" PercentileComputation: ").Append(PercentileComputation).Append("\n"); sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); - sb.Append(" AttributesForFaceting: ").Append(AttributesForFaceting).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); @@ -690,14 +674,12 @@ public override bool Equals(object obj) (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)) && (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) && (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) && - (Explain == input.Explain || Explain != null && input.Explain != null && Explain.SequenceEqual(input.Explain)) && (Synonyms == input.Synonyms || Synonyms.Equals(input.Synonyms)) && (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) && (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) && (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) && (PercentileComputation == input.PercentileComputation || PercentileComputation.Equals(input.PercentileComputation)) && (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && - (AttributesForFaceting == input.AttributesForFaceting || AttributesForFaceting != null && input.AttributesForFaceting != null && AttributesForFaceting.SequenceEqual(input.AttributesForFaceting)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && @@ -830,10 +812,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + UserToken.GetHashCode(); } hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode(); - if (Explain != null) - { - hashCode = (hashCode * 59) + Explain.GetHashCode(); - } hashCode = (hashCode * 59) + Synonyms.GetHashCode(); hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode(); hashCode = (hashCode * 59) + Analytics.GetHashCode(); @@ -843,10 +821,6 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + PercentileComputation.GetHashCode(); hashCode = (hashCode * 59) + EnableABTest.GetHashCode(); - if (AttributesForFaceting != null) - { - hashCode = (hashCode * 59) + AttributesForFaceting.GetHashCode(); - } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsQuery.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsQuery.cs index 54527b8e9a..0d491a1777 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsQuery.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsQuery.cs @@ -24,9 +24,9 @@ public SearchParamsQuery() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchResponse.cs index 06d28c694f..6b6484cd06 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchResponse.cs @@ -28,12 +28,12 @@ public SearchResponse() /// Initializes a new instance of the SearchResponse class. ///
/// Number of hits per page. (required) (default to 20). - /// Number of hits the search query matched. (required). - /// Number of pages of results for the current query. (required). - /// Page to retrieve (the first page is `0`, not `1`). (required) (default to 0). + /// Number of results (hits). (required). + /// Number of pages of results. (required). + /// Page of search results to retrieve. (required) (default to 0). /// Time the server took to process the request, in milliseconds. (required). - /// hits (required). - /// Text to search for in an index. (required) (default to ""). + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. (required). + /// Search query. (required) (default to ""). /// URL-encoded string of all search parameters. (required). public SearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int processingTimeMS, List hits, string query, string varParams) { @@ -70,9 +70,9 @@ public SearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string AroundLatLng { get; set; } /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. /// - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. [JsonPropertyName("automaticRadius")] public string AutomaticRadius { get; set; } @@ -107,9 +107,9 @@ public SearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public bool? ExhaustiveTypo { get; set; } /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. /// - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. [JsonPropertyName("facets")] public Dictionary> Facets { get; set; } @@ -149,16 +149,16 @@ public SearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string Message { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } /// - /// Number of pages of results for the current query. + /// Number of pages of results. /// - /// Number of pages of results for the current query. + /// Number of pages of results. [JsonPropertyName("nbPages")] public int NbPages { get; set; } @@ -170,9 +170,9 @@ public SearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public int? NbSortedHits { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int Page { get; set; } @@ -231,9 +231,9 @@ public SearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string ServerUsed { get; set; } /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. /// - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. [JsonPropertyName("userData")] public object UserData { get; set; } @@ -245,15 +245,16 @@ public SearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int pr public string QueryID { get; set; } /// - /// Gets or Sets Hits + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. /// + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. [JsonPropertyName("hits")] public List Hits { get; set; } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesParams.cs index dc8985c067..276fa52c7d 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesParams.cs @@ -30,23 +30,23 @@ public SearchRulesParams() } /// - /// Rule object query. + /// Search query for rules. /// - /// Rule object query. + /// Search query for rules. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + /// Only return rules that match the context (exact match). /// - /// Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + /// Only return rules that match the context (exact match). [JsonPropertyName("context")] public string Context { get; set; } /// - /// Requested page (the first page is page 0). + /// Requested page of the API response. /// - /// Requested page (the first page is page 0). + /// Requested page of the API response. [JsonPropertyName("page")] public int? Page { get; set; } @@ -58,19 +58,12 @@ public SearchRulesParams() public int? HitsPerPage { get; set; } /// - /// Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + /// If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. /// - /// Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + /// If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. [JsonPropertyName("enabled")] public bool? Enabled { get; set; } - /// - /// Request options to send with the API call. - /// - /// Request options to send with the API call. - [JsonPropertyName("requestOptions")] - public List RequestOptions { get; set; } - /// /// Returns the string presentation of the object /// @@ -85,7 +78,6 @@ public override string ToString() sb.Append(" Page: ").Append(Page).Append("\n"); sb.Append(" HitsPerPage: ").Append(HitsPerPage).Append("\n"); sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" RequestOptions: ").Append(RequestOptions).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -117,8 +109,7 @@ public override bool Equals(object obj) (Context == input.Context || (Context != null && Context.Equals(input.Context))) && (Page == input.Page || Page.Equals(input.Page)) && (HitsPerPage == input.HitsPerPage || HitsPerPage.Equals(input.HitsPerPage)) && - (Enabled == input.Enabled || (Enabled != null && Enabled.Equals(input.Enabled))) && - (RequestOptions == input.RequestOptions || RequestOptions != null && input.RequestOptions != null && RequestOptions.SequenceEqual(input.RequestOptions)); + (Enabled == input.Enabled || (Enabled != null && Enabled.Equals(input.Enabled))); } /// @@ -145,10 +136,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Enabled.GetHashCode(); } - if (RequestOptions != null) - { - hashCode = (hashCode * 59) + RequestOptions.GetHashCode(); - } return hashCode; } } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesResponse.cs index ed6ff37e6c..4c00a49f84 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchRulesResponse.cs @@ -24,8 +24,8 @@ public SearchRulesResponse() { } /// /// Initializes a new instance of the SearchRulesResponse class. /// - /// Fetched rules. (required). - /// Number of fetched rules. (required). + /// Rules that matched the search criteria. (required). + /// Number of rules that matched the search criteria. (required). /// Current page. (required). /// Number of pages. (required). public SearchRulesResponse(List hits, int nbHits, int page, int nbPages) @@ -37,16 +37,16 @@ public SearchRulesResponse(List hits, int nbHits, int page, int nbPages) } /// - /// Fetched rules. + /// Rules that matched the search criteria. /// - /// Fetched rules. + /// Rules that matched the search criteria. [JsonPropertyName("hits")] public List Hits { get; set; } /// - /// Number of fetched rules. + /// Number of rules that matched the search criteria. /// - /// Number of fetched rules. + /// Number of rules that matched the search criteria. [JsonPropertyName("nbHits")] public int NbHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchStrategy.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchStrategy.cs index 2e56f9f979..fb368cce34 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchStrategy.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchStrategy.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. +/// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. /// -/// - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. +/// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. public enum SearchStrategy { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsParams.cs index 0d7b25dadf..c6750a7ff2 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsParams.cs @@ -30,16 +30,16 @@ public SearchSynonymsParams() } /// - /// Text to search for in an index. + /// Search query. /// - /// Text to search for in an index. + /// Search query. [JsonPropertyName("query")] public string Query { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsResponse.cs index 3844a4163e..1ed846c474 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchSynonymsResponse.cs @@ -27,8 +27,8 @@ public SearchSynonymsResponse() /// /// Initializes a new instance of the SearchSynonymsResponse class. /// - /// Synonym objects. (required). - /// Number of hits the search query matched. (required). + /// Matching synonyms. (required). + /// Number of results (hits). (required). public SearchSynonymsResponse(List hits, int nbHits) { Hits = hits ?? throw new ArgumentNullException(nameof(hits)); @@ -37,16 +37,16 @@ public SearchSynonymsResponse(List hits, int nbHits) } /// - /// Synonym objects. + /// Matching synonyms. /// - /// Synonym objects. + /// Matching synonyms. [JsonPropertyName("hits")] public List Hits { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsParams.cs index 983dfdfe60..1145c62227 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsParams.cs @@ -45,9 +45,9 @@ public SearchUserIdsParams(string query) public string ClusterName { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int? Page { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsResponse.cs index 23b16ecd12..26732636a7 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchUserIdsResponse.cs @@ -25,8 +25,8 @@ public SearchUserIdsResponse() { } /// Initializes a new instance of the SearchUserIdsResponse class. /// /// User objects that match the query. (required). - /// Number of hits the search query matched. (required). - /// Page to retrieve (the first page is `0`, not `1`). (required) (default to 0). + /// Number of results (hits). (required). + /// Page of search results to retrieve. (required) (default to 0). /// Maximum number of hits per page. (required) (default to 20). /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). public SearchUserIdsResponse(List hits, int nbHits, int page, int hitsPerPage, string updatedAt) @@ -46,16 +46,16 @@ public SearchUserIdsResponse(List hits, int nbHits, int page, int hitsP public List Hits { get; set; } /// - /// Number of hits the search query matched. + /// Number of results (hits). /// - /// Number of hits the search query matched. + /// Number of results (hits). [JsonPropertyName("nbHits")] public int NbHits { get; set; } /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. /// - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. [JsonPropertyName("page")] public int Page { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SecuredAPIKeyRestrictions.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SecuredAPIKeyRestrictions.cs index a457211109..dcc7cd4abd 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SecuredAPIKeyRestrictions.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SecuredAPIKeyRestrictions.cs @@ -30,37 +30,37 @@ public SecuredAPIKeyRestrictions() public SearchParamsObject SearchParams { get; set; } /// - /// Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + /// Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. /// - /// Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + /// Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. [JsonPropertyName("filters")] public string Filters { get; set; } /// - /// Unix timestamp used to set the expiration date of the API key. + /// Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. /// - /// Unix timestamp used to set the expiration date of the API key. + /// Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. [JsonPropertyName("validUntil")] public long? ValidUntil { get; set; } /// - /// Index names that can be queried. + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". /// - /// Index names that can be queried. + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". [JsonPropertyName("restrictIndices")] public List RestrictIndices { get; set; } /// - /// IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + /// IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. /// - /// IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + /// IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. [JsonPropertyName("restrictSources")] public string RestrictSources { get; set; } /// - /// Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + /// Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. /// - /// Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + /// Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. [JsonPropertyName("userToken")] public string UserToken { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SemanticSearch.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SemanticSearch.cs index ce5b1871ec..14d51df129 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SemanticSearch.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SemanticSearch.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. /// public partial class SemanticSearch { @@ -24,9 +24,9 @@ public SemanticSearch() } /// - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. /// - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. [JsonPropertyName("eventSources")] public List EventSources { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SnippetResultOption.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SnippetResultOption.cs index 127d6e1a1b..0a164aa1ca 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SnippetResultOption.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SnippetResultOption.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +/// Snippets that show the context around a matching search query. /// public partial class SnippetResultOption { @@ -30,7 +30,7 @@ public SnippetResultOption() { } /// /// Initializes a new instance of the SnippetResultOption class. /// - /// Markup text with `facetQuery` matches highlighted. (required). + /// Highlighted attribute value, including HTML tags. (required). /// matchLevel (required). public SnippetResultOption(string value, MatchLevel? matchLevel) { @@ -39,9 +39,9 @@ public SnippetResultOption(string value, MatchLevel? matchLevel) } /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. /// - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. [JsonPropertyName("value")] public string Value { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SortRemainingBy.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SortRemainingBy.cs index 5193d66733..0046f4e9d8 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SortRemainingBy.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SortRemainingBy.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. ///
-/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
.
public enum SortRemainingBy { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TagFilters.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TagFilters.cs index bf413715be..b7d8bdd256 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TagFilters.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TagFilters.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +/// Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. /// [JsonConverter(typeof(TagFiltersJsonConverter))] public partial class TagFilters : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TaskStatus.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TaskStatus.cs index 98e9011784..fa1cb577b3 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TaskStatus.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TaskStatus.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. /// -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. public enum TaskStatus { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TimeRange.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TimeRange.cs index d6ebddff1d..460c6d5d30 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TimeRange.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TimeRange.cs @@ -24,8 +24,8 @@ public TimeRange() { } /// /// Initializes a new instance of the TimeRange class. /// - /// Lower bound of the time range (Unix timestamp). (required). - /// Upper bound of the time range (Unix timestamp). (required). + /// When the rule should start to be active, in Unix epoch time. (required). + /// When the rule should stop to be active, in Unix epoch time. (required). public TimeRange(int from, int until) { From = from; @@ -33,16 +33,16 @@ public TimeRange(int from, int until) } /// - /// Lower bound of the time range (Unix timestamp). + /// When the rule should start to be active, in Unix epoch time. /// - /// Lower bound of the time range (Unix timestamp). + /// When the rule should start to be active, in Unix epoch time. [JsonPropertyName("from")] public int From { get; set; } /// - /// Upper bound of the time range (Unix timestamp). + /// When the rule should stop to be active, in Unix epoch time. /// - /// Upper bound of the time range (Unix timestamp). + /// When the rule should stop to be active, in Unix epoch time. [JsonPropertyName("until")] public int Until { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoTolerance.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoTolerance.cs index 270535743e..bd6af074ee 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoTolerance.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoTolerance.cs @@ -15,7 +15,7 @@ namespace Algolia.Search.Models.Search; /// -/// Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. +/// Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. /// [JsonConverter(typeof(TypoToleranceJsonConverter))] public partial class TypoTolerance : AbstractSchema diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoToleranceEnum.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoToleranceEnum.cs index b3ca8750b1..119d407f4b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoToleranceEnum.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/TypoToleranceEnum.cs @@ -12,8 +12,9 @@ namespace Algolia.Search.Models.Search; /// -/// Defines typoToleranceEnum +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. /// +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. public enum TypoToleranceEnum { /// diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtResponse.cs index 49fce79e93..c89b6b9fb1 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtResponse.cs @@ -24,7 +24,7 @@ public UpdatedAtResponse() { } /// /// Initializes a new instance of the UpdatedAtResponse class. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). public UpdatedAtResponse(long taskID, string updatedAt) { @@ -33,9 +33,9 @@ public UpdatedAtResponse(long taskID, string updatedAt) } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtWithObjectIdResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtWithObjectIdResponse.cs index 6167befdc2..e8ec520d9b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtWithObjectIdResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedAtWithObjectIdResponse.cs @@ -24,9 +24,9 @@ public UpdatedAtWithObjectIdResponse() } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long? TaskID { get; set; } @@ -38,9 +38,9 @@ public UpdatedAtWithObjectIdResponse() public string UpdatedAt { get; set; } /// - /// Unique object identifier. + /// Unique record identifier. /// - /// Unique object identifier. + /// Unique record identifier. [JsonPropertyName("objectID")] public string ObjectID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedRuleResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedRuleResponse.cs index 49038014dc..4e93239933 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedRuleResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedRuleResponse.cs @@ -24,9 +24,9 @@ public UpdatedRuleResponse() { } /// /// Initializes a new instance of the UpdatedRuleResponse class. /// - /// Unique object identifier. (required). + /// Unique identifier of a rule object. (required). /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. (required). - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. (required). + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required). public UpdatedRuleResponse(string objectID, string updatedAt, long taskID) { ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID)); @@ -35,9 +35,9 @@ public UpdatedRuleResponse(string objectID, string updatedAt, long taskID) } /// - /// Unique object identifier. + /// Unique identifier of a rule object. /// - /// Unique object identifier. + /// Unique identifier of a rule object. [JsonPropertyName("objectID")] public string ObjectID { get; set; } @@ -49,9 +49,9 @@ public UpdatedRuleResponse(string objectID, string updatedAt, long taskID) public string UpdatedAt { get; set; } /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. /// - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. [JsonPropertyName("taskID")] public long TaskID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserHit.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserHit.cs index 75b3c8b2eb..8857932075 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserHit.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserHit.cs @@ -24,7 +24,7 @@ public UserHit() { } /// /// Initializes a new instance of the UserHit class. /// - /// userID of the user. (required). + /// User ID. (required). /// Cluster name. (required). /// Number of records in the cluster. (required). /// Data size taken by all the users assigned to the cluster. (required). @@ -41,9 +41,9 @@ public UserHit(string userID, string clusterName, int nbRecords, int dataSize, s } /// - /// userID of the user. + /// User ID. /// - /// userID of the user. + /// User ID. [JsonPropertyName("userID")] public string UserID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserId.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserId.cs index 6a4e6b959b..d927cb28b9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserId.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UserId.cs @@ -24,7 +24,7 @@ public UserId() { } /// /// Initializes a new instance of the UserId class. /// - /// userID of the user. (required). + /// User ID. (required). /// Cluster to which the user is assigned. (required). /// Number of records belonging to the user. (required). /// Data size used by the user. (required). @@ -37,9 +37,9 @@ public UserId(string varUserID, string clusterName, int nbRecords, int dataSize) } /// - /// userID of the user. + /// User ID. /// - /// userID of the user. + /// User ID. [JsonPropertyName("userID")] public string VarUserID { get; set; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Value.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Value.cs index 0214a61df7..967c458a90 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Value.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Value.cs @@ -30,9 +30,9 @@ public Value() } /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. /// - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. [JsonPropertyName("order")] public List Order { get; set; } diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart index 39ece0ff5a..2f01406f4b 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart @@ -72,6 +72,7 @@ export 'src/model/remove_words_if_no_results.dart'; export 'src/model/rendering_content.dart'; export 'src/model/rule.dart'; export 'src/model/scope_type.dart'; +export 'src/model/search_dictionary_entries_response.dart'; export 'src/model/search_for_facet_values_response.dart'; export 'src/model/search_for_facets.dart'; export 'src/model/search_for_facets_options.dart'; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/api/search_client.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/api/search_client.dart index c784987c0a..e8e3a39bf0 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/api/search_client.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/api/search_client.dart @@ -80,13 +80,13 @@ final class SearchClient implements ApiClient { ); } - /// Send multiple search queries to one or more indices. + /// Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. /// /// Required API Key ACLs: /// - search /// /// Parameters: - /// * [searchMethodParams] Query requests and strategies. Results will be received in the same order as the queries. + /// * [searchMethodParams] Muli-search request body. Results are returned in the same order as the requests. /// * [requestOptions] additional request configuration. Future search({ required SearchMethodParams searchMethodParams, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart index 495a6f6b9f..888fb4d956 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart @@ -65,6 +65,7 @@ import 'package:algoliasearch/src/model/remove_words_if_no_results.dart'; import 'package:algoliasearch/src/model/rendering_content.dart'; import 'package:algoliasearch/src/model/rule.dart'; import 'package:algoliasearch/src/model/scope_type.dart'; +import 'package:algoliasearch/src/model/search_dictionary_entries_response.dart'; import 'package:algoliasearch/src/model/search_for_facet_values_response.dart'; import 'package:algoliasearch/src/model/search_for_facets.dart'; import 'package:algoliasearch/src/model/search_for_facets_options.dart'; @@ -279,6 +280,9 @@ ReturnType deserialize(dynamic value, String targetType, return Rule.fromJson(value as Map) as ReturnType; case 'ScopeType': return ScopeType.fromJson(value) as ReturnType; + case 'SearchDictionaryEntriesResponse': + return SearchDictionaryEntriesResponse.fromJson( + value as Map) as ReturnType; case 'SearchForFacetValuesResponse': return SearchForFacetValuesResponse.fromJson( value as Map) as ReturnType; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/acl.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/acl.dart index 553a811efd..ad4d9e1446 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/acl.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/acl.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. +/// Access control list permissions. @JsonEnum(valueField: 'raw') enum Acl { addObject(r'addObject'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/action.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/action.dart index 9a563408a0..a908b973b8 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/action.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/action.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Type of batch operation. +/// Type of indexing operation. @JsonEnum(valueField: 'raw') enum Action { addObject(r'addObject'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/add_api_key_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/add_api_key_response.dart index 3a18fe4cc5..fefe0126e6 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/add_api_key_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/add_api_key_response.dart @@ -17,7 +17,7 @@ final class AddApiKeyResponse { @JsonKey(name: r'key') final String key; - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. @JsonKey(name: r'createdAt') final String createdAt; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/anchoring.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/anchoring.dart index 70e9b365ab..d598ccac6b 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/anchoring.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/anchoring.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. @JsonEnum(valueField: 'raw') enum Anchoring { is_(r'is'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/api_key.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/api_key.dart index 52465e0058..bcc83defed 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/api_key.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/api_key.dart @@ -20,35 +20,35 @@ final class ApiKey { this.validity, }); - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). @JsonKey(name: r'acl') final List acl; - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. @JsonKey(name: r'description') final String? description; - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". @JsonKey(name: r'indexes') final List? indexes; - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. @JsonKey(name: r'maxHitsPerQuery') final int? maxHitsPerQuery; - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. @JsonKey(name: r'maxQueriesPerIPPerHour') final int? maxQueriesPerIPPerHour; - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. @JsonKey(name: r'queryParameters') final String? queryParameters; - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). @JsonKey(name: r'referers') final List? referers; - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. @JsonKey(name: r'validity') final int? validity; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.dart index 446ba48cec..b426c8727f 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.dart @@ -13,9 +13,11 @@ final class AroundPrecisionFromValueInner { this.value, }); + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. @JsonKey(name: r'from') final int? from; + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. @JsonKey(name: r'value') final int? value; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_radius_all.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_radius_all.dart index 907fb416e0..32716a4a53 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_radius_all.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_radius_all.dart @@ -2,6 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. @JsonEnum(valueField: 'raw') enum AroundRadiusAll { all(r'all'); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/automatic_facet_filter.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/automatic_facet_filter.dart index a9fb95c8f2..1ac92f0854 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/automatic_facet_filter.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/automatic_facet_filter.dart @@ -14,15 +14,15 @@ final class AutomaticFacetFilter { this.disjunctive, }); - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. @JsonKey(name: r'facet') final String facet; - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. @JsonKey(name: r'score') final int? score; - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. @JsonKey(name: r'disjunctive') final bool? disjunctive; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart index 289d247974..689f76429f 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart @@ -9,6 +9,7 @@ part 'base_index_settings.g.dart'; final class BaseIndexSettings { /// Returns a new [BaseIndexSettings] instance. const BaseIndexSettings({ + this.attributesForFaceting, this.replicas, this.paginationLimitedTo, this.unretrievableAttributes, @@ -27,67 +28,72 @@ final class BaseIndexSettings { this.attributeForDistinct, }); - /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + @JsonKey(name: r'attributesForFaceting') + final List? attributesForFaceting; + + /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). @JsonKey(name: r'replicas') final List? replicas; - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. + // maximum: 20000 @JsonKey(name: r'paginationLimitedTo') final int? paginationLimitedTo; - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. @JsonKey(name: r'unretrievableAttributes') final List? unretrievableAttributes; - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. @JsonKey(name: r'disableTypoToleranceOnWords') final List? disableTypoToleranceOnWords; - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. @JsonKey(name: r'attributesToTransliterate') final List? attributesToTransliterate; - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. @JsonKey(name: r'camelCaseAttributes') final List? camelCaseAttributes; - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). @JsonKey(name: r'decompoundedAttributes') final Object? decompoundedAttributes; - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'indexLanguages') final List? indexLanguages; - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). @JsonKey(name: r'disablePrefixOnAttributes') final List? disablePrefixOnAttributes; - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. @JsonKey(name: r'allowCompressionOfIntegerArray') final bool? allowCompressionOfIntegerArray; - /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. @JsonKey(name: r'numericAttributesForFiltering') final List? numericAttributesForFiltering; - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. @JsonKey(name: r'separatorsToIndex') final String? separatorsToIndex; - /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. @JsonKey(name: r'searchableAttributes') final List? searchableAttributes; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). @JsonKey(name: r'customNormalization') final Map>? customNormalization; - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. @JsonKey(name: r'attributeForDistinct') final String? attributeForDistinct; @@ -95,6 +101,7 @@ final class BaseIndexSettings { bool operator ==(Object other) => identical(this, other) || other is BaseIndexSettings && + other.attributesForFaceting == attributesForFaceting && other.replicas == replicas && other.paginationLimitedTo == paginationLimitedTo && other.unretrievableAttributes == unretrievableAttributes && @@ -116,6 +123,7 @@ final class BaseIndexSettings { @override int get hashCode => + attributesForFaceting.hashCode + replicas.hashCode + paginationLimitedTo.hashCode + unretrievableAttributes.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart index fe72472cc4..e6493c1c59 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart @@ -12,6 +12,8 @@ BaseIndexSettings _$BaseIndexSettingsFromJson(Map json) => json, ($checkedConvert) { final val = BaseIndexSettings( + attributesForFaceting: $checkedConvert('attributesForFaceting', + (v) => (v as List?)?.map((e) => e as String).toList()), replicas: $checkedConvert('replicas', (v) => (v as List?)?.map((e) => e as String).toList()), paginationLimitedTo: @@ -64,6 +66,7 @@ Map _$BaseIndexSettingsToJson(BaseIndexSettings instance) { } } + writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('replicas', instance.replicas); writeNotNull('paginationLimitedTo', instance.paginationLimitedTo); writeNotNull('unretrievableAttributes', instance.unretrievableAttributes); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart index ca9473e235..92af662886 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart @@ -35,7 +35,6 @@ final class BaseSearchParams { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, @@ -44,15 +43,15 @@ final class BaseSearchParams { this.enableABTest, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -84,41 +83,42 @@ final class BaseSearchParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -134,52 +134,50 @@ final class BaseSearchParams { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -187,11 +185,11 @@ final class BaseSearchParams { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; @@ -225,7 +223,6 @@ final class BaseSearchParams { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && @@ -261,7 +258,6 @@ final class BaseSearchParams { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.g.dart index 8d10211d64..388cb5ab33 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.g.dart @@ -60,8 +60,6 @@ BaseSearchParams _$BaseSearchParamsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -111,7 +109,6 @@ Map _$BaseSearchParamsToJson(BaseSearchParams instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart index 1bd5481d4e..4d61b6e3cf 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart @@ -34,7 +34,6 @@ final class BaseSearchParamsWithoutQuery { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, @@ -43,11 +42,11 @@ final class BaseSearchParamsWithoutQuery { this.enableABTest, }); - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -79,41 +78,42 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -129,52 +129,50 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -182,11 +180,11 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; @@ -219,7 +217,6 @@ final class BaseSearchParamsWithoutQuery { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && @@ -254,7 +251,6 @@ final class BaseSearchParamsWithoutQuery { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.g.dart index 684c54effd..891b08e053 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.g.dart @@ -60,8 +60,6 @@ BaseSearchParamsWithoutQuery _$BaseSearchParamsWithoutQueryFromJson( $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -111,7 +109,6 @@ Map _$BaseSearchParamsWithoutQueryToJson( writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_response.dart index 3fcf9ce5de..b7f53252dc 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_response.dart @@ -58,7 +58,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -80,7 +80,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -106,11 +106,11 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -118,7 +118,8 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -152,7 +153,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart index 16a949c7e3..ed361ea021 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart @@ -43,14 +43,12 @@ final class BrowseParamsObject { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -98,15 +96,15 @@ final class BrowseParamsObject { this.cursor, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -138,41 +136,42 @@ final class BrowseParamsObject { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -188,52 +187,50 @@ final class BrowseParamsObject { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -241,47 +238,43 @@ final class BrowseParamsObject { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -289,7 +282,7 @@ final class BrowseParamsObject { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -299,11 +292,11 @@ final class BrowseParamsObject { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -313,11 +306,11 @@ final class BrowseParamsObject { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -333,23 +326,23 @@ final class BrowseParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -365,26 +358,26 @@ final class BrowseParamsObject { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -394,41 +387,42 @@ final class BrowseParamsObject { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -439,7 +433,7 @@ final class BrowseParamsObject { @JsonKey(name: r'reRankingApplyFilter') final dynamic reRankingApplyFilter; - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. @JsonKey(name: r'cursor') final String? cursor; @@ -473,14 +467,12 @@ final class BrowseParamsObject { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -558,14 +550,12 @@ final class BrowseParamsObject { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart index 5919b3d331..eba0f2658b 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart @@ -60,8 +60,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -70,8 +68,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -206,14 +202,12 @@ Map _$BrowseParamsObjectToJson(BrowseParamsObject instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_response.dart index 4be89ac48f..69e140974c 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_response.dart @@ -61,7 +61,7 @@ final class BrowseResponse { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -83,7 +83,7 @@ final class BrowseResponse { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -109,11 +109,11 @@ final class BrowseResponse { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -121,7 +121,8 @@ final class BrowseResponse { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -155,7 +156,7 @@ final class BrowseResponse { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; @@ -163,10 +164,11 @@ final class BrowseResponse { @JsonKey(name: r'queryID') final String? queryID; + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. @JsonKey(name: r'hits') final List hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String query; @@ -174,7 +176,7 @@ final class BrowseResponse { @JsonKey(name: r'params') final String params; - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. @JsonKey(name: r'cursor') final String? cursor; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation.dart index 9b558055ce..572e446545 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation.dart @@ -17,7 +17,7 @@ final class BuiltInOperation { @JsonKey(name: r'_operation') final BuiltInOperationType operation; - /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. @JsonKey(name: r'value') final String value; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation_type.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation_type.dart index 5fe06ce0b9..8198509d48 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation_type.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/built_in_operation_type.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Operation to apply to the attribute. +/// How to change the attribute. @JsonEnum(valueField: 'raw') enum BuiltInOperationType { increment(r'Increment'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.dart index ef038d2503..bc6a08c732 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.dart @@ -14,23 +14,28 @@ final class Condition { this.anchoring, this.alternatives, this.context, + this.filters, }); - /// Query pattern syntax. + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". @JsonKey(name: r'pattern') final String? pattern; @JsonKey(name: r'anchoring') final Anchoring? anchoring; - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. @JsonKey(name: r'alternatives') final bool? alternatives; - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. @JsonKey(name: r'context') final String? context; + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + @JsonKey(name: r'filters') + final String? filters; + @override bool operator ==(Object other) => identical(this, other) || @@ -38,14 +43,16 @@ final class Condition { other.pattern == pattern && other.anchoring == anchoring && other.alternatives == alternatives && - other.context == context; + other.context == context && + other.filters == filters; @override int get hashCode => pattern.hashCode + anchoring.hashCode + alternatives.hashCode + - context.hashCode; + context.hashCode + + filters.hashCode; factory Condition.fromJson(Map json) => _$ConditionFromJson(json); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.g.dart index af4d41cf04..043423a411 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/condition.g.dart @@ -16,6 +16,7 @@ Condition _$ConditionFromJson(Map json) => $checkedCreate( 'anchoring', (v) => $enumDecodeNullable(_$AnchoringEnumMap, v)), alternatives: $checkedConvert('alternatives', (v) => v as bool?), context: $checkedConvert('context', (v) => v as String?), + filters: $checkedConvert('filters', (v) => v as String?), ); return val; }, @@ -34,6 +35,7 @@ Map _$ConditionToJson(Condition instance) { writeNotNull('anchoring', instance.anchoring?.toJson()); writeNotNull('alternatives', instance.alternatives); writeNotNull('context', instance.context); + writeNotNull('filters', instance.filters); return val; } diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence.dart index 82bccbbfd2..fc35ccecce 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence.dart @@ -21,22 +21,22 @@ final class Consequence { @JsonKey(name: r'params') final ConsequenceParams? params; - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. /// One of types: /// - [PromoteObjectIDs] /// - [PromoteObjectID] @JsonKey(name: r'promote') final Iterable? promote; - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. @JsonKey(name: r'filterPromotes') final bool? filterPromotes; - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. @JsonKey(name: r'hide') final List? hide; - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. @JsonKey(name: r'userData') final Object? userData; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_hide.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_hide.dart index 4e18b0bf37..0ab29e90e7 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_hide.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_hide.dart @@ -12,7 +12,7 @@ final class ConsequenceHide { required this.objectID, }); - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart index 7fac214d65..c7107d15ad 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart @@ -42,14 +42,12 @@ final class ConsequenceParams { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -99,11 +97,11 @@ final class ConsequenceParams { this.automaticOptionalFacetFilters, }); - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -135,41 +133,42 @@ final class ConsequenceParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -185,52 +184,50 @@ final class ConsequenceParams { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -238,47 +235,43 @@ final class ConsequenceParams { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -286,7 +279,7 @@ final class ConsequenceParams { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -296,11 +289,11 @@ final class ConsequenceParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -310,11 +303,11 @@ final class ConsequenceParams { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -330,23 +323,23 @@ final class ConsequenceParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -362,26 +355,26 @@ final class ConsequenceParams { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -391,41 +384,42 @@ final class ConsequenceParams { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -483,14 +477,12 @@ final class ConsequenceParams { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -569,14 +561,12 @@ final class ConsequenceParams { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart index 0a6efe01fd..875dc0b42e 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart @@ -59,8 +59,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -69,8 +67,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -208,14 +204,12 @@ Map _$ConsequenceParamsToJson(ConsequenceParams instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_query_object.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_query_object.dart index 4ac0af6610..7c0d68bc19 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_query_object.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_query_object.dart @@ -14,11 +14,11 @@ final class ConsequenceQueryObject { this.edits, }); - /// Words to remove. + /// Words to remove from the search query. @JsonKey(name: r'remove') final List? remove; - /// Edits to apply. + /// Changes to make to the search query. @JsonKey(name: r'edits') final List? edits; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/cursor.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/cursor.dart index f466d4aa99..761dda5ac9 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/cursor.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/cursor.dart @@ -12,7 +12,7 @@ final class Cursor { this.cursor, }); - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. @JsonKey(name: r'cursor') final String? cursor; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/delete_by_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/delete_by_params.dart index 85a0969aa4..c4a603327d 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/delete_by_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/delete_by_params.dart @@ -26,7 +26,7 @@ final class DeleteByParams { @JsonKey(name: r'facetFilters') final dynamic facetFilters; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -44,7 +44,7 @@ final class DeleteByParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; @@ -54,11 +54,11 @@ final class DeleteByParams { @JsonKey(name: r'aroundRadius') final dynamic aroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry.dart index 8fd202aece..c0e429b714 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry.dart @@ -20,23 +20,23 @@ final class DictionaryEntry extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); - /// Unique identifier for a dictionary object. + /// Unique identifier for the dictionary entry. @JsonKey(name: r'objectID') final String objectID; - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). @JsonKey(name: r'language') final String language; - /// Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + /// Matching dictionary word for `stopwords` and `compounds` dictionaries. @JsonKey(name: r'word') final String? word; - /// Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + /// Matching words in the `plurals` dictionary including declensions. @JsonKey(name: r'words') final List? words; - /// For compound entries, governs the behavior of the `word` parameter. + /// Invividual components of a compound word in the `compounds` dictionary. @JsonKey(name: r'decomposition') final List? decomposition; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry_state.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry_state.dart index 25b38cfa2e..bffec3d439 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry_state.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_entry_state.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). +/// Whether a dictionary entry is active. @JsonEnum(valueField: 'raw') enum DictionaryEntryState { enabled(r'enabled'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_language.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_language.dart index 592594f6f2..f111dea765 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_language.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/dictionary_language.dart @@ -12,7 +12,7 @@ final class DictionaryLanguage { this.nbCustomEntries, }); - /// If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + /// Number of custom dictionary entries. @JsonKey(name: r'nbCustomEntries') final int? nbCustomEntries; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/edit.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/edit.dart index be6bb65021..f6952f81f0 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/edit.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/edit.dart @@ -22,7 +22,7 @@ final class Edit { @JsonKey(name: r'delete') final String? delete; - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. @JsonKey(name: r'insert') final String? insert; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/exact_on_single_word_query.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/exact_on_single_word_query.dart index eaf88630da..d927439f3a 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/exact_on_single_word_query.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/exact_on_single_word_query.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. @JsonEnum(valueField: 'raw') enum ExactOnSingleWordQuery { attribute(r'attribute'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_hits.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_hits.dart index d9e6a39594..6abf6f2df8 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_hits.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_hits.dart @@ -18,11 +18,11 @@ final class FacetHits { @JsonKey(name: r'value') final String value; - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'highlighted') final String highlighted; - /// Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). @JsonKey(name: r'count') final int count; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_ordering.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_ordering.dart index 92e0489cdf..5098e5e92f 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_ordering.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facet_ordering.dart @@ -18,7 +18,7 @@ final class FacetOrdering { @JsonKey(name: r'facets') final Facets? facets; - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. @JsonKey(name: r'values') final Map? values; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facets.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facets.dart index 13e8ee4efd..9b3dad5a60 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facets.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/facets.dart @@ -12,7 +12,7 @@ final class Facets { this.order, }); - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. @JsonKey(name: r'order') final List? order; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/get_api_key_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/get_api_key_response.dart index 12e7bc89dd..1c08b90323 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/get_api_key_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/get_api_key_response.dart @@ -30,35 +30,35 @@ final class GetApiKeyResponse { @JsonKey(name: r'createdAt') final int createdAt; - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). @JsonKey(name: r'acl') final List acl; - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. @JsonKey(name: r'description') final String? description; - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". @JsonKey(name: r'indexes') final List? indexes; - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. @JsonKey(name: r'maxHitsPerQuery') final int? maxHitsPerQuery; - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. @JsonKey(name: r'maxQueriesPerIPPerHour') final int? maxQueriesPerIPPerHour; - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. @JsonKey(name: r'queryParameters') final String? queryParameters; - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). @JsonKey(name: r'referers') final List? referers; - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. @JsonKey(name: r'validity') final int? validity; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/highlight_result_option.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/highlight_result_option.dart index 34e7b2a405..84491a0e26 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/highlight_result_option.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/highlight_result_option.dart @@ -16,14 +16,14 @@ final class HighlightResultOption { this.fullyHighlighted, }); - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'value') final String value; @JsonKey(name: r'matchLevel') final MatchLevel matchLevel; - /// List of words from the query that matched the object. + /// List of matched words from the search query. @JsonKey(name: r'matchedWords') final List matchedWords; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/hit.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/hit.dart index 67e93f3104..7462272a18 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/hit.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/hit.dart @@ -19,15 +19,15 @@ final class Hit extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. @JsonKey(name: r'_highlightResult') final Map? highlightResult; - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. @JsonKey(name: r'_snippetResult') final Map? snippetResult; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart index fba69b242e..6e608ef512 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart @@ -17,6 +17,7 @@ part 'index_settings.g.dart'; final class IndexSettings { /// Returns a new [IndexSettings] instance. const IndexSettings({ + this.attributesForFaceting, this.replicas, this.paginationLimitedTo, this.unretrievableAttributes, @@ -33,7 +34,6 @@ final class IndexSettings { this.userData, this.customNormalization, this.attributeForDistinct, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -80,103 +80,104 @@ final class IndexSettings { this.reRankingApplyFilter, }); - /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + @JsonKey(name: r'attributesForFaceting') + final List? attributesForFaceting; + + /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). @JsonKey(name: r'replicas') final List? replicas; - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. + // maximum: 20000 @JsonKey(name: r'paginationLimitedTo') final int? paginationLimitedTo; - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. @JsonKey(name: r'unretrievableAttributes') final List? unretrievableAttributes; - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. @JsonKey(name: r'disableTypoToleranceOnWords') final List? disableTypoToleranceOnWords; - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. @JsonKey(name: r'attributesToTransliterate') final List? attributesToTransliterate; - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. @JsonKey(name: r'camelCaseAttributes') final List? camelCaseAttributes; - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). @JsonKey(name: r'decompoundedAttributes') final Object? decompoundedAttributes; - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'indexLanguages') final List? indexLanguages; - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). @JsonKey(name: r'disablePrefixOnAttributes') final List? disablePrefixOnAttributes; - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. @JsonKey(name: r'allowCompressionOfIntegerArray') final bool? allowCompressionOfIntegerArray; - /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. @JsonKey(name: r'numericAttributesForFiltering') final List? numericAttributesForFiltering; - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. @JsonKey(name: r'separatorsToIndex') final String? separatorsToIndex; - /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. @JsonKey(name: r'searchableAttributes') final List? searchableAttributes; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). @JsonKey(name: r'customNormalization') final Map>? customNormalization; - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. @JsonKey(name: r'attributeForDistinct') final String? attributeForDistinct; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -184,7 +185,7 @@ final class IndexSettings { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -194,11 +195,11 @@ final class IndexSettings { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -208,11 +209,11 @@ final class IndexSettings { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -228,23 +229,23 @@ final class IndexSettings { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -260,26 +261,26 @@ final class IndexSettings { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -289,41 +290,42 @@ final class IndexSettings { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -338,6 +340,7 @@ final class IndexSettings { bool operator ==(Object other) => identical(this, other) || other is IndexSettings && + other.attributesForFaceting == attributesForFaceting && other.replicas == replicas && other.paginationLimitedTo == paginationLimitedTo && other.unretrievableAttributes == unretrievableAttributes && @@ -356,7 +359,6 @@ final class IndexSettings { other.userData == userData && other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -407,6 +409,7 @@ final class IndexSettings { @override int get hashCode => + attributesForFaceting.hashCode + replicas.hashCode + paginationLimitedTo.hashCode + unretrievableAttributes.hashCode + @@ -423,7 +426,6 @@ final class IndexSettings { userData.hashCode + customNormalization.hashCode + attributeForDistinct.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart index 63c0804187..a2ab58a233 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart @@ -12,6 +12,8 @@ IndexSettings _$IndexSettingsFromJson(Map json) => json, ($checkedConvert) { final val = IndexSettings( + attributesForFaceting: $checkedConvert('attributesForFaceting', + (v) => (v as List?)?.map((e) => e as String).toList()), replicas: $checkedConvert('replicas', (v) => (v as List?)?.map((e) => e as String).toList()), paginationLimitedTo: @@ -50,8 +52,6 @@ IndexSettings _$IndexSettingsFromJson(Map json) => )), attributeForDistinct: $checkedConvert('attributeForDistinct', (v) => v as String?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -158,6 +158,7 @@ Map _$IndexSettingsToJson(IndexSettings instance) { } } + writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('replicas', instance.replicas); writeNotNull('paginationLimitedTo', instance.paginationLimitedTo); writeNotNull('unretrievableAttributes', instance.unretrievableAttributes); @@ -177,7 +178,6 @@ Map _$IndexSettingsToJson(IndexSettings instance) { writeNotNull('userData', instance.userData); writeNotNull('customNormalization', instance.customNormalization); writeNotNull('attributeForDistinct', instance.attributeForDistinct); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart index 4c1f033835..77fee04d93 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart @@ -17,7 +17,6 @@ part 'index_settings_as_search_params.g.dart'; final class IndexSettingsAsSearchParams { /// Returns a new [IndexSettingsAsSearchParams] instance. const IndexSettingsAsSearchParams({ - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -64,39 +63,35 @@ final class IndexSettingsAsSearchParams { this.reRankingApplyFilter, }); - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -104,7 +99,7 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -114,11 +109,11 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -128,11 +123,11 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -148,23 +143,23 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -180,26 +175,26 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -209,41 +204,42 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -258,7 +254,6 @@ final class IndexSettingsAsSearchParams { bool operator ==(Object other) => identical(this, other) || other is IndexSettingsAsSearchParams && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -309,7 +304,6 @@ final class IndexSettingsAsSearchParams { @override int get hashCode => - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart index 956fa1cefc..e68e1c2d11 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart @@ -13,8 +13,6 @@ IndexSettingsAsSearchParams _$IndexSettingsAsSearchParamsFromJson( json, ($checkedConvert) { final val = IndexSettingsAsSearchParams( - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -122,7 +120,6 @@ Map _$IndexSettingsAsSearchParamsToJson( } } - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/match_level.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/match_level.dart index f6fea742fe..a01ef22694 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/match_level.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/match_level.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. @JsonEnum(valueField: 'raw') enum MatchLevel { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/mode.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/mode.dart index 320811bae4..f2a5629ecc 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/mode.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/mode.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. @JsonEnum(valueField: 'raw') enum Mode { neuralSearch(r'neuralSearch'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/operation_type.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/operation_type.dart index 8d7324f898..fbbca2437a 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/operation_type.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/operation_type.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Operation to perform (_move_ or _copy_). +/// Operation to perform on the index. @JsonEnum(valueField: 'raw') enum OperationType { move(r'move'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_id.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_id.dart index 28d18ca9d9..a7071cf6ab 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_id.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_id.dart @@ -13,11 +13,11 @@ final class PromoteObjectID { required this.position, }); - /// Unique identifier of the record to promote. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. @JsonKey(name: r'position') final int position; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_ids.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_ids.dart index 869301b009..869d4004d7 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_ids.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/promote_object_ids.dart @@ -13,11 +13,11 @@ final class PromoteObjectIDs { required this.position, }); - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. @JsonKey(name: r'objectIDs') final List objectIDs; - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. @JsonKey(name: r'position') final int position; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/query_type.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/query_type.dart index 6f1c5593b5..036b0a2864 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/query_type.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/query_type.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). @JsonEnum(valueField: 'raw') enum QueryType { prefixLast(r'prefixLast'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/ranking_info.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/ranking_info.dart index e12498730e..45e10dc0b6 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/ranking_info.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/ranking_info.dart @@ -26,19 +26,23 @@ final class RankingInfo { this.promotedByReRanking, }); - /// This field is reserved for advanced usage. + /// Whether a filter matched the query. + // minimum: 0 @JsonKey(name: r'filters') final int filters; - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. + // minimum: 0 @JsonKey(name: r'firstMatchedWord') final int firstMatchedWord; /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). + // minimum: 0 @JsonKey(name: r'geoDistance') final int geoDistance; /// Precision used when computing the geo distance, in meters. + // minimum: 1 @JsonKey(name: r'geoPrecision') final int? geoPrecision; @@ -49,30 +53,34 @@ final class RankingInfo { final Personalization? personalization; /// Number of exactly matched words. + // minimum: 0 @JsonKey(name: r'nbExactWords') final int nbExactWords; /// Number of typos encountered when matching the record. + // minimum: 0 @JsonKey(name: r'nbTypos') final int nbTypos; - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. @JsonKey(name: r'promoted') final bool promoted; - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. + // minimum: 0 @JsonKey(name: r'proximityDistance') final int? proximityDistance; - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. @JsonKey(name: r'userScore') final int userScore; - /// Number of matched words, including prefixes and typos. + /// Number of matched words. + // minimum: 1 @JsonKey(name: r'words') final int words; - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. @JsonKey(name: r'promotedByReRanking') final bool? promotedByReRanking; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/remove_words_if_no_results.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/remove_words_if_no_results.dart index b5009b53d2..417b55d712 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/remove_words_if_no_results.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/remove_words_if_no_results.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). @JsonEnum(valueField: 'raw') enum RemoveWordsIfNoResults { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/rule.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/rule.dart index d86cce55fe..acf701182c 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/rule.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/rule.dart @@ -20,26 +20,26 @@ final class Rule { this.validity, }); - /// Unique identifier for a rule object. + /// Unique identifier of a rule object. @JsonKey(name: r'objectID') final String objectID; - /// [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + /// Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). @JsonKey(name: r'conditions') final List? conditions; @JsonKey(name: r'consequence') final Consequence? consequence; - /// Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + /// Description of the rule's purpose to help you distinguish between different rules. @JsonKey(name: r'description') final String? description; - /// Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + /// Whether the rule is active. @JsonKey(name: r'enabled') final bool? enabled; - /// If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + /// Time periods when the rule is active. @JsonKey(name: r'validity') final List? validity; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.dart new file mode 100644 index 0000000000..0b67799797 --- /dev/null +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.dart @@ -0,0 +1,59 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +// ignore_for_file: unused_element +import 'package:algoliasearch/src/model/dictionary_entry.dart'; + +import 'package:json_annotation/json_annotation.dart'; + +part 'search_dictionary_entries_response.g.dart'; + +@JsonSerializable() +final class SearchDictionaryEntriesResponse { + /// Returns a new [SearchDictionaryEntriesResponse] instance. + const SearchDictionaryEntriesResponse({ + required this.hits, + required this.page, + required this.nbHits, + required this.nbPages, + }); + + /// Dictionary entries matching the search criteria. + @JsonKey(name: r'hits') + final List hits; + + /// Requested page of the API response. + // minimum: 0 + @JsonKey(name: r'page') + final int page; + + /// Number of results (hits). + @JsonKey(name: r'nbHits') + final int nbHits; + + /// Number of pages of results. + @JsonKey(name: r'nbPages') + final int nbPages; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SearchDictionaryEntriesResponse && + other.hits == hits && + other.page == page && + other.nbHits == nbHits && + other.nbPages == nbPages; + + @override + int get hashCode => + hits.hashCode + page.hashCode + nbHits.hashCode + nbPages.hashCode; + + factory SearchDictionaryEntriesResponse.fromJson(Map json) => + _$SearchDictionaryEntriesResponseFromJson(json); + + Map toJson() => + _$SearchDictionaryEntriesResponseToJson(this); + + @override + String toString() { + return toJson().toString(); + } +} diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.g.dart new file mode 100644 index 0000000000..0a5b76faf7 --- /dev/null +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_dictionary_entries_response.g.dart @@ -0,0 +1,37 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'search_dictionary_entries_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SearchDictionaryEntriesResponse _$SearchDictionaryEntriesResponseFromJson( + Map json) => + $checkedCreate( + 'SearchDictionaryEntriesResponse', + json, + ($checkedConvert) { + final val = SearchDictionaryEntriesResponse( + hits: $checkedConvert( + 'hits', + (v) => (v as List) + .map((e) => + DictionaryEntry.fromJson(e as Map)) + .toList()), + page: $checkedConvert('page', (v) => v as int), + nbHits: $checkedConvert('nbHits', (v) => v as int), + nbPages: $checkedConvert('nbPages', (v) => v as int), + ); + return val; + }, + ); + +Map _$SearchDictionaryEntriesResponseToJson( + SearchDictionaryEntriesResponse instance) => + { + 'hits': instance.hits.map((e) => e.toJson()).toList(), + 'page': instance.page, + 'nbHits': instance.nbHits, + 'nbPages': instance.nbPages, + }; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facet_values_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facet_values_response.dart index f45b41b9ef..7acbf84866 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facet_values_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facet_values_response.dart @@ -15,6 +15,7 @@ final class SearchForFacetValuesResponse { this.processingTimeMS, }); + /// Matching facet values. @JsonKey(name: r'facetHits') final List facetHits; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart index 20c494fb44..e481065c27 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart @@ -45,14 +45,12 @@ final class SearchForFacets { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -107,15 +105,15 @@ final class SearchForFacets { @JsonKey(name: r'params') final String? params; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -147,41 +145,42 @@ final class SearchForFacets { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -197,52 +196,50 @@ final class SearchForFacets { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -250,47 +247,43 @@ final class SearchForFacets { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -298,7 +291,7 @@ final class SearchForFacets { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -308,11 +301,11 @@ final class SearchForFacets { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -322,11 +315,11 @@ final class SearchForFacets { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -342,23 +335,23 @@ final class SearchForFacets { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -374,26 +367,26 @@ final class SearchForFacets { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -403,41 +396,42 @@ final class SearchForFacets { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -452,7 +446,7 @@ final class SearchForFacets { @JsonKey(name: r'facet') final String facet; - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; @@ -494,14 +488,12 @@ final class SearchForFacets { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -583,14 +575,12 @@ final class SearchForFacets { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart index 889d165eaa..f0907240bf 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart @@ -61,8 +61,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -71,8 +69,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -212,14 +208,12 @@ Map _$SearchForFacetsToJson(SearchForFacets instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets_options.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets_options.dart index 1823938f5f..88715f6962 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets_options.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets_options.dart @@ -21,7 +21,7 @@ final class SearchForFacetsOptions { @JsonKey(name: r'facet') final String facet; - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; @@ -29,7 +29,7 @@ final class SearchForFacetsOptions { @JsonKey(name: r'facetQuery') final String? facetQuery; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart index 0671d26883..4291b6c190 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart @@ -45,14 +45,12 @@ final class SearchForHits { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -105,15 +103,15 @@ final class SearchForHits { @JsonKey(name: r'params') final String? params; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -145,41 +143,42 @@ final class SearchForHits { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -195,52 +194,50 @@ final class SearchForHits { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -248,47 +245,43 @@ final class SearchForHits { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -296,7 +289,7 @@ final class SearchForHits { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -306,11 +299,11 @@ final class SearchForHits { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -320,11 +313,11 @@ final class SearchForHits { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -340,23 +333,23 @@ final class SearchForHits { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -372,26 +365,26 @@ final class SearchForHits { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -401,41 +394,42 @@ final class SearchForHits { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -446,7 +440,7 @@ final class SearchForHits { @JsonKey(name: r'reRankingApplyFilter') final dynamic reRankingApplyFilter; - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; @@ -484,14 +478,12 @@ final class SearchForHits { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -571,14 +563,12 @@ final class SearchForHits { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart index aa5670963e..a6dbf1eb9e 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart @@ -61,8 +61,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -71,8 +69,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -210,14 +206,12 @@ Map _$SearchForHitsToJson(SearchForHits instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits_options.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits_options.dart index 23d4b151ce..3297f55fbc 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits_options.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits_options.dart @@ -14,7 +14,7 @@ final class SearchForHitsOptions { this.type, }); - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_hits.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_hits.dart index fc56f207af..b1469e8719 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_hits.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_hits.dart @@ -17,10 +17,11 @@ final class SearchHits extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. @JsonKey(name: r'hits') final List hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String query; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart index 32e3bdb049..51324ad88f 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart @@ -43,14 +43,12 @@ final class SearchParamsObject { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -97,15 +95,15 @@ final class SearchParamsObject { this.reRankingApplyFilter, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -137,41 +135,42 @@ final class SearchParamsObject { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -187,52 +186,50 @@ final class SearchParamsObject { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -240,47 +237,43 @@ final class SearchParamsObject { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -288,7 +281,7 @@ final class SearchParamsObject { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -298,11 +291,11 @@ final class SearchParamsObject { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -312,11 +305,11 @@ final class SearchParamsObject { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -332,23 +325,23 @@ final class SearchParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -364,26 +357,26 @@ final class SearchParamsObject { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -393,41 +386,42 @@ final class SearchParamsObject { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -468,14 +462,12 @@ final class SearchParamsObject { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -552,14 +544,12 @@ final class SearchParamsObject { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart index 536ebe305d..7e3eaa20ce 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart @@ -60,8 +60,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -70,8 +68,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -205,14 +201,12 @@ Map _$SearchParamsObjectToJson(SearchParamsObject instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_query.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_query.dart index 0a48d75102..d24f821ddd 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_query.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_query.dart @@ -12,7 +12,7 @@ final class SearchParamsQuery { this.query, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_response.dart index f1795f012b..495da5471b 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_response.dart @@ -60,7 +60,7 @@ final class SearchResponse { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -82,7 +82,7 @@ final class SearchResponse { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -108,11 +108,11 @@ final class SearchResponse { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -120,7 +120,8 @@ final class SearchResponse { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -154,7 +155,7 @@ final class SearchResponse { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; @@ -162,10 +163,11 @@ final class SearchResponse { @JsonKey(name: r'queryID') final String? queryID; + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. @JsonKey(name: r'hits') final List hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String query; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_strategy.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_strategy.dart index 8c7b8b3ac7..014005b421 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_strategy.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_strategy.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. +/// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. @JsonEnum(valueField: 'raw') enum SearchStrategy { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_synonyms_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_synonyms_response.dart index a270ec0716..e436587d35 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_synonyms_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_synonyms_response.dart @@ -16,11 +16,11 @@ final class SearchSynonymsResponse extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); - /// Synonym objects. + /// Matching synonyms. @JsonKey(name: r'hits') final List hits; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/secured_api_key_restrictions.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/secured_api_key_restrictions.dart index 9c66303262..8ef6d78bc3 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/secured_api_key_restrictions.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/secured_api_key_restrictions.dart @@ -21,23 +21,23 @@ final class SecuredAPIKeyRestrictions { @JsonKey(name: r'searchParams') final SearchParamsObject? searchParams; - /// Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + /// Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. @JsonKey(name: r'filters') final String? filters; - /// Unix timestamp used to set the expiration date of the API key. + /// Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. @JsonKey(name: r'validUntil') final int? validUntil; - /// Index names that can be queried. + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". @JsonKey(name: r'restrictIndices') final List? restrictIndices; - /// IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + /// IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. @JsonKey(name: r'restrictSources') final String? restrictSources; - /// Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + /// Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. @JsonKey(name: r'userToken') final String? userToken; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/semantic_search.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/semantic_search.dart index 445fefeb9d..4669596183 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/semantic_search.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/semantic_search.dart @@ -12,7 +12,7 @@ final class SemanticSearch { this.eventSources, }); - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. @JsonKey(name: r'eventSources') final List? eventSources; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/snippet_result_option.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/snippet_result_option.dart index 2080dbdbf6..e41d085e9d 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/snippet_result_option.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/snippet_result_option.dart @@ -14,7 +14,7 @@ final class SnippetResultOption { required this.matchLevel, }); - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'value') final String value; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/sort_remaining_by.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/sort_remaining_by.dart index 1ca1017c3a..35e028f375 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/sort_remaining_by.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/sort_remaining_by.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. @JsonEnum(valueField: 'raw') enum SortRemainingBy { count(r'count'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/task_status.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/task_status.dart index 550c717c24..fca27c7254 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/task_status.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/task_status.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. @JsonEnum(valueField: 'raw') enum TaskStatus { published(r'published'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/time_range.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/time_range.dart index 90d4a0fee6..cd9fbc06f8 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/time_range.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/time_range.dart @@ -13,11 +13,11 @@ final class TimeRange { required this.until, }); - /// Lower bound of the time range (Unix timestamp). + /// When the rule should start to be active, in Unix epoch time. @JsonKey(name: r'from') final int from; - /// Upper bound of the time range (Unix timestamp). + /// When the rule should stop to be active, in Unix epoch time. @JsonKey(name: r'until') final int until; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/typo_tolerance_enum.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/typo_tolerance_enum.dart index b5ec1a7893..186d208d01 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/typo_tolerance_enum.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/typo_tolerance_enum.dart @@ -2,6 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. @JsonEnum(valueField: 'raw') enum TypoToleranceEnum { min(r'min'), diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/updated_rule_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/updated_rule_response.dart index d5f2aea21d..731e51cf5f 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/updated_rule_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/updated_rule_response.dart @@ -14,7 +14,7 @@ final class UpdatedRuleResponse { required this.taskID, }); - /// Unique object identifier. + /// Unique identifier of a rule object. @JsonKey(name: r'objectID') final String objectID; @@ -22,7 +22,7 @@ final class UpdatedRuleResponse { @JsonKey(name: r'updatedAt') final String updatedAt; - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/user_id.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/user_id.dart index e4f6fcc353..f6aabfc182 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/user_id.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/user_id.dart @@ -15,7 +15,7 @@ final class UserId { required this.dataSize, }); - /// userID of the user. + /// User ID. @JsonKey(name: r'userID') final String userID; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/value.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/value.dart index ba8cd1dc93..303f801010 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/value.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/value.dart @@ -14,7 +14,7 @@ final class Value { this.sortRemainingBy, }); - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. @JsonKey(name: r'order') final List? order; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/api/recommend_client.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/api/recommend_client.dart index 971734ba09..833530308f 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/api/recommend_client.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/api/recommend_client.dart @@ -193,9 +193,9 @@ final class RecommendClient implements ApiClient { /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [model] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// * [objectID] Unique record (object) identifier. + /// * [objectID] Unique record identifier. /// * [requestOptions] additional request configuration. Future deleteRecommendRule({ required String indexName, @@ -237,9 +237,9 @@ final class RecommendClient implements ApiClient { /// - settings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [model] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// * [objectID] Unique record (object) identifier. + /// * [objectID] Unique record identifier. /// * [requestOptions] additional request configuration. Future getRecommendRule({ required String indexName, @@ -281,7 +281,7 @@ final class RecommendClient implements ApiClient { /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [model] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// * [taskID] Unique identifier of a task. Numeric value (up to 64bits). /// * [requestOptions] additional request configuration. @@ -350,7 +350,7 @@ final class RecommendClient implements ApiClient { /// - settings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [model] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// * [searchRecommendRulesParams] /// * [requestOptions] additional request configuration. diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/anchoring.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/anchoring.dart index 70e9b365ab..d598ccac6b 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/anchoring.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/anchoring.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. @JsonEnum(valueField: 'raw') enum Anchoring { is_(r'is'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.dart index 446ba48cec..b426c8727f 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.dart @@ -13,9 +13,11 @@ final class AroundPrecisionFromValueInner { this.value, }); + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. @JsonKey(name: r'from') final int? from; + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. @JsonKey(name: r'value') final int? value; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_radius_all.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_radius_all.dart index 907fb416e0..32716a4a53 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_radius_all.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_radius_all.dart @@ -2,6 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. @JsonEnum(valueField: 'raw') enum AroundRadiusAll { all(r'all'); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/automatic_facet_filter.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/automatic_facet_filter.dart index a9fb95c8f2..1ac92f0854 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/automatic_facet_filter.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/automatic_facet_filter.dart @@ -14,15 +14,15 @@ final class AutomaticFacetFilter { this.disjunctive, }); - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. @JsonKey(name: r'facet') final String facet; - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. @JsonKey(name: r'score') final int? score; - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. @JsonKey(name: r'disjunctive') final bool? disjunctive; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommend_request.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommend_request.dart index fb142ed61e..b17deb1262 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommend_request.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommend_request.dart @@ -14,7 +14,7 @@ final class BaseRecommendRequest { this.maxRecommendations, }); - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommendations_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommendations_query.dart index 22963413b7..1ed4dcfe43 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommendations_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommendations_query.dart @@ -20,7 +20,7 @@ final class BaseRecommendationsQuery { @JsonKey(name: r'model') final RecommendationModels model; - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommended_for_you_query_parameters.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommended_for_you_query_parameters.dart index f9a2bffde3..c7a160f74f 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommended_for_you_query_parameters.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_recommended_for_you_query_parameters.dart @@ -12,7 +12,7 @@ final class BaseRecommendedForYouQueryParameters { required this.userToken, }); - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String userToken; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart index ca9473e235..92af662886 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart @@ -35,7 +35,6 @@ final class BaseSearchParams { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, @@ -44,15 +43,15 @@ final class BaseSearchParams { this.enableABTest, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -84,41 +83,42 @@ final class BaseSearchParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -134,52 +134,50 @@ final class BaseSearchParams { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -187,11 +185,11 @@ final class BaseSearchParams { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; @@ -225,7 +223,6 @@ final class BaseSearchParams { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && @@ -261,7 +258,6 @@ final class BaseSearchParams { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.g.dart index 8d10211d64..388cb5ab33 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.g.dart @@ -60,8 +60,6 @@ BaseSearchParams _$BaseSearchParamsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -111,7 +109,6 @@ Map _$BaseSearchParamsToJson(BaseSearchParams instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart index 1bd5481d4e..4d61b6e3cf 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart @@ -34,7 +34,6 @@ final class BaseSearchParamsWithoutQuery { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, @@ -43,11 +42,11 @@ final class BaseSearchParamsWithoutQuery { this.enableABTest, }); - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -79,41 +78,42 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -129,52 +129,50 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -182,11 +180,11 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; @@ -219,7 +217,6 @@ final class BaseSearchParamsWithoutQuery { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && @@ -254,7 +251,6 @@ final class BaseSearchParamsWithoutQuery { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.g.dart index 684c54effd..891b08e053 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.g.dart @@ -60,8 +60,6 @@ BaseSearchParamsWithoutQuery _$BaseSearchParamsWithoutQueryFromJson( $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -111,7 +109,6 @@ Map _$BaseSearchParamsWithoutQueryToJson( writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_response.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_response.dart index 77b6cdd434..3fe99e037e 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_response.dart @@ -58,7 +58,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -80,7 +80,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -106,11 +106,11 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -118,7 +118,8 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -152,7 +153,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.dart index 5374c07485..25ae83d673 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.dart @@ -14,23 +14,28 @@ final class Condition { this.anchoring, this.alternatives, this.context, + this.filters, }); - /// Query pattern syntax. + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". @JsonKey(name: r'pattern') final String? pattern; @JsonKey(name: r'anchoring') final Anchoring? anchoring; - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. @JsonKey(name: r'alternatives') final bool? alternatives; - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. @JsonKey(name: r'context') final String? context; + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + @JsonKey(name: r'filters') + final String? filters; + @override bool operator ==(Object other) => identical(this, other) || @@ -38,14 +43,16 @@ final class Condition { other.pattern == pattern && other.anchoring == anchoring && other.alternatives == alternatives && - other.context == context; + other.context == context && + other.filters == filters; @override int get hashCode => pattern.hashCode + anchoring.hashCode + alternatives.hashCode + - context.hashCode; + context.hashCode + + filters.hashCode; factory Condition.fromJson(Map json) => _$ConditionFromJson(json); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.g.dart index af4d41cf04..043423a411 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/condition.g.dart @@ -16,6 +16,7 @@ Condition _$ConditionFromJson(Map json) => $checkedCreate( 'anchoring', (v) => $enumDecodeNullable(_$AnchoringEnumMap, v)), alternatives: $checkedConvert('alternatives', (v) => v as bool?), context: $checkedConvert('context', (v) => v as String?), + filters: $checkedConvert('filters', (v) => v as String?), ); return val; }, @@ -34,6 +35,7 @@ Map _$ConditionToJson(Condition instance) { writeNotNull('anchoring', instance.anchoring?.toJson()); writeNotNull('alternatives', instance.alternatives); writeNotNull('context', instance.context); + writeNotNull('filters', instance.filters); return val; } diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence.dart index bc67aa36c7..4991cf0ae6 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence.dart @@ -21,22 +21,22 @@ final class Consequence { @JsonKey(name: r'params') final ConsequenceParams? params; - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. /// One of types: /// - [PromoteObjectIDs] /// - [PromoteObjectID] @JsonKey(name: r'promote') final Iterable? promote; - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. @JsonKey(name: r'filterPromotes') final bool? filterPromotes; - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. @JsonKey(name: r'hide') final List? hide; - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. @JsonKey(name: r'userData') final Object? userData; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_hide.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_hide.dart index 4e18b0bf37..0ab29e90e7 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_hide.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_hide.dart @@ -12,7 +12,7 @@ final class ConsequenceHide { required this.objectID, }); - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.dart index a1e8314e16..8b660cdf4d 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.dart @@ -42,14 +42,12 @@ final class ConsequenceParams { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -99,11 +97,11 @@ final class ConsequenceParams { this.automaticOptionalFacetFilters, }); - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -135,41 +133,42 @@ final class ConsequenceParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -185,52 +184,50 @@ final class ConsequenceParams { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -238,47 +235,43 @@ final class ConsequenceParams { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -286,7 +279,7 @@ final class ConsequenceParams { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -296,11 +289,11 @@ final class ConsequenceParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -310,11 +303,11 @@ final class ConsequenceParams { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -330,23 +323,23 @@ final class ConsequenceParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -362,26 +355,26 @@ final class ConsequenceParams { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -391,41 +384,42 @@ final class ConsequenceParams { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -483,14 +477,12 @@ final class ConsequenceParams { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -569,14 +561,12 @@ final class ConsequenceParams { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.g.dart index 0a6efe01fd..875dc0b42e 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_params.g.dart @@ -59,8 +59,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -69,8 +67,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -208,14 +204,12 @@ Map _$ConsequenceParamsToJson(ConsequenceParams instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_query_object.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_query_object.dart index e9c3414dc3..226430e810 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_query_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/consequence_query_object.dart @@ -14,11 +14,11 @@ final class ConsequenceQueryObject { this.edits, }); - /// Words to remove. + /// Words to remove from the search query. @JsonKey(name: r'remove') final List? remove; - /// Edits to apply. + /// Changes to make to the search query. @JsonKey(name: r'edits') final List? edits; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/deleted_at_response.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/deleted_at_response.dart index 01f12160ab..95ca10ed25 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/deleted_at_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/deleted_at_response.dart @@ -13,7 +13,7 @@ final class DeletedAtResponse { required this.deletedAt, }); - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/edit.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/edit.dart index f7c95f5632..a1a90715b3 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/edit.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/edit.dart @@ -22,7 +22,7 @@ final class Edit { @JsonKey(name: r'delete') final String? delete; - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. @JsonKey(name: r'insert') final String? insert; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/exact_on_single_word_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/exact_on_single_word_query.dart index eaf88630da..d927439f3a 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/exact_on_single_word_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/exact_on_single_word_query.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. @JsonEnum(valueField: 'raw') enum ExactOnSingleWordQuery { attribute(r'attribute'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facet_ordering.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facet_ordering.dart index fadebb234e..1bf4afa05f 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facet_ordering.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facet_ordering.dart @@ -18,7 +18,7 @@ final class FacetOrdering { @JsonKey(name: r'facets') final Facets? facets; - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. @JsonKey(name: r'values') final Map? values; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facets.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facets.dart index 13e8ee4efd..9b3dad5a60 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facets.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/facets.dart @@ -12,7 +12,7 @@ final class Facets { this.order, }); - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. @JsonKey(name: r'order') final List? order; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/highlight_result_option.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/highlight_result_option.dart index 4fa2ffb204..51d5de7907 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/highlight_result_option.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/highlight_result_option.dart @@ -16,14 +16,14 @@ final class HighlightResultOption { this.fullyHighlighted, }); - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'value') final String value; @JsonKey(name: r'matchLevel') final MatchLevel matchLevel; - /// List of words from the query that matched the object. + /// List of matched words from the search query. @JsonKey(name: r'matchedWords') final List matchedWords; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.dart index a4a9e8a4d8..d3b01135c6 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.dart @@ -17,7 +17,6 @@ part 'index_settings_as_search_params.g.dart'; final class IndexSettingsAsSearchParams { /// Returns a new [IndexSettingsAsSearchParams] instance. const IndexSettingsAsSearchParams({ - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -64,39 +63,35 @@ final class IndexSettingsAsSearchParams { this.reRankingApplyFilter, }); - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -104,7 +99,7 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -114,11 +109,11 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -128,11 +123,11 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -148,23 +143,23 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -180,26 +175,26 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -209,41 +204,42 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -258,7 +254,6 @@ final class IndexSettingsAsSearchParams { bool operator ==(Object other) => identical(this, other) || other is IndexSettingsAsSearchParams && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -309,7 +304,6 @@ final class IndexSettingsAsSearchParams { @override int get hashCode => - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.g.dart index 956fa1cefc..e68e1c2d11 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/index_settings_as_search_params.g.dart @@ -13,8 +13,6 @@ IndexSettingsAsSearchParams _$IndexSettingsAsSearchParamsFromJson( json, ($checkedConvert) { final val = IndexSettingsAsSearchParams( - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -122,7 +120,6 @@ Map _$IndexSettingsAsSearchParamsToJson( } } - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/match_level.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/match_level.dart index f6fea742fe..a01ef22694 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/match_level.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/match_level.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. @JsonEnum(valueField: 'raw') enum MatchLevel { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/mode.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/mode.dart index 320811bae4..f2a5629ecc 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/mode.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/mode.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. @JsonEnum(valueField: 'raw') enum Mode { neuralSearch(r'neuralSearch'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_id.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_id.dart index 28d18ca9d9..a7071cf6ab 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_id.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_id.dart @@ -13,11 +13,11 @@ final class PromoteObjectID { required this.position, }); - /// Unique identifier of the record to promote. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. @JsonKey(name: r'position') final int position; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_ids.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_ids.dart index 869301b009..869d4004d7 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_ids.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/promote_object_ids.dart @@ -13,11 +13,11 @@ final class PromoteObjectIDs { required this.position, }); - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. @JsonKey(name: r'objectIDs') final List objectIDs; - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. @JsonKey(name: r'position') final int position; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/query_type.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/query_type.dart index 6f1c5593b5..036b0a2864 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/query_type.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/query_type.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). @JsonEnum(valueField: 'raw') enum QueryType { prefixLast(r'prefixLast'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/ranking_info.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/ranking_info.dart index 1a24f87e7c..25148377c9 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/ranking_info.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/ranking_info.dart @@ -26,19 +26,23 @@ final class RankingInfo { this.promotedByReRanking, }); - /// This field is reserved for advanced usage. + /// Whether a filter matched the query. + // minimum: 0 @JsonKey(name: r'filters') final int filters; - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. + // minimum: 0 @JsonKey(name: r'firstMatchedWord') final int firstMatchedWord; /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). + // minimum: 0 @JsonKey(name: r'geoDistance') final int geoDistance; /// Precision used when computing the geo distance, in meters. + // minimum: 1 @JsonKey(name: r'geoPrecision') final int? geoPrecision; @@ -49,30 +53,34 @@ final class RankingInfo { final Personalization? personalization; /// Number of exactly matched words. + // minimum: 0 @JsonKey(name: r'nbExactWords') final int nbExactWords; /// Number of typos encountered when matching the record. + // minimum: 0 @JsonKey(name: r'nbTypos') final int nbTypos; - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. @JsonKey(name: r'promoted') final bool promoted; - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. + // minimum: 0 @JsonKey(name: r'proximityDistance') final int? proximityDistance; - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. @JsonKey(name: r'userScore') final int userScore; - /// Number of matched words, including prefixes and typos. + /// Number of matched words. + // minimum: 1 @JsonKey(name: r'words') final int words; - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. @JsonKey(name: r'promotedByReRanking') final bool? promotedByReRanking; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_hit.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_hit.dart index 310d86c1cc..7dfc7c2e2e 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_hit.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_hit.dart @@ -20,15 +20,15 @@ final class RecommendHit extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. @JsonKey(name: r'_highlightResult') final Map? highlightResult; - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. @JsonKey(name: r'_snippetResult') final Map? snippetResult; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_hits.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_hits.dart index af1e408eea..744e39ee77 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_hits.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_hits.dart @@ -20,7 +20,7 @@ final class RecommendationsHits { @JsonKey(name: r'hits') final Iterable hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_query.dart index b32cb33c31..a6c3dd3d06 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_query.dart @@ -20,7 +20,7 @@ final class RecommendationsQuery { this.fallbackParameters, }); - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; @@ -37,7 +37,7 @@ final class RecommendationsQuery { @JsonKey(name: r'model') final RecommendationModels model; - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_results.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_results.dart index 6056618668..c8544a13a0 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_results.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommendations_results.dart @@ -59,7 +59,7 @@ final class RecommendationsResults { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -81,7 +81,7 @@ final class RecommendationsResults { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -107,11 +107,11 @@ final class RecommendationsResults { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -119,7 +119,8 @@ final class RecommendationsResults { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -153,7 +154,7 @@ final class RecommendationsResults { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; @@ -167,7 +168,7 @@ final class RecommendationsResults { @JsonKey(name: r'hits') final Iterable hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query.dart index 05e5dddba0..9ea018429e 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query.dart @@ -19,7 +19,7 @@ final class RecommendedForYouQuery { this.fallbackParameters, }); - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.dart index 3a311dfdf8..3b10c78ec4 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.dart @@ -43,14 +43,12 @@ final class RecommendedForYouQueryParameters { this.personalizationImpact, required this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -97,15 +95,15 @@ final class RecommendedForYouQueryParameters { this.reRankingApplyFilter, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -137,41 +135,42 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -187,52 +186,50 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -240,47 +237,43 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -288,7 +281,7 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -298,11 +291,11 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -312,11 +305,11 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -332,23 +325,23 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -364,26 +357,26 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -393,41 +386,42 @@ final class RecommendedForYouQueryParameters { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -468,14 +462,12 @@ final class RecommendedForYouQueryParameters { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -552,14 +544,12 @@ final class RecommendedForYouQueryParameters { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.g.dart index 01aa1ebd07..bdd7d4ef0f 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommended_for_you_query_parameters.g.dart @@ -61,8 +61,6 @@ RecommendedForYouQueryParameters _$RecommendedForYouQueryParametersFromJson( $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -71,8 +69,6 @@ RecommendedForYouQueryParameters _$RecommendedForYouQueryParametersFromJson( percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -207,14 +203,12 @@ Map _$RecommendedForYouQueryParametersToJson( writeNotNull('personalizationImpact', instance.personalizationImpact); val['userToken'] = instance.userToken; writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/remove_words_if_no_results.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/remove_words_if_no_results.dart index b5009b53d2..417b55d712 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/remove_words_if_no_results.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/remove_words_if_no_results.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). @JsonEnum(valueField: 'raw') enum RemoveWordsIfNoResults { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart index c2118caab9..66594759ec 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart @@ -43,14 +43,12 @@ final class SearchParamsObject { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -97,15 +95,15 @@ final class SearchParamsObject { this.reRankingApplyFilter, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -137,41 +135,42 @@ final class SearchParamsObject { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -187,52 +186,50 @@ final class SearchParamsObject { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -240,47 +237,43 @@ final class SearchParamsObject { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -288,7 +281,7 @@ final class SearchParamsObject { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -298,11 +291,11 @@ final class SearchParamsObject { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -312,11 +305,11 @@ final class SearchParamsObject { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -332,23 +325,23 @@ final class SearchParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -364,26 +357,26 @@ final class SearchParamsObject { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -393,41 +386,42 @@ final class SearchParamsObject { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -468,14 +462,12 @@ final class SearchParamsObject { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -552,14 +544,12 @@ final class SearchParamsObject { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.g.dart index 536ebe305d..7e3eaa20ce 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.g.dart @@ -60,8 +60,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -70,8 +68,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -205,14 +201,12 @@ Map _$SearchParamsObjectToJson(SearchParamsObject instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_query.dart index 0a48d75102..d24f821ddd 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_query.dart @@ -12,7 +12,7 @@ final class SearchParamsQuery { this.query, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_params.dart index ef55a80ed3..6d87ba1bcc 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_params.dart @@ -16,7 +16,7 @@ final class SearchRecommendRulesParams { this.enabled, }); - /// Full-text query. + /// Search query. @JsonKey(name: r'query') final String? query; @@ -24,7 +24,7 @@ final class SearchRecommendRulesParams { @JsonKey(name: r'context') final String? context; - /// Requested page (the first page is page 0). + /// Requested page of the API response. // minimum: 0 @JsonKey(name: r'page') final int? page; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_response.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_response.dart index d54fe93241..67ac2fbae6 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_recommend_rules_response.dart @@ -20,15 +20,16 @@ final class SearchRecommendRulesResponse { @JsonKey(name: r'hits') final List hits; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/semantic_search.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/semantic_search.dart index 445fefeb9d..4669596183 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/semantic_search.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/semantic_search.dart @@ -12,7 +12,7 @@ final class SemanticSearch { this.eventSources, }); - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. @JsonKey(name: r'eventSources') final List? eventSources; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/snippet_result_option.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/snippet_result_option.dart index 40d787aaca..2535fc45fb 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/snippet_result_option.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/snippet_result_option.dart @@ -14,7 +14,7 @@ final class SnippetResultOption { required this.matchLevel, }); - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'value') final String value; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/sort_remaining_by.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/sort_remaining_by.dart index 1ca1017c3a..35e028f375 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/sort_remaining_by.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/sort_remaining_by.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. @JsonEnum(valueField: 'raw') enum SortRemainingBy { count(r'count'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/task_status.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/task_status.dart index 550c717c24..fca27c7254 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/task_status.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/task_status.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. @JsonEnum(valueField: 'raw') enum TaskStatus { published(r'published'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_facets_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_facets_query.dart index e6ed352953..726f40499d 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_facets_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_facets_query.dart @@ -17,7 +17,7 @@ final class TrendingFacetsQuery { this.model, }); - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_items_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_items_query.dart index 4ad643eb72..8da25552d4 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_items_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/trending_items_query.dart @@ -21,7 +21,7 @@ final class TrendingItemsQuery { this.fallbackParameters, }); - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/typo_tolerance_enum.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/typo_tolerance_enum.dart index b5ec1a7893..186d208d01 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/typo_tolerance_enum.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/typo_tolerance_enum.dart @@ -2,6 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. @JsonEnum(valueField: 'raw') enum TypoToleranceEnum { min(r'min'), diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/value.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/value.dart index 9aa5856382..c4507254a1 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/value.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/value.dart @@ -14,7 +14,7 @@ final class Value { this.sortRemainingBy, }); - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. @JsonKey(name: r'order') final List? order; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart index 35422e2d9c..c610d2863f 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart @@ -106,6 +106,7 @@ export 'src/model/save_object_response.dart'; export 'src/model/save_synonym_response.dart'; export 'src/model/scope_type.dart'; export 'src/model/search_dictionary_entries_params.dart'; +export 'src/model/search_dictionary_entries_response.dart'; export 'src/model/search_for_facet_values_request.dart'; export 'src/model/search_for_facet_values_response.dart'; export 'src/model/search_for_facets.dart'; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart index 2940533489..09b03bdd4c 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart @@ -43,6 +43,7 @@ import 'package:algolia_client_search/src/model/rule.dart'; import 'package:algolia_client_search/src/model/save_object_response.dart'; import 'package:algolia_client_search/src/model/save_synonym_response.dart'; import 'package:algolia_client_search/src/model/search_dictionary_entries_params.dart'; +import 'package:algolia_client_search/src/model/search_dictionary_entries_response.dart'; import 'package:algolia_client_search/src/model/search_for_facet_values_request.dart'; import 'package:algolia_client_search/src/model/search_for_facet_values_response.dart'; import 'package:algolia_client_search/src/model/search_method_params.dart'; @@ -98,7 +99,7 @@ final class SearchClient implements ApiClient { assert(apiKey.isNotEmpty, '`apiKey` is missing.'); } - /// Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + /// Creates a new API key with specific permissions and restrictions. /// /// Required API Key ACLs: /// - admin @@ -126,15 +127,15 @@ final class SearchClient implements ApiClient { ); } - /// If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + /// If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). /// /// Required API Key ACLs: /// - addObject /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [objectID] Unique record (object) identifier. - /// * [body] Algolia record. + /// * [indexName] Name of the index on which to perform the operation. + /// * [objectID] Unique record identifier. + /// * [body] The record, a schemaless object with attributes that are useful in the context of search and discovery. /// * [requestOptions] additional request configuration. Future addOrUpdateObject({ required String indexName, @@ -183,7 +184,7 @@ final class SearchClient implements ApiClient { ); } - /// Add a source to the list of allowed sources. + /// Adds a source to the list of allowed sources. /// /// Required API Key ACLs: /// - admin @@ -211,13 +212,13 @@ final class SearchClient implements ApiClient { ); } - /// Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + /// Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. /// /// Required API Key ACLs: /// - admin /// /// Parameters: - /// * [xAlgoliaUserID] userID to assign. + /// * [xAlgoliaUserID] User ID to assign. /// * [assignUserIdParams] /// * [requestOptions] additional request configuration. Future assignUserId({ @@ -248,10 +249,10 @@ final class SearchClient implements ApiClient { ); } - /// To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + /// Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [batchWriteParams] /// * [requestOptions] additional request configuration. Future batch({ @@ -280,13 +281,13 @@ final class SearchClient implements ApiClient { ); } - /// Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + /// Assigns multiple user IDs to a cluster. **You can't move users with this operation**. /// /// Required API Key ACLs: /// - admin /// /// Parameters: - /// * [xAlgoliaUserID] userID to assign. + /// * [xAlgoliaUserID] User ID to assign. /// * [batchAssignUserIdsParams] /// * [requestOptions] additional request configuration. Future batchAssignUserIds({ @@ -317,13 +318,13 @@ final class SearchClient implements ApiClient { ); } - /// Add or remove a batch of dictionary entries. + /// Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [dictionaryName] Dictionary to search in. + /// * [dictionaryName] Dictionary type in which to search. /// * [batchDictionaryEntriesParams] /// * [requestOptions] additional request configuration. Future batchDictionaryEntries({ @@ -349,13 +350,13 @@ final class SearchClient implements ApiClient { ); } - /// Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + /// Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. /// /// Required API Key ACLs: /// - browse /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [browseParams] - one of types: [SearchParamsString], [BrowseParamsObject], /// * [requestOptions] additional request configuration. Future browse({ @@ -384,13 +385,13 @@ final class SearchClient implements ApiClient { ); } - /// Delete the records but leave settings and index-specific API keys untouched. + /// Deletes only the records from an index while keeping settings, synonyms, and rules. /// /// Required API Key ACLs: /// - deleteIndex /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [requestOptions] additional request configuration. Future clearObjects({ required String indexName, @@ -416,14 +417,14 @@ final class SearchClient implements ApiClient { ); } - /// Delete all rules in the index. + /// Deletes all rules from the index. /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. + /// * [indexName] Name of the index on which to perform the operation. + /// * [forwardToReplicas] Whether changes are applied to replica indices. /// * [requestOptions] additional request configuration. Future clearRules({ required String indexName, @@ -453,14 +454,14 @@ final class SearchClient implements ApiClient { ); } - /// Delete all synonyms in the index. + /// Deletes all synonyms from the index. /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. + /// * [indexName] Name of the index on which to perform the operation. + /// * [forwardToReplicas] Whether changes are applied to replica indices. /// * [requestOptions] additional request configuration. Future clearSynonyms({ required String indexName, @@ -628,7 +629,7 @@ final class SearchClient implements ApiClient { ); } - /// Delete an existing API key. The request must be authenticated with the admin API key. + /// Deletes the API key. /// /// Required API Key ACLs: /// - admin @@ -660,13 +661,13 @@ final class SearchClient implements ApiClient { ); } - /// This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + /// This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). /// /// Required API Key ACLs: /// - deleteIndex /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [deleteByParams] /// * [requestOptions] additional request configuration. Future deleteBy({ @@ -695,13 +696,13 @@ final class SearchClient implements ApiClient { ); } - /// Delete an existing index. + /// Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). /// /// Required API Key ACLs: /// - deleteIndex /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [requestOptions] additional request configuration. Future deleteIndex({ required String indexName, @@ -727,14 +728,14 @@ final class SearchClient implements ApiClient { ); } - /// To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + /// Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). /// /// Required API Key ACLs: /// - deleteObject /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [objectID] Unique record (object) identifier. + /// * [indexName] Name of the index on which to perform the operation. + /// * [objectID] Unique record identifier. /// * [requestOptions] additional request configuration. Future deleteObject({ required String indexName, @@ -768,15 +769,15 @@ final class SearchClient implements ApiClient { ); } - /// Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + /// Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [objectID] Unique identifier of a rule object. - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. + /// * [forwardToReplicas] Whether changes are applied to replica indices. /// * [requestOptions] additional request configuration. Future deleteRule({ required String indexName, @@ -814,7 +815,7 @@ final class SearchClient implements ApiClient { ); } - /// Remove a source from the list of allowed sources. + /// Deletes a source from the list of allowed sources. /// /// Required API Key ACLs: /// - admin @@ -846,15 +847,15 @@ final class SearchClient implements ApiClient { ); } - /// Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + /// Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [objectID] Unique identifier of a synonym object. - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. + /// * [forwardToReplicas] Whether changes are applied to replica indices. /// * [requestOptions] additional request configuration. Future deleteSynonym({ required String indexName, @@ -892,7 +893,7 @@ final class SearchClient implements ApiClient { ); } - /// Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + /// Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. /// /// Parameters: /// * [key] API key. @@ -921,7 +922,7 @@ final class SearchClient implements ApiClient { ); } - /// Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + /// Lists supported languages with their supported dictionary types and number of custom entries. /// /// Required API Key ACLs: /// - settings @@ -946,7 +947,7 @@ final class SearchClient implements ApiClient { ); } - /// Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + /// Retrieves the languages for which standard dictionary entries are turned off. /// /// Required API Key ACLs: /// - settings @@ -972,16 +973,16 @@ final class SearchClient implements ApiClient { ); } - /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + /// The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. /// /// Required API Key ACLs: /// - logs /// /// Parameters: - /// * [offset] First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + /// * [offset] First log entry to retrieve. The most recent entries are listed first. /// * [length] Maximum number of entries to retrieve. - /// * [indexName] Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. - /// * [type] Type of log entries to retrieve. When omitted, all log entries are retrieved. + /// * [indexName] Index for which to retrieve log entries. By default, log entries are retrieved for all indices. + /// * [type] Type of log entries to retrieve. By default, all log entries are retrieved. /// * [requestOptions] additional request configuration. Future getLogs({ int? offset, @@ -1011,15 +1012,15 @@ final class SearchClient implements ApiClient { ); } - /// To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + /// Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). /// /// Required API Key ACLs: /// - search /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [objectID] Unique record (object) identifier. - /// * [attributesToRetrieve] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + /// * [indexName] Name of the index on which to perform the operation. + /// * [objectID] Unique record identifier. + /// * [attributesToRetrieve] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. /// * [requestOptions] additional request configuration. Future> getObject({ required String indexName, @@ -1058,7 +1059,7 @@ final class SearchClient implements ApiClient { ); } - /// Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + /// Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. /// /// Required API Key ACLs: /// - search @@ -1087,13 +1088,13 @@ final class SearchClient implements ApiClient { ); } - /// Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + /// Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). /// /// Required API Key ACLs: /// - settings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [objectID] Unique identifier of a rule object. /// * [requestOptions] additional request configuration. Future getRule({ @@ -1128,13 +1129,13 @@ final class SearchClient implements ApiClient { ); } - /// Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + /// Retrieves an object with non-null index settings. /// /// Required API Key ACLs: /// - search /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [requestOptions] additional request configuration. Future getSettings({ required String indexName, @@ -1160,7 +1161,7 @@ final class SearchClient implements ApiClient { ); } - /// Get all allowed sources (IP addresses). + /// Retrieves all allowed IP addresses with access to your application. /// /// Required API Key ACLs: /// - admin @@ -1185,13 +1186,13 @@ final class SearchClient implements ApiClient { ); } - /// Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + /// Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). /// /// Required API Key ACLs: /// - settings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [objectID] Unique identifier of a synonym object. /// * [requestOptions] additional request configuration. Future getSynonym({ @@ -1226,13 +1227,13 @@ final class SearchClient implements ApiClient { ); } - /// Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + /// Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. /// /// Required API Key ACLs: /// - addObject /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [taskID] Unique task identifier. /// * [requestOptions] additional request configuration. Future getTask({ @@ -1263,7 +1264,7 @@ final class SearchClient implements ApiClient { ); } - /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// /// Required API Key ACLs: /// - admin @@ -1288,13 +1289,13 @@ final class SearchClient implements ApiClient { ); } - /// Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// /// Required API Key ACLs: /// - admin /// /// Parameters: - /// * [userID] userID to assign. + /// * [userID] User ID to assign. /// * [requestOptions] additional request configuration. Future getUserId({ required String userID, @@ -1326,7 +1327,7 @@ final class SearchClient implements ApiClient { /// - admin /// /// Parameters: - /// * [getClusters] Indicates whether to include the cluster's pending mapping state in the response. + /// * [getClusters] Whether to include the cluster's pending mapping state in the response. /// * [requestOptions] additional request configuration. Future hasPendingMappings({ bool? getClusters, @@ -1350,7 +1351,7 @@ final class SearchClient implements ApiClient { ); } - /// List all API keys associated with your Algolia application, including their permissions and restrictions. + /// Lists all API keys associated with your Algolia application, including their permissions and restrictions. /// /// Required API Key ACLs: /// - admin @@ -1375,7 +1376,7 @@ final class SearchClient implements ApiClient { ); } - /// List the available clusters in a multi-cluster setup. + /// Lists the available clusters in a multi-cluster setup. /// /// Required API Key ACLs: /// - admin @@ -1400,14 +1401,14 @@ final class SearchClient implements ApiClient { ); } - /// List indices in an Algolia application. + /// Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. /// /// Required API Key ACLs: /// - listIndexes /// /// Parameters: - /// * [page] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - /// * [hitsPerPage] Maximum number of hits per page. + /// * [page] Requested page of the API response. If `null`, the API response is not paginated. + /// * [hitsPerPage] Number of hits per page. /// * [requestOptions] additional request configuration. Future listIndices({ int? page, @@ -1433,14 +1434,14 @@ final class SearchClient implements ApiClient { ); } - /// List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + /// Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. /// /// Required API Key ACLs: /// - admin /// /// Parameters: - /// * [page] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - /// * [hitsPerPage] Maximum number of hits per page. + /// * [page] Requested page of the API response. If `null`, the API response is not paginated. + /// * [hitsPerPage] Number of hits per page. /// * [requestOptions] additional request configuration. Future listUserIds({ int? page, @@ -1466,7 +1467,7 @@ final class SearchClient implements ApiClient { ); } - /// To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + /// Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. /// /// Parameters: /// * [batchParams] @@ -1491,13 +1492,13 @@ final class SearchClient implements ApiClient { ); } - /// This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + /// Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). /// /// Required API Key ACLs: /// - addObject /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [operationIndexParams] /// * [requestOptions] additional request configuration. Future operationIndex({ @@ -1526,16 +1527,16 @@ final class SearchClient implements ApiClient { ); } - /// Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + /// Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. /// /// Required API Key ACLs: /// - addObject /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [objectID] Unique record (object) identifier. - /// * [attributesToUpdate] Object with attributes to update. - one of types: [BuiltInOperation], [String], - /// * [createIfNotExists] Indicates whether to create a new record if it doesn't exist yet. + /// * [indexName] Name of the index on which to perform the operation. + /// * [objectID] Unique record identifier. + /// * [attributesToUpdate] Attributes with their values. - one of types: [BuiltInOperation], [String], + /// * [createIfNotExists] Whether to create a new record if it doesn't exist. /// * [requestOptions] additional request configuration. Future partialUpdateObject({ required String indexName, @@ -1576,13 +1577,13 @@ final class SearchClient implements ApiClient { ); } - /// Remove a userID and its associated data from the multi-clusters. + /// Deletes a user ID and its associated data from the clusters. /// /// Required API Key ACLs: /// - admin /// /// Parameters: - /// * [userID] userID to assign. + /// * [userID] User ID to assign. /// * [requestOptions] additional request configuration. Future removeUserId({ required String userID, @@ -1608,7 +1609,7 @@ final class SearchClient implements ApiClient { ); } - /// Replace all allowed sources. + /// Replaces the list of allowed sources. /// /// Required API Key ACLs: /// - admin @@ -1636,7 +1637,7 @@ final class SearchClient implements ApiClient { ); } - /// Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + /// Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. /// /// Required API Key ACLs: /// - admin @@ -1668,14 +1669,14 @@ final class SearchClient implements ApiClient { ); } - /// Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + /// Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). /// /// Required API Key ACLs: /// - addObject /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [body] The Algolia record. + /// * [indexName] Name of the index on which to perform the operation. + /// * [body] The record, a schemaless object with attributes that are useful in the context of search and discovery. /// * [requestOptions] additional request configuration. Future saveObject({ required String indexName, @@ -1715,16 +1716,16 @@ final class SearchClient implements ApiClient { ); } - /// To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + /// If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [objectID] Unique identifier of a rule object. /// * [rule] - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. + /// * [forwardToReplicas] Whether changes are applied to replica indices. /// * [requestOptions] additional request configuration. Future saveRule({ required String indexName, @@ -1764,16 +1765,16 @@ final class SearchClient implements ApiClient { ); } - /// Create or update multiple rules. + /// Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [rules] - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. - /// * [clearExistingRules] Indicates whether existing rules should be deleted before adding this batch. + /// * [forwardToReplicas] Whether changes are applied to replica indices. + /// * [clearExistingRules] Whether existing rules should be deleted before adding this batch. /// * [requestOptions] additional request configuration. Future saveRules({ required String indexName, @@ -1808,16 +1809,16 @@ final class SearchClient implements ApiClient { ); } - /// Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + /// If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [objectID] Unique identifier of a synonym object. /// * [synonymHit] - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. + /// * [forwardToReplicas] Whether changes are applied to replica indices. /// * [requestOptions] additional request configuration. Future saveSynonym({ required String indexName, @@ -1857,16 +1858,16 @@ final class SearchClient implements ApiClient { ); } - /// Create or update multiple synonyms. + /// If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [synonymHit] - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. - /// * [replaceExistingSynonyms] Indicates whether to replace all synonyms in the index with the ones sent with this request. + /// * [forwardToReplicas] Whether changes are applied to replica indices. + /// * [replaceExistingSynonyms] Whether to replace all synonyms in the index with the ones sent with this request. /// * [requestOptions] additional request configuration. Future saveSynonyms({ required String indexName, @@ -1901,13 +1902,13 @@ final class SearchClient implements ApiClient { ); } - /// Send multiple search queries to one or more indices. + /// Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. /// /// Required API Key ACLs: /// - search /// /// Parameters: - /// * [searchMethodParams] Query requests and strategies. Results will be received in the same order as the queries. + /// * [searchMethodParams] Muli-search request body. Results are returned in the same order as the requests. /// * [requestOptions] additional request configuration. Future search({ required SearchMethodParams searchMethodParams, @@ -1930,16 +1931,16 @@ final class SearchClient implements ApiClient { ); } - /// Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + /// Searches for standard and custom dictionary entries. /// /// Required API Key ACLs: /// - settings /// /// Parameters: - /// * [dictionaryName] Dictionary to search in. + /// * [dictionaryName] Dictionary type in which to search. /// * [searchDictionaryEntriesParams] /// * [requestOptions] additional request configuration. - Future searchDictionaryEntries({ + Future searchDictionaryEntries({ required DictionaryType dictionaryName, required SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions? requestOptions, @@ -1956,21 +1957,22 @@ final class SearchClient implements ApiClient { request: request, options: requestOptions, ); - return deserialize( + return deserialize( response, - 'UpdatedAtResponse', + 'SearchDictionaryEntriesResponse', growable: true, ); } - /// [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + /// Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. /// /// Required API Key ACLs: /// - search /// /// Parameters: - /// * [indexName] Index on which to perform the request. - /// * [facetName] Facet name. + /// * [indexName] Name of the index on which to perform the operation. + /// * [facetName] Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. /// * [searchForFacetValuesRequest] /// * [requestOptions] additional request configuration. Future searchForFacetValues({ @@ -2009,13 +2011,13 @@ final class SearchClient implements ApiClient { ); } - /// Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + /// Searches for rules in your index. /// /// Required API Key ACLs: /// - settings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [searchRulesParams] /// * [requestOptions] additional request configuration. Future searchRules({ @@ -2045,13 +2047,13 @@ final class SearchClient implements ApiClient { ); } - /// Return records that match the query. + /// Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. /// /// Required API Key ACLs: /// - search /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [searchParams] - one of types: [SearchParamsString], [SearchParamsObject], /// * [requestOptions] additional request configuration. Future searchSingleIndex({ @@ -2081,13 +2083,13 @@ final class SearchClient implements ApiClient { ); } - /// Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + /// Searches for synonyms in your index. /// /// Required API Key ACLs: /// - settings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [searchSynonymsParams] Body of the `searchSynonyms` operation. /// * [requestOptions] additional request configuration. Future searchSynonyms({ @@ -2117,7 +2119,7 @@ final class SearchClient implements ApiClient { ); } - /// Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + /// Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). /// /// Required API Key ACLs: /// - admin @@ -2146,7 +2148,7 @@ final class SearchClient implements ApiClient { ); } - /// Set stop word settings for a specific language. + /// Turns standard stop word dictionary entries on or off for a given language. /// /// Required API Key ACLs: /// - editSettings @@ -2174,15 +2176,15 @@ final class SearchClient implements ApiClient { ); } - /// Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + /// Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. /// /// Required API Key ACLs: /// - editSettings /// /// Parameters: - /// * [indexName] Index on which to perform the request. + /// * [indexName] Name of the index on which to perform the operation. /// * [indexSettings] - /// * [forwardToReplicas] Indicates whether changed index settings are forwarded to the replica indices. + /// * [forwardToReplicas] Whether changes are applied to replica indices. /// * [requestOptions] additional request configuration. Future setSettings({ required String indexName, @@ -2214,7 +2216,7 @@ final class SearchClient implements ApiClient { ); } - /// Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + /// Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. /// /// Required API Key ACLs: /// - admin diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart index bddcd5a7bd..ae03901dde 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart @@ -99,6 +99,7 @@ import 'package:algolia_client_search/src/model/save_object_response.dart'; import 'package:algolia_client_search/src/model/save_synonym_response.dart'; import 'package:algolia_client_search/src/model/scope_type.dart'; import 'package:algolia_client_search/src/model/search_dictionary_entries_params.dart'; +import 'package:algolia_client_search/src/model/search_dictionary_entries_response.dart'; import 'package:algolia_client_search/src/model/search_for_facet_values_request.dart'; import 'package:algolia_client_search/src/model/search_for_facet_values_response.dart'; import 'package:algolia_client_search/src/model/search_for_facets.dart'; @@ -422,6 +423,9 @@ ReturnType deserialize(dynamic value, String targetType, case 'SearchDictionaryEntriesParams': return SearchDictionaryEntriesParams.fromJson( value as Map) as ReturnType; + case 'SearchDictionaryEntriesResponse': + return SearchDictionaryEntriesResponse.fromJson( + value as Map) as ReturnType; case 'SearchForFacetValuesRequest': return SearchForFacetValuesRequest.fromJson(value as Map) as ReturnType; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/acl.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/acl.dart index 553a811efd..ad4d9e1446 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/acl.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/acl.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. +/// Access control list permissions. @JsonEnum(valueField: 'raw') enum Acl { addObject(r'addObject'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/action.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/action.dart index 9a563408a0..a908b973b8 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/action.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/action.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Type of batch operation. +/// Type of indexing operation. @JsonEnum(valueField: 'raw') enum Action { addObject(r'addObject'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/add_api_key_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/add_api_key_response.dart index 3a18fe4cc5..fefe0126e6 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/add_api_key_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/add_api_key_response.dart @@ -17,7 +17,7 @@ final class AddApiKeyResponse { @JsonKey(name: r'key') final String key; - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. @JsonKey(name: r'createdAt') final String createdAt; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/anchoring.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/anchoring.dart index 70e9b365ab..d598ccac6b 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/anchoring.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/anchoring.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. @JsonEnum(valueField: 'raw') enum Anchoring { is_(r'is'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/api_key.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/api_key.dart index a6295db6e0..5733b30497 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/api_key.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/api_key.dart @@ -20,35 +20,35 @@ final class ApiKey { this.validity, }); - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). @JsonKey(name: r'acl') final List acl; - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. @JsonKey(name: r'description') final String? description; - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". @JsonKey(name: r'indexes') final List? indexes; - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. @JsonKey(name: r'maxHitsPerQuery') final int? maxHitsPerQuery; - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. @JsonKey(name: r'maxQueriesPerIPPerHour') final int? maxQueriesPerIPPerHour; - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. @JsonKey(name: r'queryParameters') final String? queryParameters; - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). @JsonKey(name: r'referers') final List? referers; - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. @JsonKey(name: r'validity') final int? validity; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.dart index 446ba48cec..b426c8727f 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.dart @@ -13,9 +13,11 @@ final class AroundPrecisionFromValueInner { this.value, }); + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. @JsonKey(name: r'from') final int? from; + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. @JsonKey(name: r'value') final int? value; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_radius_all.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_radius_all.dart index 907fb416e0..32716a4a53 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_radius_all.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_radius_all.dart @@ -2,6 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. @JsonEnum(valueField: 'raw') enum AroundRadiusAll { all(r'all'); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/automatic_facet_filter.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/automatic_facet_filter.dart index a9fb95c8f2..1ac92f0854 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/automatic_facet_filter.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/automatic_facet_filter.dart @@ -14,15 +14,15 @@ final class AutomaticFacetFilter { this.disjunctive, }); - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. @JsonKey(name: r'facet') final String facet; - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. @JsonKey(name: r'score') final int? score; - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. @JsonKey(name: r'disjunctive') final bool? disjunctive; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart index 289d247974..689f76429f 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart @@ -9,6 +9,7 @@ part 'base_index_settings.g.dart'; final class BaseIndexSettings { /// Returns a new [BaseIndexSettings] instance. const BaseIndexSettings({ + this.attributesForFaceting, this.replicas, this.paginationLimitedTo, this.unretrievableAttributes, @@ -27,67 +28,72 @@ final class BaseIndexSettings { this.attributeForDistinct, }); - /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + @JsonKey(name: r'attributesForFaceting') + final List? attributesForFaceting; + + /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). @JsonKey(name: r'replicas') final List? replicas; - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. + // maximum: 20000 @JsonKey(name: r'paginationLimitedTo') final int? paginationLimitedTo; - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. @JsonKey(name: r'unretrievableAttributes') final List? unretrievableAttributes; - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. @JsonKey(name: r'disableTypoToleranceOnWords') final List? disableTypoToleranceOnWords; - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. @JsonKey(name: r'attributesToTransliterate') final List? attributesToTransliterate; - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. @JsonKey(name: r'camelCaseAttributes') final List? camelCaseAttributes; - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). @JsonKey(name: r'decompoundedAttributes') final Object? decompoundedAttributes; - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'indexLanguages') final List? indexLanguages; - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). @JsonKey(name: r'disablePrefixOnAttributes') final List? disablePrefixOnAttributes; - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. @JsonKey(name: r'allowCompressionOfIntegerArray') final bool? allowCompressionOfIntegerArray; - /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. @JsonKey(name: r'numericAttributesForFiltering') final List? numericAttributesForFiltering; - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. @JsonKey(name: r'separatorsToIndex') final String? separatorsToIndex; - /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. @JsonKey(name: r'searchableAttributes') final List? searchableAttributes; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). @JsonKey(name: r'customNormalization') final Map>? customNormalization; - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. @JsonKey(name: r'attributeForDistinct') final String? attributeForDistinct; @@ -95,6 +101,7 @@ final class BaseIndexSettings { bool operator ==(Object other) => identical(this, other) || other is BaseIndexSettings && + other.attributesForFaceting == attributesForFaceting && other.replicas == replicas && other.paginationLimitedTo == paginationLimitedTo && other.unretrievableAttributes == unretrievableAttributes && @@ -116,6 +123,7 @@ final class BaseIndexSettings { @override int get hashCode => + attributesForFaceting.hashCode + replicas.hashCode + paginationLimitedTo.hashCode + unretrievableAttributes.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart index fe72472cc4..e6493c1c59 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart @@ -12,6 +12,8 @@ BaseIndexSettings _$BaseIndexSettingsFromJson(Map json) => json, ($checkedConvert) { final val = BaseIndexSettings( + attributesForFaceting: $checkedConvert('attributesForFaceting', + (v) => (v as List?)?.map((e) => e as String).toList()), replicas: $checkedConvert('replicas', (v) => (v as List?)?.map((e) => e as String).toList()), paginationLimitedTo: @@ -64,6 +66,7 @@ Map _$BaseIndexSettingsToJson(BaseIndexSettings instance) { } } + writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('replicas', instance.replicas); writeNotNull('paginationLimitedTo', instance.paginationLimitedTo); writeNotNull('unretrievableAttributes', instance.unretrievableAttributes); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart index ca9473e235..92af662886 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart @@ -35,7 +35,6 @@ final class BaseSearchParams { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, @@ -44,15 +43,15 @@ final class BaseSearchParams { this.enableABTest, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -84,41 +83,42 @@ final class BaseSearchParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -134,52 +134,50 @@ final class BaseSearchParams { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -187,11 +185,11 @@ final class BaseSearchParams { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; @@ -225,7 +223,6 @@ final class BaseSearchParams { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && @@ -261,7 +258,6 @@ final class BaseSearchParams { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.g.dart index 8d10211d64..388cb5ab33 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.g.dart @@ -60,8 +60,6 @@ BaseSearchParams _$BaseSearchParamsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -111,7 +109,6 @@ Map _$BaseSearchParamsToJson(BaseSearchParams instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart index 1bd5481d4e..4d61b6e3cf 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart @@ -34,7 +34,6 @@ final class BaseSearchParamsWithoutQuery { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, @@ -43,11 +42,11 @@ final class BaseSearchParamsWithoutQuery { this.enableABTest, }); - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -79,41 +78,42 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -129,52 +129,50 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -182,11 +180,11 @@ final class BaseSearchParamsWithoutQuery { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; @@ -219,7 +217,6 @@ final class BaseSearchParamsWithoutQuery { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && @@ -254,7 +251,6 @@ final class BaseSearchParamsWithoutQuery { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.g.dart index 684c54effd..891b08e053 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.g.dart @@ -60,8 +60,6 @@ BaseSearchParamsWithoutQuery _$BaseSearchParamsWithoutQueryFromJson( $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -111,7 +109,6 @@ Map _$BaseSearchParamsWithoutQueryToJson( writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_response.dart index f0eaad6c24..b5be292c8a 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_response.dart @@ -58,7 +58,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -80,7 +80,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -106,11 +106,11 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -118,7 +118,8 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -152,7 +153,7 @@ final class BaseSearchResponse extends DelegatingMap { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_dictionary_entries_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_dictionary_entries_params.dart index d0ced12eb0..4746f6a54e 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_dictionary_entries_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_dictionary_entries_params.dart @@ -14,11 +14,11 @@ final class BatchDictionaryEntriesParams { required this.requests, }); - /// Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + /// Whether to replace all custom entries in the dictionary with the ones sent with this request. @JsonKey(name: r'clearExistingDictionaryEntries') final bool? clearExistingDictionaryEntries; - /// Operations to batch. + /// List of additions and deletions to your dictionaries. @JsonKey(name: r'requests') final List requests; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_response.dart index f184300072..0b1d48557b 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/batch_response.dart @@ -13,11 +13,11 @@ final class BatchResponse { required this.objectIDs, }); - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; - /// Unique object (record) identifiers. + /// Unique record identifiers. @JsonKey(name: r'objectIDs') final List objectIDs; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart index 9ad8528abd..6c4312c83d 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart @@ -43,14 +43,12 @@ final class BrowseParamsObject { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -98,15 +96,15 @@ final class BrowseParamsObject { this.cursor, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -138,41 +136,42 @@ final class BrowseParamsObject { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -188,52 +187,50 @@ final class BrowseParamsObject { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -241,47 +238,43 @@ final class BrowseParamsObject { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -289,7 +282,7 @@ final class BrowseParamsObject { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -299,11 +292,11 @@ final class BrowseParamsObject { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -313,11 +306,11 @@ final class BrowseParamsObject { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -333,23 +326,23 @@ final class BrowseParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -365,26 +358,26 @@ final class BrowseParamsObject { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -394,41 +387,42 @@ final class BrowseParamsObject { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -439,7 +433,7 @@ final class BrowseParamsObject { @JsonKey(name: r'reRankingApplyFilter') final dynamic reRankingApplyFilter; - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. @JsonKey(name: r'cursor') final String? cursor; @@ -473,14 +467,12 @@ final class BrowseParamsObject { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -558,14 +550,12 @@ final class BrowseParamsObject { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart index 5919b3d331..eba0f2658b 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart @@ -60,8 +60,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -70,8 +68,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -206,14 +202,12 @@ Map _$BrowseParamsObjectToJson(BrowseParamsObject instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_response.dart index eae1359b61..4822dafee7 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_response.dart @@ -61,7 +61,7 @@ final class BrowseResponse { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -83,7 +83,7 @@ final class BrowseResponse { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -109,11 +109,11 @@ final class BrowseResponse { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -121,7 +121,8 @@ final class BrowseResponse { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -155,7 +156,7 @@ final class BrowseResponse { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; @@ -163,10 +164,11 @@ final class BrowseResponse { @JsonKey(name: r'queryID') final String? queryID; + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. @JsonKey(name: r'hits') final List hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String query; @@ -174,7 +176,7 @@ final class BrowseResponse { @JsonKey(name: r'params') final String params; - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. @JsonKey(name: r'cursor') final String? cursor; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation.dart index e120b3eac0..0104c19fca 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation.dart @@ -17,7 +17,7 @@ final class BuiltInOperation { @JsonKey(name: r'_operation') final BuiltInOperationType operation; - /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. @JsonKey(name: r'value') final String value; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation_type.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation_type.dart index 5fe06ce0b9..8198509d48 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation_type.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/built_in_operation_type.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Operation to apply to the attribute. +/// How to change the attribute. @JsonEnum(valueField: 'raw') enum BuiltInOperationType { increment(r'Increment'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.dart index bc43ce643d..a91a4768c3 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.dart @@ -14,23 +14,28 @@ final class Condition { this.anchoring, this.alternatives, this.context, + this.filters, }); - /// Query pattern syntax. + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". @JsonKey(name: r'pattern') final String? pattern; @JsonKey(name: r'anchoring') final Anchoring? anchoring; - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. @JsonKey(name: r'alternatives') final bool? alternatives; - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. @JsonKey(name: r'context') final String? context; + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + @JsonKey(name: r'filters') + final String? filters; + @override bool operator ==(Object other) => identical(this, other) || @@ -38,14 +43,16 @@ final class Condition { other.pattern == pattern && other.anchoring == anchoring && other.alternatives == alternatives && - other.context == context; + other.context == context && + other.filters == filters; @override int get hashCode => pattern.hashCode + anchoring.hashCode + alternatives.hashCode + - context.hashCode; + context.hashCode + + filters.hashCode; factory Condition.fromJson(Map json) => _$ConditionFromJson(json); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.g.dart index af4d41cf04..043423a411 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/condition.g.dart @@ -16,6 +16,7 @@ Condition _$ConditionFromJson(Map json) => $checkedCreate( 'anchoring', (v) => $enumDecodeNullable(_$AnchoringEnumMap, v)), alternatives: $checkedConvert('alternatives', (v) => v as bool?), context: $checkedConvert('context', (v) => v as String?), + filters: $checkedConvert('filters', (v) => v as String?), ); return val; }, @@ -34,6 +35,7 @@ Map _$ConditionToJson(Condition instance) { writeNotNull('anchoring', instance.anchoring?.toJson()); writeNotNull('alternatives', instance.alternatives); writeNotNull('context', instance.context); + writeNotNull('filters', instance.filters); return val; } diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence.dart index 48c030b49a..0237096de9 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence.dart @@ -21,22 +21,22 @@ final class Consequence { @JsonKey(name: r'params') final ConsequenceParams? params; - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. /// One of types: /// - [PromoteObjectIDs] /// - [PromoteObjectID] @JsonKey(name: r'promote') final Iterable? promote; - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. @JsonKey(name: r'filterPromotes') final bool? filterPromotes; - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. @JsonKey(name: r'hide') final List? hide; - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. @JsonKey(name: r'userData') final Object? userData; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_hide.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_hide.dart index 4e18b0bf37..0ab29e90e7 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_hide.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_hide.dart @@ -12,7 +12,7 @@ final class ConsequenceHide { required this.objectID, }); - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart index d4c015d6c3..30bc279526 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart @@ -42,14 +42,12 @@ final class ConsequenceParams { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -99,11 +97,11 @@ final class ConsequenceParams { this.automaticOptionalFacetFilters, }); - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -135,41 +133,42 @@ final class ConsequenceParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -185,52 +184,50 @@ final class ConsequenceParams { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -238,47 +235,43 @@ final class ConsequenceParams { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -286,7 +279,7 @@ final class ConsequenceParams { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -296,11 +289,11 @@ final class ConsequenceParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -310,11 +303,11 @@ final class ConsequenceParams { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -330,23 +323,23 @@ final class ConsequenceParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -362,26 +355,26 @@ final class ConsequenceParams { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -391,41 +384,42 @@ final class ConsequenceParams { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -483,14 +477,12 @@ final class ConsequenceParams { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -569,14 +561,12 @@ final class ConsequenceParams { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart index 0a6efe01fd..875dc0b42e 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart @@ -59,8 +59,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -69,8 +67,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -208,14 +204,12 @@ Map _$ConsequenceParamsToJson(ConsequenceParams instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_query_object.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_query_object.dart index d093fdf514..5ff5e612dd 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_query_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_query_object.dart @@ -14,11 +14,11 @@ final class ConsequenceQueryObject { this.edits, }); - /// Words to remove. + /// Words to remove from the search query. @JsonKey(name: r'remove') final List? remove; - /// Edits to apply. + /// Changes to make to the search query. @JsonKey(name: r'edits') final List? edits; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/created_at_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/created_at_response.dart index 4f7e59eeb1..0f9e3001a5 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/created_at_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/created_at_response.dart @@ -12,7 +12,7 @@ final class CreatedAtResponse { required this.createdAt, }); - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. @JsonKey(name: r'createdAt') final String createdAt; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/cursor.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/cursor.dart index f466d4aa99..761dda5ac9 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/cursor.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/cursor.dart @@ -12,7 +12,7 @@ final class Cursor { this.cursor, }); - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. @JsonKey(name: r'cursor') final String? cursor; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/delete_by_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/delete_by_params.dart index 85a0969aa4..c4a603327d 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/delete_by_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/delete_by_params.dart @@ -26,7 +26,7 @@ final class DeleteByParams { @JsonKey(name: r'facetFilters') final dynamic facetFilters; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -44,7 +44,7 @@ final class DeleteByParams { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; @@ -54,11 +54,11 @@ final class DeleteByParams { @JsonKey(name: r'aroundRadius') final dynamic aroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/deleted_at_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/deleted_at_response.dart index 01f12160ab..95ca10ed25 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/deleted_at_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/deleted_at_response.dart @@ -13,7 +13,7 @@ final class DeletedAtResponse { required this.deletedAt, }); - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry.dart index 46b8f21a59..7f9fb7732c 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry.dart @@ -20,23 +20,23 @@ final class DictionaryEntry extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); - /// Unique identifier for a dictionary object. + /// Unique identifier for the dictionary entry. @JsonKey(name: r'objectID') final String objectID; - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). @JsonKey(name: r'language') final String language; - /// Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + /// Matching dictionary word for `stopwords` and `compounds` dictionaries. @JsonKey(name: r'word') final String? word; - /// Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + /// Matching words in the `plurals` dictionary including declensions. @JsonKey(name: r'words') final List? words; - /// For compound entries, governs the behavior of the `word` parameter. + /// Invividual components of a compound word in the `compounds` dictionary. @JsonKey(name: r'decomposition') final List? decomposition; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry_state.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry_state.dart index 25b38cfa2e..bffec3d439 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry_state.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry_state.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). +/// Whether a dictionary entry is active. @JsonEnum(valueField: 'raw') enum DictionaryEntryState { enabled(r'enabled'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_language.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_language.dart index 592594f6f2..f111dea765 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_language.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_language.dart @@ -12,7 +12,7 @@ final class DictionaryLanguage { this.nbCustomEntries, }); - /// If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + /// Number of custom dictionary entries. @JsonKey(name: r'nbCustomEntries') final int? nbCustomEntries; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/edit.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/edit.dart index 7b960a9549..c7a83a156c 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/edit.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/edit.dart @@ -22,7 +22,7 @@ final class Edit { @JsonKey(name: r'delete') final String? delete; - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. @JsonKey(name: r'insert') final String? insert; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/exact_on_single_word_query.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/exact_on_single_word_query.dart index eaf88630da..d927439f3a 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/exact_on_single_word_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/exact_on_single_word_query.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +/// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. @JsonEnum(valueField: 'raw') enum ExactOnSingleWordQuery { attribute(r'attribute'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_hits.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_hits.dart index d9e6a39594..6abf6f2df8 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_hits.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_hits.dart @@ -18,11 +18,11 @@ final class FacetHits { @JsonKey(name: r'value') final String value; - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'highlighted') final String highlighted; - /// Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). @JsonKey(name: r'count') final int count; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_ordering.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_ordering.dart index b07b1b020c..2717260b71 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_ordering.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facet_ordering.dart @@ -18,7 +18,7 @@ final class FacetOrdering { @JsonKey(name: r'facets') final Facets? facets; - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. @JsonKey(name: r'values') final Map? values; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facets.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facets.dart index 13e8ee4efd..9b3dad5a60 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facets.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/facets.dart @@ -12,7 +12,7 @@ final class Facets { this.order, }); - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. @JsonKey(name: r'order') final List? order; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_api_key_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_api_key_response.dart index 85d486b428..199c7e9bad 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_api_key_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_api_key_response.dart @@ -30,35 +30,35 @@ final class GetApiKeyResponse { @JsonKey(name: r'createdAt') final int createdAt; - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). @JsonKey(name: r'acl') final List acl; - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. @JsonKey(name: r'description') final String? description; - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". @JsonKey(name: r'indexes') final List? indexes; - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. @JsonKey(name: r'maxHitsPerQuery') final int? maxHitsPerQuery; - /// Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + /// Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. @JsonKey(name: r'maxQueriesPerIPPerHour') final int? maxQueriesPerIPPerHour; - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. @JsonKey(name: r'queryParameters') final String? queryParameters; - /// Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). @JsonKey(name: r'referers') final List? referers; - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. @JsonKey(name: r'validity') final int? validity; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_request.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_request.dart index 0e984631d9..31c82743b9 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_request.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_request.dart @@ -18,11 +18,11 @@ final class GetObjectsRequest { @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Record's objectID. + /// Object ID for the record to retrieve. @JsonKey(name: r'objectID') final String objectID; - /// Name of the index containing the required records. + /// Index from which to retrieve the records. @JsonKey(name: r'indexName') final String indexName; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_response.dart index 594cdec591..a6ff826e71 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/get_objects_response.dart @@ -12,7 +12,7 @@ final class GetObjectsResponse { required this.results, }); - /// Retrieved results. + /// Retrieved records. @JsonKey(name: r'results') final List results; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/has_pending_mappings_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/has_pending_mappings_response.dart index f735d0ffba..1eb6e5c4b0 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/has_pending_mappings_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/has_pending_mappings_response.dart @@ -13,7 +13,7 @@ final class HasPendingMappingsResponse { this.clusters, }); - /// Indicates whether there are clusters undergoing migration, creation, or deletion. + /// Whether there are clusters undergoing migration, creation, or deletion. @JsonKey(name: r'pending') final bool pending; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/highlight_result_option.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/highlight_result_option.dart index 43e2d3e2a0..dcea8c5258 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/highlight_result_option.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/highlight_result_option.dart @@ -16,14 +16,14 @@ final class HighlightResultOption { this.fullyHighlighted, }); - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'value') final String value; @JsonKey(name: r'matchLevel') final MatchLevel matchLevel; - /// List of words from the query that matched the object. + /// List of matched words from the search query. @JsonKey(name: r'matchedWords') final List matchedWords; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/hit.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/hit.dart index 47230ef24c..878fdb7659 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/hit.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/hit.dart @@ -19,15 +19,15 @@ final class Hit extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. @JsonKey(name: r'_highlightResult') final Map? highlightResult; - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. @JsonKey(name: r'_snippetResult') final Map? snippetResult; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart index e14f191c37..ee2b49341a 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart @@ -17,6 +17,7 @@ part 'index_settings.g.dart'; final class IndexSettings { /// Returns a new [IndexSettings] instance. const IndexSettings({ + this.attributesForFaceting, this.replicas, this.paginationLimitedTo, this.unretrievableAttributes, @@ -33,7 +34,6 @@ final class IndexSettings { this.userData, this.customNormalization, this.attributeForDistinct, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -80,103 +80,104 @@ final class IndexSettings { this.reRankingApplyFilter, }); - /// Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + @JsonKey(name: r'attributesForFaceting') + final List? attributesForFaceting; + + /// Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). @JsonKey(name: r'replicas') final List? replicas; - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. + // maximum: 20000 @JsonKey(name: r'paginationLimitedTo') final int? paginationLimitedTo; - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. @JsonKey(name: r'unretrievableAttributes') final List? unretrievableAttributes; - /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. @JsonKey(name: r'disableTypoToleranceOnWords') final List? disableTypoToleranceOnWords; - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. @JsonKey(name: r'attributesToTransliterate') final List? attributesToTransliterate; - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. @JsonKey(name: r'camelCaseAttributes') final List? camelCaseAttributes; - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). @JsonKey(name: r'decompoundedAttributes') final Object? decompoundedAttributes; - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'indexLanguages') final List? indexLanguages; - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). @JsonKey(name: r'disablePrefixOnAttributes') final List? disablePrefixOnAttributes; - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. @JsonKey(name: r'allowCompressionOfIntegerArray') final bool? allowCompressionOfIntegerArray; - /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. @JsonKey(name: r'numericAttributesForFiltering') final List? numericAttributesForFiltering; - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. @JsonKey(name: r'separatorsToIndex') final String? separatorsToIndex; - /// [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. @JsonKey(name: r'searchableAttributes') final List? searchableAttributes; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). @JsonKey(name: r'customNormalization') final Map>? customNormalization; - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. @JsonKey(name: r'attributeForDistinct') final String? attributeForDistinct; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -184,7 +185,7 @@ final class IndexSettings { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -194,11 +195,11 @@ final class IndexSettings { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -208,11 +209,11 @@ final class IndexSettings { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -228,23 +229,23 @@ final class IndexSettings { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -260,26 +261,26 @@ final class IndexSettings { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -289,41 +290,42 @@ final class IndexSettings { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -338,6 +340,7 @@ final class IndexSettings { bool operator ==(Object other) => identical(this, other) || other is IndexSettings && + other.attributesForFaceting == attributesForFaceting && other.replicas == replicas && other.paginationLimitedTo == paginationLimitedTo && other.unretrievableAttributes == unretrievableAttributes && @@ -356,7 +359,6 @@ final class IndexSettings { other.userData == userData && other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -407,6 +409,7 @@ final class IndexSettings { @override int get hashCode => + attributesForFaceting.hashCode + replicas.hashCode + paginationLimitedTo.hashCode + unretrievableAttributes.hashCode + @@ -423,7 +426,6 @@ final class IndexSettings { userData.hashCode + customNormalization.hashCode + attributeForDistinct.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart index 63c0804187..a2ab58a233 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart @@ -12,6 +12,8 @@ IndexSettings _$IndexSettingsFromJson(Map json) => json, ($checkedConvert) { final val = IndexSettings( + attributesForFaceting: $checkedConvert('attributesForFaceting', + (v) => (v as List?)?.map((e) => e as String).toList()), replicas: $checkedConvert('replicas', (v) => (v as List?)?.map((e) => e as String).toList()), paginationLimitedTo: @@ -50,8 +52,6 @@ IndexSettings _$IndexSettingsFromJson(Map json) => )), attributeForDistinct: $checkedConvert('attributeForDistinct', (v) => v as String?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -158,6 +158,7 @@ Map _$IndexSettingsToJson(IndexSettings instance) { } } + writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('replicas', instance.replicas); writeNotNull('paginationLimitedTo', instance.paginationLimitedTo); writeNotNull('unretrievableAttributes', instance.unretrievableAttributes); @@ -177,7 +178,6 @@ Map _$IndexSettingsToJson(IndexSettings instance) { writeNotNull('userData', instance.userData); writeNotNull('customNormalization', instance.customNormalization); writeNotNull('attributeForDistinct', instance.attributeForDistinct); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart index de5afaa10e..c6ca40f079 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart @@ -17,7 +17,6 @@ part 'index_settings_as_search_params.g.dart'; final class IndexSettingsAsSearchParams { /// Returns a new [IndexSettingsAsSearchParams] instance. const IndexSettingsAsSearchParams({ - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -64,39 +63,35 @@ final class IndexSettingsAsSearchParams { this.reRankingApplyFilter, }); - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -104,7 +99,7 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -114,11 +109,11 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -128,11 +123,11 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -148,23 +143,23 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -180,26 +175,26 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -209,41 +204,42 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -258,7 +254,6 @@ final class IndexSettingsAsSearchParams { bool operator ==(Object other) => identical(this, other) || other is IndexSettingsAsSearchParams && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -309,7 +304,6 @@ final class IndexSettingsAsSearchParams { @override int get hashCode => - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart index 956fa1cefc..e68e1c2d11 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart @@ -13,8 +13,6 @@ IndexSettingsAsSearchParams _$IndexSettingsAsSearchParamsFromJson( json, ($checkedConvert) { final val = IndexSettingsAsSearchParams( - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -122,7 +120,6 @@ Map _$IndexSettingsAsSearchParamsToJson( } } - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log.dart index bfdae5cd9a..c5298ffb04 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log.dart @@ -27,27 +27,27 @@ final class Log { this.innerQueries, }); - /// Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of the API request in ISO 8601 format. @JsonKey(name: r'timestamp') final String timestamp; - /// HTTP method of the performed request. + /// HTTP method of the request. @JsonKey(name: r'method') final String method; - /// HTTP response code. + /// HTTP status code of the response. @JsonKey(name: r'answer_code') final String answerCode; - /// Request body. Truncated after 1,000 characters. + /// Request body. @JsonKey(name: r'query_body') final String queryBody; - /// Answer body. Truncated after 1,000 characters. + /// Response body. @JsonKey(name: r'answer') final String answer; - /// Request URL. + /// URL of the API endpoint. @JsonKey(name: r'url') final String url; @@ -55,7 +55,7 @@ final class Log { @JsonKey(name: r'ip') final String ip; - /// Request headers (API key is obfuscated). + /// Request headers (API keys are obfuscated). @JsonKey(name: r'query_headers') final String queryHeaders; @@ -63,11 +63,11 @@ final class Log { @JsonKey(name: r'sha1') final String sha1; - /// Number of API calls. + /// Number of API requests. @JsonKey(name: r'nb_api_calls') final String nbApiCalls; - /// Processing time for the query. Doesn't include network time. + /// Processing time for the query in milliseconds. This doesn't include latency due to the network. @JsonKey(name: r'processing_time_ms') final String processingTimeMs; @@ -79,11 +79,11 @@ final class Log { @JsonKey(name: r'query_params') final String? queryParams; - /// Number of hits returned for the query. + /// Number of search results (hits) returned for the query. @JsonKey(name: r'query_nb_hits') final String? queryNbHits; - /// Performed queries for the given request. + /// Queries performed for the given request. @JsonKey(name: r'inner_queries') final List? innerQueries; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log_query.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log_query.dart index 6713b31b8b..891bffb979 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log_query.dart @@ -18,7 +18,7 @@ final class LogQuery { @JsonKey(name: r'index_name') final String? indexName; - /// User identifier. + /// A user identifier. @JsonKey(name: r'user_token') final String? userToken; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/match_level.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/match_level.dart index f6fea742fe..a01ef22694 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/match_level.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/match_level.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. @JsonEnum(valueField: 'raw') enum MatchLevel { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/mode.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/mode.dart index 320811bae4..f2a5629ecc 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/mode.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/mode.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. @JsonEnum(valueField: 'raw') enum Mode { neuralSearch(r'neuralSearch'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/multiple_batch_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/multiple_batch_response.dart index a6940aebc9..30dae2c37a 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/multiple_batch_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/multiple_batch_response.dart @@ -13,11 +13,11 @@ final class MultipleBatchResponse { required this.objectIDs, }); - /// TaskIDs per index. + /// Task IDs. One for each index. @JsonKey(name: r'taskID') final Map taskID; - /// Unique object (record) identifiers. + /// Unique record identifiers. @JsonKey(name: r'objectIDs') final List objectIDs; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_index_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_index_params.dart index 4475e74ad0..9f4a68f772 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_index_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_index_params.dart @@ -19,11 +19,11 @@ final class OperationIndexParams { @JsonKey(name: r'operation') final OperationType operation; - /// Algolia index name. + /// Index name. @JsonKey(name: r'destination') final String destination; - /// **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + /// **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. @JsonKey(name: r'scope') final List? scope; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_type.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_type.dart index 8d7324f898..fbbca2437a 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_type.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/operation_type.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Operation to perform (_move_ or _copy_). +/// Operation to perform on the index. @JsonEnum(valueField: 'raw') enum OperationType { move(r'move'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_id.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_id.dart index 28d18ca9d9..a7071cf6ab 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_id.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_id.dart @@ -13,11 +13,11 @@ final class PromoteObjectID { required this.position, }); - /// Unique identifier of the record to promote. + /// Unique record identifier. @JsonKey(name: r'objectID') final String objectID; - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. @JsonKey(name: r'position') final int position; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_ids.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_ids.dart index 869301b009..869d4004d7 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_ids.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/promote_object_ids.dart @@ -13,11 +13,11 @@ final class PromoteObjectIDs { required this.position, }); - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. @JsonKey(name: r'objectIDs') final List objectIDs; - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. @JsonKey(name: r'position') final int position; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/query_type.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/query_type.dart index 6f1c5593b5..036b0a2864 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/query_type.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/query_type.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). @JsonEnum(valueField: 'raw') enum QueryType { prefixLast(r'prefixLast'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/ranking_info.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/ranking_info.dart index 00321944fb..4b85207f25 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/ranking_info.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/ranking_info.dart @@ -26,19 +26,23 @@ final class RankingInfo { this.promotedByReRanking, }); - /// This field is reserved for advanced usage. + /// Whether a filter matched the query. + // minimum: 0 @JsonKey(name: r'filters') final int filters; - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. + // minimum: 0 @JsonKey(name: r'firstMatchedWord') final int firstMatchedWord; /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). + // minimum: 0 @JsonKey(name: r'geoDistance') final int geoDistance; /// Precision used when computing the geo distance, in meters. + // minimum: 1 @JsonKey(name: r'geoPrecision') final int? geoPrecision; @@ -49,30 +53,34 @@ final class RankingInfo { final Personalization? personalization; /// Number of exactly matched words. + // minimum: 0 @JsonKey(name: r'nbExactWords') final int nbExactWords; /// Number of typos encountered when matching the record. + // minimum: 0 @JsonKey(name: r'nbTypos') final int nbTypos; - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. @JsonKey(name: r'promoted') final bool promoted; - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. + // minimum: 0 @JsonKey(name: r'proximityDistance') final int? proximityDistance; - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. @JsonKey(name: r'userScore') final int userScore; - /// Number of matched words, including prefixes and typos. + /// Number of matched words. + // minimum: 1 @JsonKey(name: r'words') final int words; - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. @JsonKey(name: r'promotedByReRanking') final bool? promotedByReRanking; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/remove_words_if_no_results.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/remove_words_if_no_results.dart index b5009b53d2..417b55d712 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/remove_words_if_no_results.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/remove_words_if_no_results.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). @JsonEnum(valueField: 'raw') enum RemoveWordsIfNoResults { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/rule.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/rule.dart index e16a04e524..23e5adb3a0 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/rule.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/rule.dart @@ -20,26 +20,26 @@ final class Rule { this.validity, }); - /// Unique identifier for a rule object. + /// Unique identifier of a rule object. @JsonKey(name: r'objectID') final String objectID; - /// [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + /// Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). @JsonKey(name: r'conditions') final List? conditions; @JsonKey(name: r'consequence') final Consequence? consequence; - /// Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + /// Description of the rule's purpose to help you distinguish between different rules. @JsonKey(name: r'description') final String? description; - /// Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + /// Whether the rule is active. @JsonKey(name: r'enabled') final bool? enabled; - /// If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + /// Time periods when the rule is active. @JsonKey(name: r'validity') final List? validity; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_object_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_object_response.dart index 4aa0ebd410..14cf4fbd75 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_object_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_object_response.dart @@ -14,15 +14,15 @@ final class SaveObjectResponse { this.objectID, }); - /// Date of creation (ISO-8601 format). + /// Timestamp when the record was added, in ISO 8601 format. @JsonKey(name: r'createdAt') final String createdAt; - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String? objectID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_synonym_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_synonym_response.dart index c02ab2229d..4e173dfc34 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_synonym_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/save_synonym_response.dart @@ -14,7 +14,7 @@ final class SaveSynonymResponse { required this.id, }); - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_params.dart index 5cbc0d5aea..06c3f5ef17 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_params.dart @@ -15,11 +15,12 @@ final class SearchDictionaryEntriesParams { this.language, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String query; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; @@ -29,7 +30,7 @@ final class SearchDictionaryEntriesParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). @JsonKey(name: r'language') final String? language; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.dart new file mode 100644 index 0000000000..140d4caa0c --- /dev/null +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.dart @@ -0,0 +1,59 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +// ignore_for_file: unused_element +import 'package:algolia_client_search/src/model/dictionary_entry.dart'; + +import 'package:json_annotation/json_annotation.dart'; + +part 'search_dictionary_entries_response.g.dart'; + +@JsonSerializable() +final class SearchDictionaryEntriesResponse { + /// Returns a new [SearchDictionaryEntriesResponse] instance. + const SearchDictionaryEntriesResponse({ + required this.hits, + required this.page, + required this.nbHits, + required this.nbPages, + }); + + /// Dictionary entries matching the search criteria. + @JsonKey(name: r'hits') + final List hits; + + /// Requested page of the API response. + // minimum: 0 + @JsonKey(name: r'page') + final int page; + + /// Number of results (hits). + @JsonKey(name: r'nbHits') + final int nbHits; + + /// Number of pages of results. + @JsonKey(name: r'nbPages') + final int nbPages; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SearchDictionaryEntriesResponse && + other.hits == hits && + other.page == page && + other.nbHits == nbHits && + other.nbPages == nbPages; + + @override + int get hashCode => + hits.hashCode + page.hashCode + nbHits.hashCode + nbPages.hashCode; + + factory SearchDictionaryEntriesResponse.fromJson(Map json) => + _$SearchDictionaryEntriesResponseFromJson(json); + + Map toJson() => + _$SearchDictionaryEntriesResponseToJson(this); + + @override + String toString() { + return toJson().toString(); + } +} diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.g.dart new file mode 100644 index 0000000000..0a5b76faf7 --- /dev/null +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_dictionary_entries_response.g.dart @@ -0,0 +1,37 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'search_dictionary_entries_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SearchDictionaryEntriesResponse _$SearchDictionaryEntriesResponseFromJson( + Map json) => + $checkedCreate( + 'SearchDictionaryEntriesResponse', + json, + ($checkedConvert) { + final val = SearchDictionaryEntriesResponse( + hits: $checkedConvert( + 'hits', + (v) => (v as List) + .map((e) => + DictionaryEntry.fromJson(e as Map)) + .toList()), + page: $checkedConvert('page', (v) => v as int), + nbHits: $checkedConvert('nbHits', (v) => v as int), + nbPages: $checkedConvert('nbPages', (v) => v as int), + ); + return val; + }, + ); + +Map _$SearchDictionaryEntriesResponseToJson( + SearchDictionaryEntriesResponse instance) => + { + 'hits': instance.hits.map((e) => e.toJson()).toList(), + 'page': instance.page, + 'nbHits': instance.nbHits, + 'nbPages': instance.nbPages, + }; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_request.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_request.dart index aba47c23e1..576d74933f 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_request.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_request.dart @@ -22,7 +22,7 @@ final class SearchForFacetValuesRequest { @JsonKey(name: r'facetQuery') final String? facetQuery; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_response.dart index 0a8ef8472d..5568d35cfc 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facet_values_response.dart @@ -15,6 +15,7 @@ final class SearchForFacetValuesResponse { this.processingTimeMS, }); + /// Matching facet values. @JsonKey(name: r'facetHits') final List facetHits; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart index f8f1672bad..7cde9c25c1 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart @@ -45,14 +45,12 @@ final class SearchForFacets { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -107,15 +105,15 @@ final class SearchForFacets { @JsonKey(name: r'params') final String? params; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -147,41 +145,42 @@ final class SearchForFacets { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -197,52 +196,50 @@ final class SearchForFacets { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -250,47 +247,43 @@ final class SearchForFacets { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -298,7 +291,7 @@ final class SearchForFacets { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -308,11 +301,11 @@ final class SearchForFacets { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -322,11 +315,11 @@ final class SearchForFacets { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -342,23 +335,23 @@ final class SearchForFacets { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -374,26 +367,26 @@ final class SearchForFacets { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -403,41 +396,42 @@ final class SearchForFacets { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -452,7 +446,7 @@ final class SearchForFacets { @JsonKey(name: r'facet') final String facet; - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; @@ -494,14 +488,12 @@ final class SearchForFacets { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -583,14 +575,12 @@ final class SearchForFacets { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart index 889d165eaa..f0907240bf 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart @@ -61,8 +61,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -71,8 +69,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -212,14 +208,12 @@ Map _$SearchForFacetsToJson(SearchForFacets instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets_options.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets_options.dart index 508540f2ca..a3987657c5 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets_options.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets_options.dart @@ -21,7 +21,7 @@ final class SearchForFacetsOptions { @JsonKey(name: r'facet') final String facet; - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; @@ -29,7 +29,7 @@ final class SearchForFacetsOptions { @JsonKey(name: r'facetQuery') final String? facetQuery; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart index 6b74fa259c..dfeac21b24 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart @@ -45,14 +45,12 @@ final class SearchForHits { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -105,15 +103,15 @@ final class SearchForHits { @JsonKey(name: r'params') final String? params; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -145,41 +143,42 @@ final class SearchForHits { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -195,52 +194,50 @@ final class SearchForHits { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -248,47 +245,43 @@ final class SearchForHits { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -296,7 +289,7 @@ final class SearchForHits { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -306,11 +299,11 @@ final class SearchForHits { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -320,11 +313,11 @@ final class SearchForHits { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -340,23 +333,23 @@ final class SearchForHits { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -372,26 +365,26 @@ final class SearchForHits { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -401,41 +394,42 @@ final class SearchForHits { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -446,7 +440,7 @@ final class SearchForHits { @JsonKey(name: r'reRankingApplyFilter') final dynamic reRankingApplyFilter; - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; @@ -484,14 +478,12 @@ final class SearchForHits { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -571,14 +563,12 @@ final class SearchForHits { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart index aa5670963e..a6dbf1eb9e 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart @@ -61,8 +61,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -71,8 +69,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -210,14 +206,12 @@ Map _$SearchForHitsToJson(SearchForHits instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits_options.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits_options.dart index bc002ede53..8a4aa0aafd 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits_options.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits_options.dart @@ -14,7 +14,7 @@ final class SearchForHitsOptions { this.type, }); - /// Algolia index name. + /// Index name. @JsonKey(name: r'indexName') final String indexName; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_hits.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_hits.dart index 79266eaba9..d8bee705bb 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_hits.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_hits.dart @@ -17,10 +17,11 @@ final class SearchHits extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. @JsonKey(name: r'hits') final List hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String query; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart index fed2774bf7..0051c12fd0 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart @@ -43,14 +43,12 @@ final class SearchParamsObject { this.personalizationImpact, this.userToken, this.getRankingInfo, - this.explain, this.synonyms, this.clickAnalytics, this.analytics, this.analyticsTags, this.percentileComputation, this.enableABTest, - this.attributesForFaceting, this.attributesToRetrieve, this.ranking, this.customRanking, @@ -97,15 +95,15 @@ final class SearchParamsObject { this.reRankingApplyFilter, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. @JsonKey(name: r'similarQuery') final String? similarQuery; - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). @JsonKey(name: r'filters') final String? filters; @@ -137,41 +135,42 @@ final class SearchParamsObject { @JsonKey(name: r'tagFilters') final dynamic tagFilters; - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). @JsonKey(name: r'sumOrFiltersScores') final bool? sumOrFiltersScores; - /// Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. @JsonKey(name: r'restrictSearchableAttributes') final List? restrictSearchableAttributes; - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). @JsonKey(name: r'facets') final List? facets; - /// Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. @JsonKey(name: r'facetingAfterDistinct') final bool? facetingAfterDistinct; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. @JsonKey(name: r'offset') final int? offset; - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). // minimum: 1 // maximum: 1000 @JsonKey(name: r'length') final int? length; - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. @JsonKey(name: r'aroundLatLngViaIP') final bool? aroundLatLngViaIP; @@ -187,52 +186,50 @@ final class SearchParamsObject { @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. // minimum: 1 @JsonKey(name: r'minimumAroundRadius') final int? minimumAroundRadius; - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). @JsonKey(name: r'insideBoundingBox') final List>? insideBoundingBox; - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. @JsonKey(name: r'insidePolygon') final List>? insidePolygon; - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. @JsonKey(name: r'naturalLanguages') final List? naturalLanguages; - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. @JsonKey(name: r'ruleContexts') final List? ruleContexts; - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // minimum: 0 + // maximum: 100 @JsonKey(name: r'personalizationImpact') final int? personalizationImpact; - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). @JsonKey(name: r'userToken') final String? userToken; - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. @JsonKey(name: r'getRankingInfo') final bool? getRankingInfo; - /// Enriches the API's response with information about how the query was processed. - @JsonKey(name: r'explain') - final List? explain; - - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. @JsonKey(name: r'synonyms') final bool? synonyms; - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). @JsonKey(name: r'clickAnalytics') final bool? clickAnalytics; - /// Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. @JsonKey(name: r'analytics') final bool? analytics; @@ -240,47 +237,43 @@ final class SearchParamsObject { @JsonKey(name: r'analyticsTags') final List? analyticsTags; - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. @JsonKey(name: r'percentileComputation') final bool? percentileComputation; - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. @JsonKey(name: r'enableABTest') final bool? enableABTest; - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - @JsonKey(name: r'attributesForFaceting') - final List? attributesForFaceting; - - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; - /// Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). @JsonKey(name: r'ranking') final List? ranking; - /// Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. @JsonKey(name: r'customRanking') final List? customRanking; - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). @JsonKey(name: r'attributesToHighlight') final List? attributesToHighlight; - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. @JsonKey(name: r'attributesToSnippet') final List? attributesToSnippet; - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPreTag') final String? highlightPreTag; - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. @JsonKey(name: r'highlightPostTag') final String? highlightPostTag; @@ -288,7 +281,7 @@ final class SearchParamsObject { @JsonKey(name: r'snippetEllipsisText') final String? snippetEllipsisText; - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. @JsonKey(name: r'restrictHighlightAndSnippetArrays') final bool? restrictHighlightAndSnippetArrays; @@ -298,11 +291,11 @@ final class SearchParamsObject { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor1Typo') final int? minWordSizefor1Typo; - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). @JsonKey(name: r'minWordSizefor2Typos') final int? minWordSizefor2Typos; @@ -312,11 +305,11 @@ final class SearchParamsObject { @JsonKey(name: r'typoTolerance') final dynamic typoTolerance; - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. @JsonKey(name: r'allowTyposOnNumericTokens') final bool? allowTyposOnNumericTokens; - /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. @JsonKey(name: r'disableTypoToleranceOnAttributes') final List? disableTypoToleranceOnAttributes; @@ -332,23 +325,23 @@ final class SearchParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. @JsonKey(name: r'keepDiacriticsOnCharacters') final String? keepDiacriticsOnCharacters; - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. @JsonKey(name: r'decompoundQuery') final bool? decompoundQuery; - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + /// Whether to enable rules. @JsonKey(name: r'enableRules') final bool? enableRules; - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + /// Whether to enable Personalization. @JsonKey(name: r'enablePersonalization') final bool? enablePersonalization; @@ -364,26 +357,26 @@ final class SearchParamsObject { @JsonKey(name: r'semanticSearch') final SemanticSearch? semanticSearch; - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. @JsonKey(name: r'advancedSyntax') final bool? advancedSyntax; - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). @JsonKey(name: r'optionalWords') final List? optionalWords; - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. @JsonKey(name: r'disableExactOnAttributes') final List? disableExactOnAttributes; @JsonKey(name: r'exactOnSingleWordQuery') final ExactOnSingleWordQuery? exactOnSingleWordQuery; - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. @JsonKey(name: r'alternativesAsExact') final List? alternativesAsExact; - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. @JsonKey(name: r'advancedSyntaxFeatures') final List? advancedSyntaxFeatures; @@ -393,41 +386,42 @@ final class SearchParamsObject { @JsonKey(name: r'distinct') final dynamic distinct; - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. @JsonKey(name: r'replaceSynonymsInHighlight') final bool? replaceSynonymsInHighlight; - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. // minimum: 1 // maximum: 7 @JsonKey(name: r'minProximity') final int? minProximity; - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. @JsonKey(name: r'responseFields') final List? responseFields; - /// Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). // maximum: 100 @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; /// Maximum number of facet values to return for each facet. + // maximum: 1000 @JsonKey(name: r'maxValuesPerFacet') final int? maxValuesPerFacet; - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). @JsonKey(name: r'sortFacetValuesBy') final String? sortFacetValuesBy; - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. @JsonKey(name: r'attributeCriteriaComputedByMinProximity') final bool? attributeCriteriaComputedByMinProximity; @JsonKey(name: r'renderingContent') final RenderingContent? renderingContent; - /// Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. @JsonKey(name: r'enableReRanking') final bool? enableReRanking; @@ -468,14 +462,12 @@ final class SearchParamsObject { other.personalizationImpact == personalizationImpact && other.userToken == userToken && other.getRankingInfo == getRankingInfo && - other.explain == explain && other.synonyms == synonyms && other.clickAnalytics == clickAnalytics && other.analytics == analytics && other.analyticsTags == analyticsTags && other.percentileComputation == percentileComputation && other.enableABTest == enableABTest && - other.attributesForFaceting == attributesForFaceting && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.customRanking == customRanking && @@ -552,14 +544,12 @@ final class SearchParamsObject { personalizationImpact.hashCode + userToken.hashCode + getRankingInfo.hashCode + - explain.hashCode + synonyms.hashCode + clickAnalytics.hashCode + analytics.hashCode + analyticsTags.hashCode + percentileComputation.hashCode + enableABTest.hashCode + - attributesForFaceting.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + customRanking.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart index 536ebe305d..7e3eaa20ce 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart @@ -60,8 +60,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => $checkedConvert('personalizationImpact', (v) => v as int?), userToken: $checkedConvert('userToken', (v) => v as String?), getRankingInfo: $checkedConvert('getRankingInfo', (v) => v as bool?), - explain: $checkedConvert('explain', - (v) => (v as List?)?.map((e) => e as String).toList()), synonyms: $checkedConvert('synonyms', (v) => v as bool?), clickAnalytics: $checkedConvert('clickAnalytics', (v) => v as bool?), analytics: $checkedConvert('analytics', (v) => v as bool?), @@ -70,8 +68,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => percentileComputation: $checkedConvert('percentileComputation', (v) => v as bool?), enableABTest: $checkedConvert('enableABTest', (v) => v as bool?), - attributesForFaceting: $checkedConvert('attributesForFaceting', - (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -205,14 +201,12 @@ Map _$SearchParamsObjectToJson(SearchParamsObject instance) { writeNotNull('personalizationImpact', instance.personalizationImpact); writeNotNull('userToken', instance.userToken); writeNotNull('getRankingInfo', instance.getRankingInfo); - writeNotNull('explain', instance.explain); writeNotNull('synonyms', instance.synonyms); writeNotNull('clickAnalytics', instance.clickAnalytics); writeNotNull('analytics', instance.analytics); writeNotNull('analyticsTags', instance.analyticsTags); writeNotNull('percentileComputation', instance.percentileComputation); writeNotNull('enableABTest', instance.enableABTest); - writeNotNull('attributesForFaceting', instance.attributesForFaceting); writeNotNull('attributesToRetrieve', instance.attributesToRetrieve); writeNotNull('ranking', instance.ranking); writeNotNull('customRanking', instance.customRanking); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_query.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_query.dart index 0a48d75102..d24f821ddd 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_query.dart @@ -12,7 +12,7 @@ final class SearchParamsQuery { this.query, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_response.dart index bc64bda88f..ea1c802fe4 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_response.dart @@ -60,7 +60,7 @@ final class SearchResponse { @JsonKey(name: r'aroundLatLng') final String? aroundLatLng; - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. @JsonKey(name: r'automaticRadius') final String? automaticRadius; @@ -82,7 +82,7 @@ final class SearchResponse { @JsonKey(name: r'exhaustiveTypo') final bool? exhaustiveTypo; - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. @JsonKey(name: r'facets') final Map>? facets; @@ -108,11 +108,11 @@ final class SearchResponse { @JsonKey(name: r'message') final String? message; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Number of pages of results for the current query. + /// Number of pages of results. @JsonKey(name: r'nbPages') final int nbPages; @@ -120,7 +120,8 @@ final class SearchResponse { @JsonKey(name: r'nbSortedHits') final int? nbSortedHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; @@ -154,7 +155,7 @@ final class SearchResponse { @JsonKey(name: r'serverUsed') final String? serverUsed; - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. @JsonKey(name: r'userData') final Object? userData; @@ -162,10 +163,11 @@ final class SearchResponse { @JsonKey(name: r'queryID') final String? queryID; + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. @JsonKey(name: r'hits') final List hits; - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String query; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.dart index 0e0558d7df..2deeb5576f 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.dart @@ -16,21 +16,20 @@ final class SearchRulesParams { this.page, this.hitsPerPage, this.enabled, - this.requestOptions, }); - /// Rule object query. + /// Search query for rules. @JsonKey(name: r'query') final String? query; @JsonKey(name: r'anchoring') final Anchoring? anchoring; - /// Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + /// Only return rules that match the context (exact match). @JsonKey(name: r'context') final String? context; - /// Requested page (the first page is page 0). + /// Requested page of the API response. // minimum: 0 @JsonKey(name: r'page') final int? page; @@ -41,14 +40,10 @@ final class SearchRulesParams { @JsonKey(name: r'hitsPerPage') final int? hitsPerPage; - /// Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + /// If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. @JsonKey(name: r'enabled') final bool? enabled; - /// Request options to send with the API call. - @JsonKey(name: r'requestOptions') - final List? requestOptions; - @override bool operator ==(Object other) => identical(this, other) || @@ -58,8 +53,7 @@ final class SearchRulesParams { other.context == context && other.page == page && other.hitsPerPage == hitsPerPage && - other.enabled == enabled && - other.requestOptions == requestOptions; + other.enabled == enabled; @override int get hashCode => @@ -68,8 +62,7 @@ final class SearchRulesParams { context.hashCode + page.hashCode + hitsPerPage.hashCode + - (enabled == null ? 0 : enabled.hashCode) + - requestOptions.hashCode; + (enabled == null ? 0 : enabled.hashCode); factory SearchRulesParams.fromJson(Map json) => _$SearchRulesParamsFromJson(json); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.g.dart index 1d0348dd9c..18416be2e4 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_params.g.dart @@ -19,8 +19,6 @@ SearchRulesParams _$SearchRulesParamsFromJson(Map json) => page: $checkedConvert('page', (v) => v as int?), hitsPerPage: $checkedConvert('hitsPerPage', (v) => v as int?), enabled: $checkedConvert('enabled', (v) => v as bool?), - requestOptions: $checkedConvert('requestOptions', - (v) => (v as List?)?.map((e) => e as Object).toList()), ); return val; }, @@ -41,7 +39,6 @@ Map _$SearchRulesParamsToJson(SearchRulesParams instance) { writeNotNull('page', instance.page); writeNotNull('hitsPerPage', instance.hitsPerPage); writeNotNull('enabled', instance.enabled); - writeNotNull('requestOptions', instance.requestOptions); return val; } diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_response.dart index d09aeb18ca..8d86a7614c 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_rules_response.dart @@ -16,11 +16,11 @@ final class SearchRulesResponse { required this.nbPages, }); - /// Fetched rules. + /// Rules that matched the search criteria. @JsonKey(name: r'hits') final List hits; - /// Number of fetched rules. + /// Number of rules that matched the search criteria. @JsonKey(name: r'nbHits') final int nbHits; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_strategy.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_strategy.dart index 8c7b8b3ac7..014005b421 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_strategy.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_strategy.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. +/// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. @JsonEnum(valueField: 'raw') enum SearchStrategy { none(r'none'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_params.dart index bfb8cec28c..2e5afdacd4 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_params.dart @@ -16,14 +16,15 @@ final class SearchSynonymsParams { this.hitsPerPage, }); - /// Text to search for in an index. + /// Search query. @JsonKey(name: r'query') final String? query; @JsonKey(name: r'type') final SynonymType? type; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_response.dart index 757f3e7412..dbe1635248 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_synonyms_response.dart @@ -16,11 +16,11 @@ final class SearchSynonymsResponse extends DelegatingMap { Map additionalProperties = const {}, }) : super(additionalProperties); - /// Synonym objects. + /// Matching synonyms. @JsonKey(name: r'hits') final List hits; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_params.dart index b471aba8ef..1cfbed9542 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_params.dart @@ -23,7 +23,8 @@ final class SearchUserIdsParams { @JsonKey(name: r'clusterName') final String? clusterName; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int? page; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_response.dart index d367c1f1f1..1931537960 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_user_ids_response.dart @@ -21,11 +21,12 @@ final class SearchUserIdsResponse { @JsonKey(name: r'hits') final List hits; - /// Number of hits the search query matched. + /// Number of results (hits). @JsonKey(name: r'nbHits') final int nbHits; - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. + // minimum: 0 @JsonKey(name: r'page') final int page; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/secured_api_key_restrictions.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/secured_api_key_restrictions.dart index 605d00f000..ce371ea4e9 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/secured_api_key_restrictions.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/secured_api_key_restrictions.dart @@ -21,23 +21,23 @@ final class SecuredAPIKeyRestrictions { @JsonKey(name: r'searchParams') final SearchParamsObject? searchParams; - /// Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + /// Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. @JsonKey(name: r'filters') final String? filters; - /// Unix timestamp used to set the expiration date of the API key. + /// Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. @JsonKey(name: r'validUntil') final int? validUntil; - /// Index names that can be queried. + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". @JsonKey(name: r'restrictIndices') final List? restrictIndices; - /// IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + /// IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. @JsonKey(name: r'restrictSources') final String? restrictSources; - /// Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + /// Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. @JsonKey(name: r'userToken') final String? userToken; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/semantic_search.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/semantic_search.dart index 445fefeb9d..4669596183 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/semantic_search.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/semantic_search.dart @@ -12,7 +12,7 @@ final class SemanticSearch { this.eventSources, }); - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. @JsonKey(name: r'eventSources') final List? eventSources; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/snippet_result_option.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/snippet_result_option.dart index aeb749d6ac..75cf80f213 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/snippet_result_option.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/snippet_result_option.dart @@ -14,7 +14,7 @@ final class SnippetResultOption { required this.matchLevel, }); - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. @JsonKey(name: r'value') final String value; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/sort_remaining_by.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/sort_remaining_by.dart index 1ca1017c3a..35e028f375 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/sort_remaining_by.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/sort_remaining_by.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. @JsonEnum(valueField: 'raw') enum SortRemainingBy { count(r'count'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/task_status.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/task_status.dart index 550c717c24..fca27c7254 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/task_status.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/task_status.dart @@ -2,7 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. @JsonEnum(valueField: 'raw') enum TaskStatus { published(r'published'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/time_range.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/time_range.dart index 90d4a0fee6..cd9fbc06f8 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/time_range.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/time_range.dart @@ -13,11 +13,11 @@ final class TimeRange { required this.until, }); - /// Lower bound of the time range (Unix timestamp). + /// When the rule should start to be active, in Unix epoch time. @JsonKey(name: r'from') final int from; - /// Upper bound of the time range (Unix timestamp). + /// When the rule should stop to be active, in Unix epoch time. @JsonKey(name: r'until') final int until; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/typo_tolerance_enum.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/typo_tolerance_enum.dart index b5ec1a7893..186d208d01 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/typo_tolerance_enum.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/typo_tolerance_enum.dart @@ -2,6 +2,7 @@ // ignore_for_file: unused_element import 'package:json_annotation/json_annotation.dart'; +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. @JsonEnum(valueField: 'raw') enum TypoToleranceEnum { min(r'min'), diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_response.dart index 0f2f7e35e0..72680a4547 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_response.dart @@ -13,7 +13,7 @@ final class UpdatedAtResponse { required this.updatedAt, }); - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_with_object_id_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_with_object_id_response.dart index 7f3eafc7a2..9df065f6fe 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_with_object_id_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_at_with_object_id_response.dart @@ -14,7 +14,7 @@ final class UpdatedAtWithObjectIdResponse { this.objectID, }); - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int? taskID; @@ -22,7 +22,7 @@ final class UpdatedAtWithObjectIdResponse { @JsonKey(name: r'updatedAt') final String? updatedAt; - /// Unique object identifier. + /// Unique record identifier. @JsonKey(name: r'objectID') final String? objectID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_rule_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_rule_response.dart index d5f2aea21d..731e51cf5f 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_rule_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_rule_response.dart @@ -14,7 +14,7 @@ final class UpdatedRuleResponse { required this.taskID, }); - /// Unique object identifier. + /// Unique identifier of a rule object. @JsonKey(name: r'objectID') final String objectID; @@ -22,7 +22,7 @@ final class UpdatedRuleResponse { @JsonKey(name: r'updatedAt') final String updatedAt; - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. @JsonKey(name: r'taskID') final int taskID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_hit.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_hit.dart index 9ecccd2e01..89b6b20cf4 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_hit.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_hit.dart @@ -18,7 +18,7 @@ final class UserHit { required this.highlightResult, }); - /// userID of the user. + /// User ID. @JsonKey(name: r'userID') final String userID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_id.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_id.dart index e4f6fcc353..f6aabfc182 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_id.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/user_id.dart @@ -15,7 +15,7 @@ final class UserId { required this.dataSize, }); - /// userID of the user. + /// User ID. @JsonKey(name: r'userID') final String userID; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/value.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/value.dart index ca04e09140..5d9e53b611 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/value.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/value.dart @@ -14,7 +14,7 @@ final class Value { this.sortRemainingBy, }); - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. @JsonKey(name: r'order') final List? order; diff --git a/clients/algoliasearch-client-go/algolia/abtesting/api_abtesting.go b/clients/algoliasearch-client-go/algolia/abtesting/api_abtesting.go index 8a22f6f69c..c7f4e9cadc 100644 --- a/clients/algoliasearch-client-go/algolia/abtesting/api_abtesting.go +++ b/clients/algoliasearch-client-go/algolia/abtesting/api_abtesting.go @@ -1113,8 +1113,8 @@ Required API Key ACLs: Request can be constructed by NewApiListABTestsRequest with parameters below. - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. - @param limit int32 - Number of records to return (page size). + @param offset int32 - Position of the first item to return. + @param limit int32 - Number of items to return. @param indexPrefix string - Only return A/B tests for indices starting with this prefix. @param indexSuffix string - Only return A/B tests for indices ending with this suffix. @return ListABTestsResponse @@ -1133,8 +1133,8 @@ Required API Key ACLs: Request can be constructed by NewApiListABTestsRequest with parameters below. - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. - @param limit int32 - Number of records to return (page size). + @param offset int32 - Position of the first item to return. + @param limit int32 - Number of items to return. @param indexPrefix string - Only return A/B tests for indices starting with this prefix. @param indexSuffix string - Only return A/B tests for indices ending with this suffix. @return ListABTestsResponse diff --git a/clients/algoliasearch-client-go/algolia/abtesting/model_ab_test_response.go b/clients/algoliasearch-client-go/algolia/abtesting/model_ab_test_response.go index 69408604c7..62478039fd 100644 --- a/clients/algoliasearch-client-go/algolia/abtesting/model_ab_test_response.go +++ b/clients/algoliasearch-client-go/algolia/abtesting/model_ab_test_response.go @@ -12,7 +12,7 @@ type ABTestResponse struct { Index string `json:"index"` // Unique A/B test ID. AbTestID int32 `json:"abTestID"` - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` } diff --git a/clients/algoliasearch-client-go/algolia/analytics/api_analytics.go b/clients/algoliasearch-client-go/algolia/analytics/api_analytics.go index d4abe4a810..dd1e268d39 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/api_analytics.go +++ b/clients/algoliasearch-client-go/algolia/analytics/api_analytics.go @@ -736,9 +736,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetAverageClickPositionRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetAverageClickPositionResponse */ @@ -757,9 +757,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetAverageClickPositionRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetAverageClickPositionResponse */ @@ -926,9 +926,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetClickPositionsRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetClickPositionsResponse */ @@ -948,9 +948,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetClickPositionsRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetClickPositionsResponse */ @@ -1115,9 +1115,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetClickThroughRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetClickThroughRateResponse */ @@ -1135,9 +1135,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetClickThroughRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetClickThroughRateResponse */ @@ -1302,9 +1302,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetConversationRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetConversationRateResponse */ @@ -1322,9 +1322,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetConversationRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetConversationRateResponse */ @@ -1489,9 +1489,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetNoClickRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetNoClickRateResponse */ @@ -1509,9 +1509,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetNoClickRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetNoClickRateResponse */ @@ -1676,9 +1676,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetNoResultsRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetNoResultsRateResponse */ @@ -1696,9 +1696,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetNoResultsRateRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetNoResultsRateResponse */ @@ -1863,9 +1863,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetSearchesCountRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetSearchesCountResponse */ @@ -1883,9 +1883,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetSearchesCountRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetSearchesCountResponse */ @@ -2082,11 +2082,11 @@ Required API Key ACLs: Request can be constructed by NewApiGetSearchesNoClicksRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetSearchesNoClicksResponse */ @@ -2104,11 +2104,11 @@ Required API Key ACLs: Request can be constructed by NewApiGetSearchesNoClicksRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetSearchesNoClicksResponse */ @@ -2311,11 +2311,11 @@ Required API Key ACLs: Request can be constructed by NewApiGetSearchesNoResultsRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetSearchesNoResultsResponse */ @@ -2333,11 +2333,11 @@ Required API Key ACLs: Request can be constructed by NewApiGetSearchesNoResultsRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetSearchesNoResultsResponse */ @@ -2461,7 +2461,7 @@ Required API Key ACLs: Request can be constructed by NewApiGetStatusRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @return GetStatusResponse */ func (c *APIClient) GetStatus(r ApiGetStatusRequest, opts ...Option) (*GetStatusResponse, error) { @@ -2479,7 +2479,7 @@ Required API Key ACLs: Request can be constructed by NewApiGetStatusRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @return GetStatusResponse */ func (c *APIClient) GetStatusWithContext(ctx context.Context, r ApiGetStatusRequest, opts ...Option) (*GetStatusResponse, error) { @@ -2666,11 +2666,11 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopCountriesRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopCountriesResponse */ @@ -2688,11 +2688,11 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopCountriesRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopCountriesResponse */ @@ -2911,12 +2911,12 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopFilterAttributesRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopFilterAttributesResponse */ @@ -2934,12 +2934,12 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopFilterAttributesRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopFilterAttributesResponse */ @@ -3173,12 +3173,12 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopFilterForAttributeRequest with parameters below. @param attribute string - Attribute name. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopFilterForAttributeResponse */ @@ -3197,12 +3197,12 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopFilterForAttributeRequest with parameters below. @param attribute string - Attribute name. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopFilterForAttributeResponse */ @@ -3428,12 +3428,12 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopFiltersNoResultsRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopFiltersNoResultsResponse */ @@ -3451,12 +3451,12 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopFiltersNoResultsRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopFiltersNoResultsResponse */ @@ -3694,13 +3694,13 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopHitsRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. @param clickAnalytics bool - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopHitsResponse */ @@ -3718,13 +3718,13 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopHitsRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param search string - User query. @param clickAnalytics bool - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopHitsResponse */ @@ -3981,14 +3981,14 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopSearchesRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param clickAnalytics bool - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param orderBy OrderBy - Reorder the results. @param direction Direction - Sorting direction of the results: ascending or descending. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopSearchesResponse */ @@ -4006,14 +4006,14 @@ Required API Key ACLs: Request can be constructed by NewApiGetTopSearchesRequest with parameters below. - @param index string - Index name to target. + @param index string - Index name. @param clickAnalytics bool - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param orderBy OrderBy - Reorder the results. @param direction Direction - Sorting direction of the results: ascending or descending. - @param limit int32 - Number of records to return (page size). - @param offset int32 - Position of the starting record. Used for paging. 0 is the first record. + @param limit int32 - Number of items to return. + @param offset int32 - Position of the first item to return. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetTopSearchesResponse */ @@ -4193,9 +4193,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetUsersCountRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetUsersCountResponse */ @@ -4213,9 +4213,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetUsersCountRequest with parameters below. - @param index string - Index name to target. - @param startDate string - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - @param endDate string - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + @param index string - Index name. + @param startDate string - Start date (`YYYY-MM-DD`) of the period to analyze. + @param endDate string - End date (`YYYY-MM-DD`) of the period to analyze. @param tags string - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. @return GetUsersCountResponse */ diff --git a/clients/algoliasearch-client-go/algolia/analytics/model_search_no_result_event.go b/clients/algoliasearch-client-go/algolia/analytics/model_search_no_result_event.go index fa71e78f3a..af2fe16ee6 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/model_search_no_result_event.go +++ b/clients/algoliasearch-client-go/algolia/analytics/model_search_no_result_event.go @@ -12,7 +12,7 @@ type SearchNoResultEvent struct { Search string `json:"search"` // Number of occurrences. Count int32 `json:"count"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` } diff --git a/clients/algoliasearch-client-go/algolia/analytics/model_top_search.go b/clients/algoliasearch-client-go/algolia/analytics/model_top_search.go index 55b567ec1b..76934a6196 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/model_top_search.go +++ b/clients/algoliasearch-client-go/algolia/analytics/model_top_search.go @@ -12,7 +12,7 @@ type TopSearch struct { Search string `json:"search"` // Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). Count int32 `json:"count"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` } diff --git a/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go b/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go index 29c940fe74..a00af8d5d2 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go +++ b/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go @@ -26,7 +26,7 @@ type TopSearchWithAnalytics struct { ClickCount int32 `json:"clickCount"` // Number of converted clicks. ConversionCount int32 `json:"conversionCount"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/api_recommend.go b/clients/algoliasearch-client-go/algolia/recommend/api_recommend.go index 71ff4e58fa..229119279d 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/api_recommend.go +++ b/clients/algoliasearch-client-go/algolia/recommend/api_recommend.go @@ -709,9 +709,9 @@ Required API Key ACLs: Request can be constructed by NewApiDeleteRecommendRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - @param objectID string - Unique record (object) identifier. + @param objectID string - Unique record identifier. @return DeletedAtResponse */ func (c *APIClient) DeleteRecommendRule(r ApiDeleteRecommendRuleRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -728,9 +728,9 @@ Required API Key ACLs: Request can be constructed by NewApiDeleteRecommendRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - @param objectID string - Unique record (object) identifier. + @param objectID string - Unique record identifier. @return DeletedAtResponse */ func (c *APIClient) DeleteRecommendRuleWithContext(ctx context.Context, r ApiDeleteRecommendRuleRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -864,9 +864,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetRecommendRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - @param objectID string - Unique record (object) identifier. + @param objectID string - Unique record identifier. @return RuleResponse */ func (c *APIClient) GetRecommendRule(r ApiGetRecommendRuleRequest, opts ...Option) (*RuleResponse, error) { @@ -883,9 +883,9 @@ Required API Key ACLs: Request can be constructed by NewApiGetRecommendRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - @param objectID string - Unique record (object) identifier. + @param objectID string - Unique record identifier. @return RuleResponse */ func (c *APIClient) GetRecommendRuleWithContext(ctx context.Context, r ApiGetRecommendRuleRequest, opts ...Option) (*RuleResponse, error) { @@ -1019,7 +1019,7 @@ Required API Key ACLs: Request can be constructed by NewApiGetRecommendStatusRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). @param taskID int64 - Unique identifier of a task. Numeric value (up to 64bits). @return GetRecommendTaskResponse @@ -1038,7 +1038,7 @@ Required API Key ACLs: Request can be constructed by NewApiGetRecommendStatusRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). @param taskID int64 - Unique identifier of a task. Numeric value (up to 64bits). @return GetRecommendTaskResponse @@ -1311,7 +1311,7 @@ Required API Key ACLs: Request can be constructed by NewApiSearchRecommendRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). @param searchRecommendRulesParams SearchRecommendRulesParams @return SearchRecommendRulesResponse @@ -1330,7 +1330,7 @@ Required API Key ACLs: Request can be constructed by NewApiSearchRecommendRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param model RecommendModels - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). @param searchRecommendRulesParams SearchRecommendRulesParams @return SearchRecommendRulesResponse diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_anchoring.go b/clients/algoliasearch-client-go/algolia/recommend/model_anchoring.go index c5f510f940..593ea60eae 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_anchoring.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_anchoring.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Anchoring Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +// Anchoring Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. type Anchoring string // List of anchoring. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go b/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go index 01b1fd5ba9..2014ed1344 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AroundPrecision - Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +// AroundPrecision - Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. type AroundPrecision struct { ArrayOfAroundPrecisionFromValueInner *[]AroundPrecisionFromValueInner Int32 *int32 diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision_from_value_inner.go b/clients/algoliasearch-client-go/algolia/recommend/model_around_precision_from_value_inner.go index e6e0a56ab0..08604735eb 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision_from_value_inner.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_around_precision_from_value_inner.go @@ -6,9 +6,11 @@ import ( "fmt" ) -// AroundPrecisionFromValueInner struct for AroundPrecisionFromValueInner. +// AroundPrecisionFromValueInner Range object with lower and upper values in meters to define custom ranges. type AroundPrecisionFromValueInner struct { - From *int32 `json:"from,omitempty"` + // Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + From *int32 `json:"from,omitempty"` + // Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. Value *int32 `json:"value,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_around_radius.go b/clients/algoliasearch-client-go/algolia/recommend/model_around_radius.go index adcb4bc203..f7eceaf616 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_around_radius.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_around_radius.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AroundRadius - [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). +// AroundRadius - Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. type AroundRadius struct { AroundRadiusAll *AroundRadiusAll Int32 *int32 diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_around_radius_all.go b/clients/algoliasearch-client-go/algolia/recommend/model_around_radius_all.go index b032a58337..094b2c00ca 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_around_radius_all.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_around_radius_all.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AroundRadiusAll the model 'AroundRadiusAll'. +// AroundRadiusAll Return all records with a valid `_geoloc` attribute. Don't filter by distance. type AroundRadiusAll string // List of aroundRadiusAll. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filter.go b/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filter.go index 2e0ae2c644..bd5fde004e 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filter.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filter.go @@ -6,13 +6,13 @@ import ( "fmt" ) -// AutomaticFacetFilter Automatic facet Filter. +// AutomaticFacetFilter Filter or optional filter to be applied to the search. type AutomaticFacetFilter struct { - // Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + // Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. Facet string `json:"facet"` - // Score for the filter. Typically used for optional or disjunctive filters. + // Filter scores to give different weights to individual filters. Score *int32 `json:"score,omitempty"` - // Whether the filter is disjunctive (true) or conjunctive (false). + // Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurrences are combined with the logical `OR` operation. If false, multiple occurrences are combined with the logical `AND` operation. Disjunctive *bool `json:"disjunctive,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filters.go b/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filters.go index 60004a9587..04ae2a00b3 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filters.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_automatic_facet_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AutomaticFacetFilters - Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. +// AutomaticFacetFilters - Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. type AutomaticFacetFilters struct { ArrayOfAutomaticFacetFilter *[]AutomaticFacetFilter ArrayOfString *[]string diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_base_recommend_request.go b/clients/algoliasearch-client-go/algolia/recommend/model_base_recommend_request.go index f639f1b378..33b1adb886 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_base_recommend_request.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_base_recommend_request.go @@ -8,7 +8,7 @@ import ( // BaseRecommendRequest struct for BaseRecommendRequest. type BaseRecommendRequest struct { - // Algolia index name. + // Index name. IndexName string `json:"indexName"` // Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. Threshold *int32 `json:"threshold,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_base_recommendations_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_base_recommendations_query.go index 2d54db35b2..23f628b239 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_base_recommendations_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_base_recommendations_query.go @@ -9,7 +9,7 @@ import ( // BaseRecommendationsQuery struct for BaseRecommendationsQuery. type BaseRecommendationsQuery struct { Model RecommendationModels `json:"model"` - // Unique object identifier. + // Unique record identifier. ObjectID string `json:"objectID"` QueryParameters *SearchParamsObject `json:"queryParameters,omitempty"` FallbackParameters *SearchParamsObject `json:"fallbackParameters,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_base_recommended_for_you_query_parameters.go b/clients/algoliasearch-client-go/algolia/recommend/model_base_recommended_for_you_query_parameters.go index 8cc7b0e33e..6f3605021c 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_base_recommended_for_you_query_parameters.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_base_recommended_for_you_query_parameters.go @@ -8,7 +8,7 @@ import ( // BaseRecommendedForYouQueryParameters struct for BaseRecommendedForYouQueryParameters. type BaseRecommendedForYouQueryParameters struct { - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken string `json:"userToken"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params.go b/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params.go index bdd24ad7c3..593e8e13ad 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params.go @@ -8,65 +8,63 @@ import ( // BaseSearchParams struct for BaseSearchParams. type BaseSearchParams struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` } @@ -228,12 +226,6 @@ func WithBaseSearchParamsGetRankingInfo(val bool) BaseSearchParamsOption { } } -func WithBaseSearchParamsExplain(val []string) BaseSearchParamsOption { - return func(f *BaseSearchParams) { - f.Explain = val - } -} - func WithBaseSearchParamsSynonyms(val bool) BaseSearchParamsOption { return func(f *BaseSearchParams) { f.Synonyms = &val @@ -1145,39 +1137,6 @@ func (o *BaseSearchParams) SetGetRankingInfo(v bool) *BaseSearchParams { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *BaseSearchParams) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseSearchParams) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *BaseSearchParams) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *BaseSearchParams) SetExplain(v []string) *BaseSearchParams { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *BaseSearchParams) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1456,9 +1415,6 @@ func (o BaseSearchParams) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -1513,7 +1469,6 @@ func (o BaseSearchParams) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params_without_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params_without_query.go index ff8b0550ca..6b77e0dd3c 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params_without_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_base_search_params_without_query.go @@ -8,63 +8,61 @@ import ( // BaseSearchParamsWithoutQuery struct for BaseSearchParamsWithoutQuery. type BaseSearchParamsWithoutQuery struct { - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` } @@ -220,12 +218,6 @@ func WithBaseSearchParamsWithoutQueryGetRankingInfo(val bool) BaseSearchParamsWi } } -func WithBaseSearchParamsWithoutQueryExplain(val []string) BaseSearchParamsWithoutQueryOption { - return func(f *BaseSearchParamsWithoutQuery) { - f.Explain = val - } -} - func WithBaseSearchParamsWithoutQuerySynonyms(val bool) BaseSearchParamsWithoutQueryOption { return func(f *BaseSearchParamsWithoutQuery) { f.Synonyms = &val @@ -1104,39 +1096,6 @@ func (o *BaseSearchParamsWithoutQuery) SetGetRankingInfo(v bool) *BaseSearchPara return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *BaseSearchParamsWithoutQuery) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseSearchParamsWithoutQuery) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *BaseSearchParamsWithoutQuery) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *BaseSearchParamsWithoutQuery) SetExplain(v []string) *BaseSearchParamsWithoutQuery { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *BaseSearchParamsWithoutQuery) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1412,9 +1371,6 @@ func (o BaseSearchParamsWithoutQuery) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -1468,7 +1424,6 @@ func (o BaseSearchParamsWithoutQuery) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_base_search_response.go b/clients/algoliasearch-client-go/algolia/recommend/model_base_search_response.go index f47316af50..789444381e 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_base_search_response.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_base_search_response.go @@ -14,7 +14,7 @@ type BaseSearchResponse struct { AbTestVariantID *int32 `json:"abTestVariantID,omitempty"` // Computed geographical location. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Automatically-computed radius. + // Distance from a central coordinate provided by `aroundLatLng`. AutomaticRadius *string `json:"automaticRadius,omitempty"` Exhaustive *Exhaustive `json:"exhaustive,omitempty"` // See the `facetsCount` field of the `exhaustive` object in the response. @@ -26,7 +26,7 @@ type BaseSearchResponse struct { // See the `typo` field of the `exhaustive` object in the response. // Deprecated ExhaustiveTypo *bool `json:"exhaustiveTypo,omitempty"` - // Mapping of each facet name to the corresponding facet counts. + // Facet counts. Facets *map[string]map[string]int32 `json:"facets,omitempty"` // Statistics for numerical facets. FacetsStats *map[string]FacetsStats `json:"facets_stats,omitempty"` @@ -38,13 +38,13 @@ type BaseSearchResponse struct { IndexUsed *string `json:"indexUsed,omitempty"` // Warnings about the query. Message *string `json:"message,omitempty"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` - // Number of pages of results for the current query. + // Number of pages of results. NbPages int32 `json:"nbPages"` // Number of hits selected and sorted by the relevant sort algorithm. NbSortedHits *int32 `json:"nbSortedHits,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page int32 `json:"page"` // 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. ParsedQuery *string `json:"parsedQuery,omitempty"` @@ -60,7 +60,7 @@ type BaseSearchResponse struct { ServerTimeMS *int32 `json:"serverTimeMS,omitempty"` // Host name of the server that processed the request. ServerUsed *string `json:"serverUsed,omitempty"` - // Lets you store custom data in your indices. + // An object with custom data. You can store up to 32 kB as custom data. UserData interface{} `json:"userData,omitempty"` // Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). QueryID *string `json:"queryID,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_condition.go b/clients/algoliasearch-client-go/algolia/recommend/model_condition.go index 0717e99de1..f9cd3181bb 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_condition.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_condition.go @@ -8,13 +8,15 @@ import ( // Condition struct for Condition. type Condition struct { - // Query pattern syntax. + // Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". Pattern *string `json:"pattern,omitempty"` Anchoring *Anchoring `json:"anchoring,omitempty"` - // Whether the pattern matches on plurals, synonyms, and typos. + // Whether the pattern should match plurals, synonyms, and typos. Alternatives *bool `json:"alternatives,omitempty"` - // Rule context format: [A-Za-z0-9_-]+). + // An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. Context *string `json:"context,omitempty"` + // Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + Filters *string `json:"filters,omitempty"` } type ConditionOption func(f *Condition) @@ -43,6 +45,12 @@ func WithConditionContext(val string) ConditionOption { } } +func WithConditionFilters(val string) ConditionOption { + return func(f *Condition) { + f.Filters = &val + } +} + // NewCondition instantiates a new Condition object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -192,6 +200,39 @@ func (o *Condition) SetContext(v string) *Condition { return o } +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *Condition) GetFilters() string { + if o == nil || o.Filters == nil { + var ret string + return ret + } + return *o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Condition) GetFiltersOk() (*string, bool) { + if o == nil || o.Filters == nil { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *Condition) HasFilters() bool { + if o != nil && o.Filters != nil { + return true + } + + return false +} + +// SetFilters gets a reference to the given string and assigns it to the Filters field. +func (o *Condition) SetFilters(v string) *Condition { + o.Filters = &v + return o +} + func (o Condition) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Pattern != nil { @@ -206,6 +247,9 @@ func (o Condition) MarshalJSON() ([]byte, error) { if o.Context != nil { toSerialize["context"] = o.Context } + if o.Filters != nil { + toSerialize["filters"] = o.Filters + } serialized, err := json.Marshal(toSerialize) if err != nil { return nil, fmt.Errorf("failed to marshal Condition: %w", err) @@ -220,6 +264,7 @@ func (o Condition) String() string { out += fmt.Sprintf(" anchoring=%v\n", o.Anchoring) out += fmt.Sprintf(" alternatives=%v\n", o.Alternatives) out += fmt.Sprintf(" context=%v\n", o.Context) + out += fmt.Sprintf(" filters=%v\n", o.Filters) return fmt.Sprintf("Condition {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_consequence.go b/clients/algoliasearch-client-go/algolia/recommend/model_consequence.go index a2f52cfc01..09a75662b5 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_consequence.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_consequence.go @@ -6,16 +6,16 @@ import ( "fmt" ) -// Consequence [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +// Consequence Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). type Consequence struct { Params *ConsequenceParams `json:"params,omitempty"` - // Records to promote. + // Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. Promote []Promote `json:"promote,omitempty"` - // Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + // Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precedence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. FilterPromotes *bool `json:"filterPromotes,omitempty"` - // Records to hide. By default, you can hide up to 50 records per rule. + // Records you want to hide from the search results. Hide []ConsequenceHide `json:"hide,omitempty"` - // Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + // A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. UserData interface{} `json:"userData,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_hide.go b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_hide.go index 8028df3059..f73d64f85e 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_hide.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_hide.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// ConsequenceHide Unique identifier of the record to hide. +// ConsequenceHide Object ID of the record to hide. type ConsequenceHide struct { - // Unique object identifier. + // Unique record identifier. ObjectID string `json:"objectID"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_params.go b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_params.go index e9ae23ad2b..429a19ecf5 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_params.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_params.go @@ -8,141 +8,137 @@ import ( // ConsequenceParams struct for ConsequenceParams. type ConsequenceParams struct { - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` Query *ConsequenceQuery `json:"query,omitempty"` @@ -302,12 +298,6 @@ func WithConsequenceParamsGetRankingInfo(val bool) ConsequenceParamsOption { } } -func WithConsequenceParamsExplain(val []string) ConsequenceParamsOption { - return func(f *ConsequenceParams) { - f.Explain = val - } -} - func WithConsequenceParamsSynonyms(val bool) ConsequenceParamsOption { return func(f *ConsequenceParams) { f.Synonyms = &val @@ -344,12 +334,6 @@ func WithConsequenceParamsEnableABTest(val bool) ConsequenceParamsOption { } } -func WithConsequenceParamsAttributesForFaceting(val []string) ConsequenceParamsOption { - return func(f *ConsequenceParams) { - f.AttributesForFaceting = val - } -} - func WithConsequenceParamsAttributesToRetrieve(val []string) ConsequenceParamsOption { return func(f *ConsequenceParams) { f.AttributesToRetrieve = val @@ -1474,39 +1458,6 @@ func (o *ConsequenceParams) SetGetRankingInfo(v bool) *ConsequenceParams { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *ConsequenceParams) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsequenceParams) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *ConsequenceParams) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *ConsequenceParams) SetExplain(v []string) *ConsequenceParams { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *ConsequenceParams) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1705,39 +1656,6 @@ func (o *ConsequenceParams) SetEnableABTest(v bool) *ConsequenceParams { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *ConsequenceParams) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsequenceParams) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *ConsequenceParams) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *ConsequenceParams) SetAttributesForFaceting(v []string) *ConsequenceParams { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *ConsequenceParams) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3377,9 +3295,6 @@ func (o ConsequenceParams) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3398,9 +3313,6 @@ func (o ConsequenceParams) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3577,14 +3489,12 @@ func (o ConsequenceParams) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query.go index cbdc6ac22d..3ced5f4c6b 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// ConsequenceQuery - When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). +// ConsequenceQuery - Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. type ConsequenceQuery struct { ConsequenceQueryObject *ConsequenceQueryObject String *string diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query_object.go b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query_object.go index 21a18a219d..a9d4feae8e 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query_object.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_consequence_query_object.go @@ -8,9 +8,9 @@ import ( // ConsequenceQueryObject struct for ConsequenceQueryObject. type ConsequenceQueryObject struct { - // Words to remove. + // Words to remove from the search query. Remove []string `json:"remove,omitempty"` - // Edits to apply. + // Changes to make to the search query. Edits []Edit `json:"edits,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_deleted_at_response.go b/clients/algoliasearch-client-go/algolia/recommend/model_deleted_at_response.go index e92490a795..a894bac321 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_deleted_at_response.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_deleted_at_response.go @@ -8,7 +8,7 @@ import ( // DeletedAtResponse Response, taskID, and deletion timestamp. type DeletedAtResponse struct { - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` // Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. DeletedAt string `json:"deletedAt"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_distinct.go b/clients/algoliasearch-client-go/algolia/recommend/model_distinct.go index 9d637dfe6a..c5c476d923 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_distinct.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_distinct.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Distinct - Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +// Distinct - Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. type Distinct struct { Bool *bool Int32 *int32 diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_edit.go b/clients/algoliasearch-client-go/algolia/recommend/model_edit.go index 6d22ca9d72..a9ab55c157 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_edit.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_edit.go @@ -11,7 +11,7 @@ type Edit struct { Type *EditType `json:"type,omitempty"` // Text or patterns to remove from the query string. Delete *string `json:"delete,omitempty"` - // Text that should be inserted in place of the removed text inside the query string. + // Text to be added in place of the deleted text inside the query string. Insert *string `json:"insert,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_exact_on_single_word_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_exact_on_single_word_query.go index 7cca0e5aab..f6e372eaf1 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_exact_on_single_word_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_exact_on_single_word_query.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// ExactOnSingleWordQuery Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +// ExactOnSingleWordQuery Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. type ExactOnSingleWordQuery string // List of exactOnSingleWordQuery. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_facet_filters.go b/clients/algoliasearch-client-go/algolia/recommend/model_facet_filters.go index 1700d552b7..2f9707c519 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_facet_filters.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_facet_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// FacetFilters - [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +// FacetFilters - Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. type FacetFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_facet_ordering.go b/clients/algoliasearch-client-go/algolia/recommend/model_facet_ordering.go index d0c2f3a677..9e75bc2ba7 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_facet_ordering.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_facet_ordering.go @@ -6,10 +6,10 @@ import ( "fmt" ) -// FacetOrdering Defines the ordering of facets (widgets). +// FacetOrdering Order of facet names and facet values in your UI. type FacetOrdering struct { Facets *Facets `json:"facets,omitempty"` - // Ordering of facet values within an individual facet. + // Order of facet values. One object for each facet. Values *map[string]Value `json:"values,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_facets.go b/clients/algoliasearch-client-go/algolia/recommend/model_facets.go index a0c83bc9ab..0ba57163bb 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_facets.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_facets.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// Facets Ordering of facets (widgets). +// Facets Order of facet names. type Facets struct { - // Pinned order of facet lists. + // Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. Order []string `json:"order,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_highlight_result_option.go b/clients/algoliasearch-client-go/algolia/recommend/model_highlight_result_option.go index c6b17446b1..c75c1cd3d4 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_highlight_result_option.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_highlight_result_option.go @@ -6,12 +6,12 @@ import ( "fmt" ) -// HighlightResultOption Show highlighted section and words matched on a query. +// HighlightResultOption Surround words that match the query with HTML tags for highlighting. type HighlightResultOption struct { - // Markup text with `facetQuery` matches highlighted. + // Highlighted attribute value, including HTML tags. Value string `json:"value"` MatchLevel MatchLevel `json:"matchLevel"` - // List of words from the query that matched the object. + // List of matched words from the search query. MatchedWords []string `json:"matchedWords"` // Whether the entire attribute value is highlighted. FullyHighlighted *bool `json:"fullyHighlighted,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_ignore_plurals.go b/clients/algoliasearch-client-go/algolia/recommend/model_ignore_plurals.go index fe5c42d233..ea5b89bca8 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_ignore_plurals.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_ignore_plurals.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// IgnorePlurals - Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). +// IgnorePlurals - Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. type IgnorePlurals struct { ArrayOfString *[]string Bool *bool diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_index_settings_as_search_params.go b/clients/algoliasearch-client-go/algolia/recommend/model_index_settings_as_search_params.go index 917e847dd3..9752bfdc9f 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_index_settings_as_search_params.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_index_settings_as_search_params.go @@ -8,95 +8,87 @@ import ( // IndexSettingsAsSearchParams struct for IndexSettingsAsSearchParams. type IndexSettingsAsSearchParams struct { - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` } type IndexSettingsAsSearchParamsOption func(f *IndexSettingsAsSearchParams) -func WithIndexSettingsAsSearchParamsAttributesForFaceting(val []string) IndexSettingsAsSearchParamsOption { - return func(f *IndexSettingsAsSearchParams) { - f.AttributesForFaceting = val - } -} - func WithIndexSettingsAsSearchParamsAttributesToRetrieve(val []string) IndexSettingsAsSearchParamsOption { return func(f *IndexSettingsAsSearchParams) { f.AttributesToRetrieve = val @@ -378,39 +370,6 @@ func NewEmptyIndexSettingsAsSearchParams() *IndexSettingsAsSearchParams { return &IndexSettingsAsSearchParams{} } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *IndexSettingsAsSearchParams) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndexSettingsAsSearchParams) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *IndexSettingsAsSearchParams) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *IndexSettingsAsSearchParams) SetAttributesForFaceting(v []string) *IndexSettingsAsSearchParams { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *IndexSettingsAsSearchParams) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -1876,9 +1835,6 @@ func (o *IndexSettingsAsSearchParams) UnsetReRankingApplyFilter() { func (o IndexSettingsAsSearchParams) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -2021,7 +1977,6 @@ func (o IndexSettingsAsSearchParams) MarshalJSON() ([]byte, error) { func (o IndexSettingsAsSearchParams) String() string { out := "" - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_match_level.go b/clients/algoliasearch-client-go/algolia/recommend/model_match_level.go index 37fedb517d..9fd4cee640 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_match_level.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_match_level.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// MatchLevel Indicates how well the attribute matched the search query. +// MatchLevel Whether the whole query string matches or only a part. type MatchLevel string // List of matchLevel. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_mode.go b/clients/algoliasearch-client-go/algolia/recommend/model_mode.go index a72089f732..ff7991a0b0 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_mode.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_mode.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Mode Search mode the index will use to query for results. +// Mode Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. type Mode string // List of mode. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_numeric_filters.go b/clients/algoliasearch-client-go/algolia/recommend/model_numeric_filters.go index 68fadc9f4a..acbda10863 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_numeric_filters.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_numeric_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// NumericFilters - [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +// NumericFilters - Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. type NumericFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_optional_filters.go b/clients/algoliasearch-client-go/algolia/recommend/model_optional_filters.go index 8a1d408811..b4587916a3 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_optional_filters.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_optional_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// OptionalFilters - Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. +// OptionalFilters - Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. type OptionalFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_params.go b/clients/algoliasearch-client-go/algolia/recommend/model_params.go index c30e38b2a9..39f2c638b4 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_params.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_params.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Params Additional search parameters. +// Params Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. type Params struct { Query *ConsequenceQuery `json:"query,omitempty"` AutomaticFacetFilters *AutomaticFacetFilters `json:"automaticFacetFilters,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_id.go b/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_id.go index 86ed37df74..3b73ffa32d 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_id.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_id.go @@ -8,9 +8,9 @@ import ( // PromoteObjectID Record to promote. type PromoteObjectID struct { - // Unique identifier of the record to promote. + // Unique record identifier. ObjectID string `json:"objectID"` - // The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + // Position in the search results where you want to show the promoted records. Position int32 `json:"position"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_ids.go b/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_ids.go index 4fc3f9d13d..79f57b0774 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_ids.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_promote_object_ids.go @@ -8,9 +8,9 @@ import ( // PromoteObjectIDs Records to promote. type PromoteObjectIDs struct { - // Unique identifiers of the records to promote. + // Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. ObjectIDs []string `json:"objectIDs"` - // The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + // Position in the search results where you want to show the promoted records. Position int32 `json:"position"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_query_type.go b/clients/algoliasearch-client-go/algolia/recommend/model_query_type.go index 348288ca49..655eae13e0 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_query_type.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_query_type.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// QueryType Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +// QueryType Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). type QueryType string // List of queryType. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_ranking_info.go b/clients/algoliasearch-client-go/algolia/recommend/model_ranking_info.go index 1f0eda4677..2e21760671 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_ranking_info.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_ranking_info.go @@ -6,11 +6,11 @@ import ( "fmt" ) -// RankingInfo struct for RankingInfo. +// RankingInfo Object with detailed information about the record's ranking. type RankingInfo struct { - // This field is reserved for advanced usage. + // Whether a filter matched the query. Filters int32 `json:"filters"` - // Position of the most important matched attribute in the attributes to index list. + // Position of the first matched word in the best matching attribute of the record. FirstMatchedWord int32 `json:"firstMatchedWord"` // Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). GeoDistance int32 `json:"geoDistance"` @@ -22,15 +22,15 @@ type RankingInfo struct { NbExactWords int32 `json:"nbExactWords"` // Number of typos encountered when matching the record. NbTypos int32 `json:"nbTypos"` - // Present and set to true if a Rule promoted the hit. + // Whether the record was promoted by a rule. Promoted bool `json:"promoted"` - // When the query contains more than one word, the sum of the distances between matched words (in meters). + // Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. ProximityDistance *int32 `json:"proximityDistance,omitempty"` - // Custom ranking for the object, expressed as a single integer value. + // Overall ranking of the record, expressed as a single integer. This attribute is internal. UserScore int32 `json:"userScore"` - // Number of matched words, including prefixes and typos. + // Number of matched words. Words int32 `json:"words"` - // Wether the record are promoted by the re-ranking strategy. + // Whether the record is re-ranked. PromotedByReRanking *bool `json:"promotedByReRanking,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_re_ranking_apply_filter.go b/clients/algoliasearch-client-go/algolia/recommend/model_re_ranking_apply_filter.go index fc9f0cf063..bb2b79521b 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_re_ranking_apply_filter.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_re_ranking_apply_filter.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// ReRankingApplyFilter - When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. +// ReRankingApplyFilter - Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. type ReRankingApplyFilter struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_hit.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommend_hit.go index 6d10716afa..a364d930fd 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_hit.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommend_hit.go @@ -8,11 +8,11 @@ import ( // RecommendHit Recommend hit. type RecommendHit struct { - // Unique object identifier. + // Unique record identifier. ObjectID string `json:"objectID"` - // Show highlighted section and words matched on a query. + // Surround words that match the query with HTML tags for highlighting. HighlightResult *map[string]HighlightResult `json:"_highlightResult,omitempty"` - // Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + // Snippets that show the context around a matching search query. SnippetResult *map[string]SnippetResult `json:"_snippetResult,omitempty"` RankingInfo *RankingInfo `json:"_rankingInfo,omitempty"` DistinctSeqID *int32 `json:"_distinctSeqID,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_hits.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_hits.go index bdc585e97b..d23d1087c1 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_hits.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_hits.go @@ -9,7 +9,7 @@ import ( // RecommendationsHits struct for RecommendationsHits. type RecommendationsHits struct { Hits []RecommendationsHit `json:"hits"` - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` // URL-encoded string of all search parameters. Params *string `json:"params,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_query.go index 55b7a6ae68..efa710b8af 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_query.go @@ -8,14 +8,14 @@ import ( // RecommendationsQuery struct for RecommendationsQuery. type RecommendationsQuery struct { - // Algolia index name. + // Index name. IndexName string `json:"indexName"` // Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. Threshold *int32 `json:"threshold,omitempty"` // Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. MaxRecommendations *int32 `json:"maxRecommendations,omitempty"` Model RecommendationModels `json:"model"` - // Unique object identifier. + // Unique record identifier. ObjectID string `json:"objectID"` QueryParameters *SearchParamsObject `json:"queryParameters,omitempty"` FallbackParameters *SearchParamsObject `json:"fallbackParameters,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_results.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_results.go index 5a0e0096ce..a176aca60c 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_results.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommendations_results.go @@ -14,7 +14,7 @@ type RecommendationsResults struct { AbTestVariantID *int32 `json:"abTestVariantID,omitempty"` // Computed geographical location. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Automatically-computed radius. + // Distance from a central coordinate provided by `aroundLatLng`. AutomaticRadius *string `json:"automaticRadius,omitempty"` Exhaustive *Exhaustive `json:"exhaustive,omitempty"` // See the `facetsCount` field of the `exhaustive` object in the response. @@ -26,7 +26,7 @@ type RecommendationsResults struct { // See the `typo` field of the `exhaustive` object in the response. // Deprecated ExhaustiveTypo *bool `json:"exhaustiveTypo,omitempty"` - // Mapping of each facet name to the corresponding facet counts. + // Facet counts. Facets *map[string]map[string]int32 `json:"facets,omitempty"` // Statistics for numerical facets. FacetsStats *map[string]FacetsStats `json:"facets_stats,omitempty"` @@ -38,13 +38,13 @@ type RecommendationsResults struct { IndexUsed *string `json:"indexUsed,omitempty"` // Warnings about the query. Message *string `json:"message,omitempty"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` - // Number of pages of results for the current query. + // Number of pages of results. NbPages int32 `json:"nbPages"` // Number of hits selected and sorted by the relevant sort algorithm. NbSortedHits *int32 `json:"nbSortedHits,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page int32 `json:"page"` // 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. ParsedQuery *string `json:"parsedQuery,omitempty"` @@ -60,12 +60,12 @@ type RecommendationsResults struct { ServerTimeMS *int32 `json:"serverTimeMS,omitempty"` // Host name of the server that processed the request. ServerUsed *string `json:"serverUsed,omitempty"` - // Lets you store custom data in your indices. + // An object with custom data. You can store up to 32 kB as custom data. UserData map[string]interface{} `json:"userData,omitempty"` // Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). QueryID *string `json:"queryID,omitempty"` Hits []RecommendationsHit `json:"hits"` - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` // URL-encoded string of all search parameters. Params *string `json:"params,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query.go index ea5605738a..efdfeb6e82 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query.go @@ -8,7 +8,7 @@ import ( // RecommendedForYouQuery struct for RecommendedForYouQuery. type RecommendedForYouQuery struct { - // Algolia index name. + // Index name. IndexName string `json:"indexName"` // Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. Threshold *int32 `json:"threshold,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query_parameters.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query_parameters.go index 3424f00046..301b176e94 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query_parameters.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommended_for_you_query_parameters.go @@ -8,143 +8,139 @@ import ( // RecommendedForYouQueryParameters struct for RecommendedForYouQueryParameters. type RecommendedForYouQueryParameters struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken string `json:"userToken"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` } @@ -301,12 +297,6 @@ func WithRecommendedForYouQueryParametersGetRankingInfo(val bool) RecommendedFor } } -func WithRecommendedForYouQueryParametersExplain(val []string) RecommendedForYouQueryParametersOption { - return func(f *RecommendedForYouQueryParameters) { - f.Explain = val - } -} - func WithRecommendedForYouQueryParametersSynonyms(val bool) RecommendedForYouQueryParametersOption { return func(f *RecommendedForYouQueryParameters) { f.Synonyms = &val @@ -343,12 +333,6 @@ func WithRecommendedForYouQueryParametersEnableABTest(val bool) RecommendedForYo } } -func WithRecommendedForYouQueryParametersAttributesForFaceting(val []string) RecommendedForYouQueryParametersOption { - return func(f *RecommendedForYouQueryParameters) { - f.AttributesForFaceting = val - } -} - func WithRecommendedForYouQueryParametersAttributesToRetrieve(val []string) RecommendedForYouQueryParametersOption { return func(f *RecommendedForYouQueryParameters) { f.AttributesToRetrieve = val @@ -1481,39 +1465,6 @@ func (o *RecommendedForYouQueryParameters) SetGetRankingInfo(v bool) *Recommende return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *RecommendedForYouQueryParameters) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecommendedForYouQueryParameters) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *RecommendedForYouQueryParameters) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *RecommendedForYouQueryParameters) SetExplain(v []string) *RecommendedForYouQueryParameters { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *RecommendedForYouQueryParameters) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1712,39 +1663,6 @@ func (o *RecommendedForYouQueryParameters) SetEnableABTest(v bool) *RecommendedF return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *RecommendedForYouQueryParameters) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecommendedForYouQueryParameters) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *RecommendedForYouQueryParameters) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *RecommendedForYouQueryParameters) SetAttributesForFaceting(v []string) *RecommendedForYouQueryParameters { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *RecommendedForYouQueryParameters) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3288,9 +3206,6 @@ func (o RecommendedForYouQueryParameters) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3309,9 +3224,6 @@ func (o RecommendedForYouQueryParameters) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3480,14 +3392,12 @@ func (o RecommendedForYouQueryParameters) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_remove_stop_words.go b/clients/algoliasearch-client-go/algolia/recommend/model_remove_stop_words.go index 395a1e56a3..630301b5e8 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_remove_stop_words.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_remove_stop_words.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// RemoveStopWords - Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. +// RemoveStopWords - Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. type RemoveStopWords struct { ArrayOfString *[]string Bool *bool diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_remove_words_if_no_results.go b/clients/algoliasearch-client-go/algolia/recommend/model_remove_words_if_no_results.go index b456e7bb03..c050c123d7 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_remove_words_if_no_results.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_remove_words_if_no_results.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// RemoveWordsIfNoResults Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +// RemoveWordsIfNoResults Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). type RemoveWordsIfNoResults string // List of removeWordsIfNoResults. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_rendering_content.go b/clients/algoliasearch-client-go/algolia/recommend/model_rendering_content.go index b2e4e6e0e3..b4e31cf485 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_rendering_content.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_rendering_content.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// RenderingContent Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +// RenderingContent Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. type RenderingContent struct { FacetOrdering *FacetOrdering `json:"facetOrdering,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_search_params_object.go b/clients/algoliasearch-client-go/algolia/recommend/model_search_params_object.go index e5b70ef4d0..e47aa8e04f 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_search_params_object.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_search_params_object.go @@ -8,143 +8,139 @@ import ( // SearchParamsObject struct for SearchParamsObject. type SearchParamsObject struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` } @@ -307,12 +303,6 @@ func WithSearchParamsObjectGetRankingInfo(val bool) SearchParamsObjectOption { } } -func WithSearchParamsObjectExplain(val []string) SearchParamsObjectOption { - return func(f *SearchParamsObject) { - f.Explain = val - } -} - func WithSearchParamsObjectSynonyms(val bool) SearchParamsObjectOption { return func(f *SearchParamsObject) { f.Synonyms = &val @@ -349,12 +339,6 @@ func WithSearchParamsObjectEnableABTest(val bool) SearchParamsObjectOption { } } -func WithSearchParamsObjectAttributesForFaceting(val []string) SearchParamsObjectOption { - return func(f *SearchParamsObject) { - f.AttributesForFaceting = val - } -} - func WithSearchParamsObjectAttributesToRetrieve(val []string) SearchParamsObjectOption { return func(f *SearchParamsObject) { f.AttributesToRetrieve = val @@ -1494,39 +1478,6 @@ func (o *SearchParamsObject) SetGetRankingInfo(v bool) *SearchParamsObject { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *SearchParamsObject) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchParamsObject) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *SearchParamsObject) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *SearchParamsObject) SetExplain(v []string) *SearchParamsObject { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *SearchParamsObject) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1725,39 +1676,6 @@ func (o *SearchParamsObject) SetEnableABTest(v bool) *SearchParamsObject { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *SearchParamsObject) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchParamsObject) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *SearchParamsObject) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *SearchParamsObject) SetAttributesForFaceting(v []string) *SearchParamsObject { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *SearchParamsObject) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3301,9 +3219,6 @@ func (o SearchParamsObject) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3322,9 +3237,6 @@ func (o SearchParamsObject) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3493,14 +3405,12 @@ func (o SearchParamsObject) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_search_params_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_search_params_query.go index b26154d417..2273b8a04b 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_search_params_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_search_params_query.go @@ -8,7 +8,7 @@ import ( // SearchParamsQuery struct for SearchParamsQuery. type SearchParamsQuery struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_params.go b/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_params.go index bc0286aac7..aa89c406f2 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_params.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_params.go @@ -10,11 +10,11 @@ import ( // SearchRecommendRulesParams Recommend rules search parameters. type SearchRecommendRulesParams struct { - // Full-text query. + // Search query. Query *string `json:"query,omitempty"` // Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). Context *string `json:"context,omitempty"` - // Requested page (the first page is page 0). + // Requested page of the API response. Page *int32 `json:"page,omitempty"` // Maximum number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_response.go b/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_response.go index 3086ddbd72..a8291a5eeb 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_response.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_search_recommend_rules_response.go @@ -10,11 +10,11 @@ import ( type SearchRecommendRulesResponse struct { // Fetched rules. Hits []RuleResponse `json:"hits"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page int32 `json:"page"` - // Number of pages of results for the current query. + // Number of pages of results. NbPages int32 `json:"nbPages"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_semantic_search.go b/clients/algoliasearch-client-go/algolia/recommend/model_semantic_search.go index 7a198be519..fd5f5b686f 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_semantic_search.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_semantic_search.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// SemanticSearch Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +// SemanticSearch Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. type SemanticSearch struct { - // Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + // Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. EventSources []string `json:"eventSources,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_snippet_result_option.go b/clients/algoliasearch-client-go/algolia/recommend/model_snippet_result_option.go index 4b7793b5d8..09fce3b956 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_snippet_result_option.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_snippet_result_option.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// SnippetResultOption Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +// SnippetResultOption Snippets that show the context around a matching search query. type SnippetResultOption struct { - // Markup text with `facetQuery` matches highlighted. + // Highlighted attribute value, including HTML tags. Value string `json:"value"` MatchLevel MatchLevel `json:"matchLevel"` } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_sort_remaining_by.go b/clients/algoliasearch-client-go/algolia/recommend/model_sort_remaining_by.go index b356c0675d..b2ef725891 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_sort_remaining_by.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_sort_remaining_by.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// SortRemainingBy How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +// SortRemainingBy Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. type SortRemainingBy string // List of sortRemainingBy. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_tag_filters.go b/clients/algoliasearch-client-go/algolia/recommend/model_tag_filters.go index 4eeb8ebd9b..e551480154 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_tag_filters.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_tag_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TagFilters - [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +// TagFilters - Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. type TagFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_task_status.go b/clients/algoliasearch-client-go/algolia/recommend/model_task_status.go index 42b2afbb3b..41902874ac 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_task_status.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_task_status.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TaskStatus _published_ if the task has been processed, _notPublished_ otherwise. +// TaskStatus Task status, `published` if the task is completed, `notPublished` otherwise. type TaskStatus string // List of taskStatus. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_trending_facets_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_trending_facets_query.go index 5e64a825e6..e45fe4d08a 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_trending_facets_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_trending_facets_query.go @@ -8,7 +8,7 @@ import ( // TrendingFacetsQuery struct for TrendingFacetsQuery. type TrendingFacetsQuery struct { - // Algolia index name. + // Index name. IndexName string `json:"indexName"` // Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. Threshold *int32 `json:"threshold,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_trending_items_query.go b/clients/algoliasearch-client-go/algolia/recommend/model_trending_items_query.go index d516bf931b..3ce5700dce 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_trending_items_query.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_trending_items_query.go @@ -8,7 +8,7 @@ import ( // TrendingItemsQuery struct for TrendingItemsQuery. type TrendingItemsQuery struct { - // Algolia index name. + // Index name. IndexName string `json:"indexName"` // Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. Threshold *int32 `json:"threshold,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance.go b/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance.go index 1b6382e318..88e71a2ab9 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TypoTolerance - Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. +// TypoTolerance - Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. type TypoTolerance struct { TypoToleranceEnum *TypoToleranceEnum Bool *bool diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance_enum.go b/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance_enum.go index d0f8ec8a94..a745bea062 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance_enum.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_typo_tolerance_enum.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TypoToleranceEnum the model 'TypoToleranceEnum'. +// TypoToleranceEnum - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. type TypoToleranceEnum string // List of typoToleranceEnum. diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_value.go b/clients/algoliasearch-client-go/algolia/recommend/model_value.go index 6c27a8f94c..5d24acc08f 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_value.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_value.go @@ -8,7 +8,7 @@ import ( // Value struct for Value. type Value struct { - // Pinned order of facet lists. + // Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. Order []string `json:"order,omitempty"` SortRemainingBy *SortRemainingBy `json:"sortRemainingBy,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/api_search.go b/clients/algoliasearch-client-go/algolia/search/api_search.go index e9f790b89c..4eb5a19a4f 100644 --- a/clients/algoliasearch-client-go/algolia/search/api_search.go +++ b/clients/algoliasearch-client-go/algolia/search/api_search.go @@ -81,9 +81,7 @@ func (c *APIClient) NewApiAddApiKeyRequest(apiKey *ApiKey) ApiAddApiKeyRequest { /* AddApiKey Wraps AddApiKeyWithContext using context.Background. -Add a new API key with specific permissions and restrictions. -The request must be authenticated with the admin API key. -The response returns an API key string. +Creates a new API key with specific permissions and restrictions. Required API Key ACLs: - admin @@ -100,9 +98,7 @@ func (c *APIClient) AddApiKey(r ApiAddApiKeyRequest, opts ...Option) (*AddApiKey /* AddApiKey -Add a new API key with specific permissions and restrictions. -The request must be authenticated with the admin API key. -The response returns an API key string. +Creates a new API key with specific permissions and restrictions. Required API Key ACLs: - admin @@ -237,20 +233,20 @@ func (c *APIClient) NewApiAddOrUpdateObjectRequest(indexName string, objectID st /* AddOrUpdateObject Wraps AddOrUpdateObjectWithContext using context.Background. -If you use an existing `objectID`, the existing record will be replaced with the new one. +If a record with the specified object ID exists, the existing record is replaced. +Otherwise, a new record is added to the index. -To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. - -To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). +To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. +To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject Request can be constructed by NewApiAddOrUpdateObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. - @param body map[string]interface{} - Algolia record. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. + @param body map[string]interface{} - The record, a schemaless object with attributes that are useful in the context of search and discovery. @return UpdatedAtWithObjectIdResponse */ func (c *APIClient) AddOrUpdateObject(r ApiAddOrUpdateObjectRequest, opts ...Option) (*UpdatedAtWithObjectIdResponse, error) { @@ -260,20 +256,20 @@ func (c *APIClient) AddOrUpdateObject(r ApiAddOrUpdateObjectRequest, opts ...Opt /* AddOrUpdateObject -If you use an existing `objectID`, the existing record will be replaced with the new one. - -To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. +If a record with the specified object ID exists, the existing record is replaced. +Otherwise, a new record is added to the index. -To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). +To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. +To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject Request can be constructed by NewApiAddOrUpdateObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. - @param body map[string]interface{} - Algolia record. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. + @param body map[string]interface{} - The record, a schemaless object with attributes that are useful in the context of search and discovery. @return UpdatedAtWithObjectIdResponse */ func (c *APIClient) AddOrUpdateObjectWithContext(ctx context.Context, r ApiAddOrUpdateObjectRequest, opts ...Option) (*UpdatedAtWithObjectIdResponse, error) { @@ -387,7 +383,7 @@ func (c *APIClient) NewApiAppendSourceRequest(source *Source) ApiAppendSourceReq /* AppendSource Wraps AppendSourceWithContext using context.Background. -Add a source to the list of allowed sources. +Adds a source to the list of allowed sources. Required API Key ACLs: - admin @@ -404,7 +400,7 @@ func (c *APIClient) AppendSource(r ApiAppendSourceRequest, opts ...Option) (*Cre /* AppendSource -Add a source to the list of allowed sources. +Adds a source to the list of allowed sources. Required API Key ACLs: - admin @@ -528,7 +524,8 @@ func (c *APIClient) NewApiAssignUserIdRequest(xAlgoliaUserID string, assignUserI /* AssignUserId Wraps AssignUserIdWithContext using context.Background. -Assign or move a user ID to a cluster. +Assigns or moves a user ID to a cluster. + The time it takes to move a user is proportional to the amount of data linked to the user ID. Required API Key ACLs: @@ -536,7 +533,7 @@ Required API Key ACLs: Request can be constructed by NewApiAssignUserIdRequest with parameters below. - @param xAlgoliaUserID string - userID to assign. + @param xAlgoliaUserID string - User ID to assign. @param assignUserIdParams AssignUserIdParams @return CreatedAtResponse */ @@ -547,7 +544,8 @@ func (c *APIClient) AssignUserId(r ApiAssignUserIdRequest, opts ...Option) (*Cre /* AssignUserId -Assign or move a user ID to a cluster. +Assigns or moves a user ID to a cluster. + The time it takes to move a user is proportional to the amount of data linked to the user ID. Required API Key ACLs: @@ -555,7 +553,7 @@ Required API Key ACLs: Request can be constructed by NewApiAssignUserIdRequest with parameters below. - @param xAlgoliaUserID string - userID to assign. + @param xAlgoliaUserID string - User ID to assign. @param assignUserIdParams AssignUserIdParams @return CreatedAtResponse */ @@ -678,12 +676,16 @@ func (c *APIClient) NewApiBatchRequest(indexName string, batchWriteParams *Batch /* Batch Wraps BatchWithContext using context.Background. -To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. -The supported `action`s are equivalent to the individual operations of the same name. +Adds, updates, or deletes records in one index with a single API request. + +Batching index updates reduces latency and increases data integrity. + +- Actions are applied in the order they're specified. +- Actions are equivalent to the individual API requests of the same name. Request can be constructed by NewApiBatchRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param batchWriteParams BatchWriteParams @return BatchResponse */ @@ -694,12 +696,16 @@ func (c *APIClient) Batch(r ApiBatchRequest, opts ...Option) (*BatchResponse, er /* Batch -To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. -The supported `action`s are equivalent to the individual operations of the same name. +Adds, updates, or deletes records in one index with a single API request. + +Batching index updates reduces latency and increases data integrity. + +- Actions are applied in the order they're specified. +- Actions are equivalent to the individual API requests of the same name. Request can be constructed by NewApiBatchRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param batchWriteParams BatchWriteParams @return BatchResponse */ @@ -821,15 +827,16 @@ func (c *APIClient) NewApiBatchAssignUserIdsRequest(xAlgoliaUserID string, batch /* BatchAssignUserIds Wraps BatchAssignUserIdsWithContext using context.Background. -Assign multiple user IDs to a cluster. -**You can't _move_ users with this operation.**. +Assigns multiple user IDs to a cluster. + +**You can't move users with this operation**. Required API Key ACLs: - admin Request can be constructed by NewApiBatchAssignUserIdsRequest with parameters below. - @param xAlgoliaUserID string - userID to assign. + @param xAlgoliaUserID string - User ID to assign. @param batchAssignUserIdsParams BatchAssignUserIdsParams @return CreatedAtResponse */ @@ -840,15 +847,16 @@ func (c *APIClient) BatchAssignUserIds(r ApiBatchAssignUserIdsRequest, opts ...O /* BatchAssignUserIds -Assign multiple user IDs to a cluster. -**You can't _move_ users with this operation.**. +Assigns multiple user IDs to a cluster. + +**You can't move users with this operation**. Required API Key ACLs: - admin Request can be constructed by NewApiBatchAssignUserIdsRequest with parameters below. - @param xAlgoliaUserID string - userID to assign. + @param xAlgoliaUserID string - User ID to assign. @param batchAssignUserIdsParams BatchAssignUserIdsParams @return CreatedAtResponse */ @@ -971,14 +979,14 @@ func (c *APIClient) NewApiBatchDictionaryEntriesRequest(dictionaryName Dictionar /* BatchDictionaryEntries Wraps BatchDictionaryEntriesWithContext using context.Background. -Add or remove a batch of dictionary entries. +Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. Required API Key ACLs: - editSettings Request can be constructed by NewApiBatchDictionaryEntriesRequest with parameters below. - @param dictionaryName DictionaryType - Dictionary to search in. + @param dictionaryName DictionaryType - Dictionary type in which to search. @param batchDictionaryEntriesParams BatchDictionaryEntriesParams @return UpdatedAtResponse */ @@ -989,14 +997,14 @@ func (c *APIClient) BatchDictionaryEntries(r ApiBatchDictionaryEntriesRequest, o /* BatchDictionaryEntries -Add or remove a batch of dictionary entries. +Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. Required API Key ACLs: - editSettings Request can be constructed by NewApiBatchDictionaryEntriesRequest with parameters below. - @param dictionaryName DictionaryType - Dictionary to search in. + @param dictionaryName DictionaryType - Dictionary type in which to search. @param batchDictionaryEntriesParams BatchDictionaryEntriesParams @return UpdatedAtResponse */ @@ -1115,16 +1123,23 @@ func (r ApiBrowseRequest) WithBrowseParams(browseParams *BrowseParams) ApiBrowse /* Browse Wraps BrowseWithContext using context.Background. -Retrieve up to 1,000 records per call. -Supports full-text search and filters. For better performance, it doesn't support: -- The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. +Retrieves records from an index, up to 1,000 per request. + +While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), +browsing _just_ returns matching records. +This can be useful if you want to export your indices. + +- The Analytics API doesn't collect data when using `browse`. +- Records are ranked by attributes and custom ranking. +- Deduplication (`distinct`) is turned off. +- There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Required API Key ACLs: - browse Request can be constructed by NewApiBrowseRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param browseParams BrowseParams @return BrowseResponse */ @@ -1135,16 +1150,23 @@ func (c *APIClient) Browse(r ApiBrowseRequest, opts ...Option) (*BrowseResponse, /* Browse -Retrieve up to 1,000 records per call. -Supports full-text search and filters. For better performance, it doesn't support: -- The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. +Retrieves records from an index, up to 1,000 per request. + +While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), +browsing _just_ returns matching records. +This can be useful if you want to export your indices. + +- The Analytics API doesn't collect data when using `browse`. +- Records are ranked by attributes and custom ranking. +- Deduplication (`distinct`) is turned off. +- There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Required API Key ACLs: - browse Request can be constructed by NewApiBrowseRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param browseParams BrowseParams @return BrowseResponse */ @@ -1250,14 +1272,14 @@ func (c *APIClient) NewApiClearObjectsRequest(indexName string) ApiClearObjectsR /* ClearObjects Wraps ClearObjectsWithContext using context.Background. -Delete the records but leave settings and index-specific API keys untouched. +Deletes only the records from an index while keeping settings, synonyms, and rules. Required API Key ACLs: - deleteIndex Request can be constructed by NewApiClearObjectsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @return UpdatedAtResponse */ func (c *APIClient) ClearObjects(r ApiClearObjectsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -1267,14 +1289,14 @@ func (c *APIClient) ClearObjects(r ApiClearObjectsRequest, opts ...Option) (*Upd /* ClearObjects -Delete the records but leave settings and index-specific API keys untouched. +Deletes only the records from an index while keeping settings, synonyms, and rules. Required API Key ACLs: - deleteIndex Request can be constructed by NewApiClearObjectsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @return UpdatedAtResponse */ func (c *APIClient) ClearObjectsWithContext(ctx context.Context, r ApiClearObjectsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -1389,15 +1411,15 @@ func (r ApiClearRulesRequest) WithForwardToReplicas(forwardToReplicas bool) ApiC /* ClearRules Wraps ClearRulesWithContext using context.Background. -Delete all rules in the index. +Deletes all rules from the index. Required API Key ACLs: - editSettings Request can be constructed by NewApiClearRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param indexName string - Name of the index on which to perform the operation. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) ClearRules(r ApiClearRulesRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -1407,15 +1429,15 @@ func (c *APIClient) ClearRules(r ApiClearRulesRequest, opts ...Option) (*Updated /* ClearRules -Delete all rules in the index. +Deletes all rules from the index. Required API Key ACLs: - editSettings Request can be constructed by NewApiClearRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param indexName string - Name of the index on which to perform the operation. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) ClearRulesWithContext(ctx context.Context, r ApiClearRulesRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -1534,15 +1556,15 @@ func (r ApiClearSynonymsRequest) WithForwardToReplicas(forwardToReplicas bool) A /* ClearSynonyms Wraps ClearSynonymsWithContext using context.Background. -Delete all synonyms in the index. +Deletes all synonyms from the index. Required API Key ACLs: - editSettings Request can be constructed by NewApiClearSynonymsRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param indexName string - Name of the index on which to perform the operation. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) ClearSynonyms(r ApiClearSynonymsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -1552,15 +1574,15 @@ func (c *APIClient) ClearSynonyms(r ApiClearSynonymsRequest, opts ...Option) (*U /* ClearSynonyms -Delete all synonyms in the index. +Deletes all synonyms from the index. Required API Key ACLs: - editSettings Request can be constructed by NewApiClearSynonymsRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param indexName string - Name of the index on which to perform the operation. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) ClearSynonymsWithContext(ctx context.Context, r ApiClearSynonymsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -2275,8 +2297,7 @@ func (c *APIClient) NewApiDeleteApiKeyRequest(key string) ApiDeleteApiKeyRequest /* DeleteApiKey Wraps DeleteApiKeyWithContext using context.Background. -Delete an existing API key. -The request must be authenticated with the admin API key. +Deletes the API key. Required API Key ACLs: - admin @@ -2293,8 +2314,7 @@ func (c *APIClient) DeleteApiKey(r ApiDeleteApiKeyRequest, opts ...Option) (*Del /* DeleteApiKey -Delete an existing API key. -The request must be authenticated with the admin API key. +Deletes the API key. Required API Key ACLs: - admin @@ -2416,15 +2436,17 @@ func (c *APIClient) NewApiDeleteByRequest(indexName string, deleteByParams *Dele /* DeleteBy Wraps DeleteByWithContext using context.Background. -This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. -It doesn't accept empty filters or queries. +This operation doesn't accept empty queries or filters. + +It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), +and then delete the records using the [`batch` operation](tag/Records/operation/batch). Required API Key ACLs: - deleteIndex Request can be constructed by NewApiDeleteByRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param deleteByParams DeleteByParams @return DeletedAtResponse */ @@ -2435,15 +2457,17 @@ func (c *APIClient) DeleteBy(r ApiDeleteByRequest, opts ...Option) (*DeletedAtRe /* DeleteBy -This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. -It doesn't accept empty filters or queries. +This operation doesn't accept empty queries or filters. + +It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), +and then delete the records using the [`batch` operation](tag/Records/operation/batch). Required API Key ACLs: - deleteIndex Request can be constructed by NewApiDeleteByRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param deleteByParams DeleteByParams @return DeletedAtResponse */ @@ -2549,14 +2573,20 @@ func (c *APIClient) NewApiDeleteIndexRequest(indexName string) ApiDeleteIndexReq /* DeleteIndex Wraps DeleteIndexWithContext using context.Background. -Delete an existing index. +Deletes an index and all its settings. + + - Deleting an index doesn't delete its analytics data. + - If you try to delete a non-existing index, the operation is ignored without warning. + - If the index you want to delete has replica indices, the replicas become independent indices. + - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. + For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). Required API Key ACLs: - deleteIndex Request can be constructed by NewApiDeleteIndexRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @return DeletedAtResponse */ func (c *APIClient) DeleteIndex(r ApiDeleteIndexRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -2566,14 +2596,20 @@ func (c *APIClient) DeleteIndex(r ApiDeleteIndexRequest, opts ...Option) (*Delet /* DeleteIndex -Delete an existing index. +Deletes an index and all its settings. + + - Deleting an index doesn't delete its analytics data. + - If you try to delete a non-existing index, the operation is ignored without warning. + - If the index you want to delete has replica indices, the replicas become independent indices. + - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. + For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). Required API Key ACLs: - deleteIndex Request can be constructed by NewApiDeleteIndexRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @return DeletedAtResponse */ func (c *APIClient) DeleteIndexWithContext(ctx context.Context, r ApiDeleteIndexRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -2683,15 +2719,18 @@ func (c *APIClient) NewApiDeleteObjectRequest(indexName string, objectID string) /* DeleteObject Wraps DeleteObjectWithContext using context.Background. -To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. +Deletes a record by its object ID. + +To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). +To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). Required API Key ACLs: - deleteObject Request can be constructed by NewApiDeleteObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. @return DeletedAtResponse */ func (c *APIClient) DeleteObject(r ApiDeleteObjectRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -2701,15 +2740,18 @@ func (c *APIClient) DeleteObject(r ApiDeleteObjectRequest, opts ...Option) (*Del /* DeleteObject -To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. +Deletes a record by its object ID. + +To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). +To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). Required API Key ACLs: - deleteObject Request can be constructed by NewApiDeleteObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. @return DeletedAtResponse */ func (c *APIClient) DeleteObjectWithContext(ctx context.Context, r ApiDeleteObjectRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -2839,16 +2881,18 @@ func (r ApiDeleteRuleRequest) WithForwardToReplicas(forwardToReplicas bool) ApiD /* DeleteRule Wraps DeleteRuleWithContext using context.Background. -Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). +Deletes a rule by its ID. +To find the object ID for rules, +use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - editSettings Request can be constructed by NewApiDeleteRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a rule object. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) DeleteRule(r ApiDeleteRuleRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -2858,16 +2902,18 @@ func (c *APIClient) DeleteRule(r ApiDeleteRuleRequest, opts ...Option) (*Updated /* DeleteRule -Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). +Deletes a rule by its ID. +To find the object ID for rules, +use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - editSettings Request can be constructed by NewApiDeleteRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a rule object. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) DeleteRuleWithContext(ctx context.Context, r ApiDeleteRuleRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -2974,7 +3020,7 @@ func (c *APIClient) NewApiDeleteSourceRequest(source string) ApiDeleteSourceRequ /* DeleteSource Wraps DeleteSourceWithContext using context.Background. -Remove a source from the list of allowed sources. +Deletes a source from the list of allowed sources. Required API Key ACLs: - admin @@ -2991,7 +3037,7 @@ func (c *APIClient) DeleteSource(r ApiDeleteSourceRequest, opts ...Option) (*Del /* DeleteSource -Remove a source from the list of allowed sources. +Deletes a source from the list of allowed sources. Required API Key ACLs: - admin @@ -3124,16 +3170,17 @@ func (r ApiDeleteSynonymRequest) WithForwardToReplicas(forwardToReplicas bool) A /* DeleteSynonym Wraps DeleteSynonymWithContext using context.Background. -Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). +Deletes a synonym by its ID. +To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - editSettings Request can be constructed by NewApiDeleteSynonymRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a synonym object. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return DeletedAtResponse */ func (c *APIClient) DeleteSynonym(r ApiDeleteSynonymRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -3143,16 +3190,17 @@ func (c *APIClient) DeleteSynonym(r ApiDeleteSynonymRequest, opts ...Option) (*D /* DeleteSynonym -Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). +Deletes a synonym by its ID. +To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - editSettings Request can be constructed by NewApiDeleteSynonymRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a synonym object. - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return DeletedAtResponse */ func (c *APIClient) DeleteSynonymWithContext(ctx context.Context, r ApiDeleteSynonymRequest, opts ...Option) (*DeletedAtResponse, error) { @@ -3259,8 +3307,10 @@ func (c *APIClient) NewApiGetApiKeyRequest(key string) ApiGetApiKeyRequest { /* GetApiKey Wraps GetApiKeyWithContext using context.Background. -Get the permissions and restrictions of a specific API key. -When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. +Gets the permissions and restrictions of an API key. + +When authenticating with the admin API key, you can request information for any of your application's keys. +When authenticating with other API keys, you can only retrieve information for that key. Request can be constructed by NewApiGetApiKeyRequest with parameters below. @@ -3274,8 +3324,10 @@ func (c *APIClient) GetApiKey(r ApiGetApiKeyRequest, opts ...Option) (*GetApiKey /* GetApiKey -Get the permissions and restrictions of a specific API key. -When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. +Gets the permissions and restrictions of an API key. + +When authenticating with the admin API key, you can request information for any of your application's keys. +When authenticating with other API keys, you can only retrieve information for that key. Request can be constructed by NewApiGetApiKeyRequest with parameters below. @@ -3347,7 +3399,7 @@ func (c *APIClient) GetApiKeyWithContext(ctx context.Context, r ApiGetApiKeyRequ /* GetDictionaryLanguages Wraps GetDictionaryLanguagesWithContext using context.Background. -Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. +Lists supported languages with their supported dictionary types and number of custom entries. Required API Key ACLs: - settings @@ -3363,7 +3415,7 @@ func (c *APIClient) GetDictionaryLanguages(opts ...Option) (*map[string]Language /* GetDictionaryLanguages -Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. +Lists supported languages with their supported dictionary types and number of custom entries. Required API Key ACLs: - settings @@ -3433,7 +3485,7 @@ func (c *APIClient) GetDictionaryLanguagesWithContext(ctx context.Context, opts /* GetDictionarySettings Wraps GetDictionarySettingsWithContext using context.Background. -Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). +Retrieves the languages for which standard dictionary entries are turned off. Required API Key ACLs: - settings @@ -3449,7 +3501,7 @@ func (c *APIClient) GetDictionarySettings(opts ...Option) (*GetDictionarySetting /* GetDictionarySettings -Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). +Retrieves the languages for which standard dictionary entries are turned off. Required API Key ACLs: - settings @@ -3603,19 +3655,20 @@ func (r ApiGetLogsRequest) WithType(type_ LogType) ApiGetLogsRequest { GetLogs Wraps GetLogsWithContext using context.Background. The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). -Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. -This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. -> **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + +- Logs are held for the last seven days. +- Up to 1,000 API requests per server are logged. +- This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. Required API Key ACLs: - logs Request can be constructed by NewApiGetLogsRequest with parameters below. - @param offset int32 - First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + @param offset int32 - First log entry to retrieve. The most recent entries are listed first. @param length int32 - Maximum number of entries to retrieve. - @param indexName string - Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. - @param type_ LogType - Type of log entries to retrieve. When omitted, all log entries are retrieved. + @param indexName string - Index for which to retrieve log entries. By default, log entries are retrieved for all indices. + @param type_ LogType - Type of log entries to retrieve. By default, all log entries are retrieved. @return GetLogsResponse */ func (c *APIClient) GetLogs(r ApiGetLogsRequest, opts ...Option) (*GetLogsResponse, error) { @@ -3626,19 +3679,20 @@ func (c *APIClient) GetLogs(r ApiGetLogsRequest, opts ...Option) (*GetLogsRespon GetLogs The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). -Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. -This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. -> **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + +- Logs are held for the last seven days. +- Up to 1,000 API requests per server are logged. +- This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. Required API Key ACLs: - logs Request can be constructed by NewApiGetLogsRequest with parameters below. - @param offset int32 - First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + @param offset int32 - First log entry to retrieve. The most recent entries are listed first. @param length int32 - Maximum number of entries to retrieve. - @param indexName string - Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. - @param type_ LogType - Type of log entries to retrieve. When omitted, all log entries are retrieved. + @param indexName string - Index for which to retrieve log entries. By default, log entries are retrieved for all indices. + @param type_ LogType - Type of log entries to retrieve. By default, all log entries are retrieved. @return GetLogsResponse */ func (c *APIClient) GetLogsWithContext(ctx context.Context, r ApiGetLogsRequest, opts ...Option) (*GetLogsResponse, error) { @@ -3773,16 +3827,18 @@ func (r ApiGetObjectRequest) WithAttributesToRetrieve(attributesToRetrieve []str /* GetObject Wraps GetObjectWithContext using context.Background. -To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). +Retrieves one record by its object ID. + +To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). Required API Key ACLs: - search Request can be constructed by NewApiGetObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. - @param attributesToRetrieve []string - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. + @param attributesToRetrieve []string - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. @return map[string]string */ func (c *APIClient) GetObject(r ApiGetObjectRequest, opts ...Option) (map[string]string, error) { @@ -3792,16 +3848,18 @@ func (c *APIClient) GetObject(r ApiGetObjectRequest, opts ...Option) (map[string /* GetObject -To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). +Retrieves one record by its object ID. + +To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). Required API Key ACLs: - search Request can be constructed by NewApiGetObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. - @param attributesToRetrieve []string - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. + @param attributesToRetrieve []string - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. @return map[string]string */ func (c *APIClient) GetObjectWithContext(ctx context.Context, r ApiGetObjectRequest, opts ...Option) (map[string]string, error) { @@ -3913,7 +3971,9 @@ func (c *APIClient) NewApiGetObjectsRequest(getObjectsParams *GetObjectsParams) /* GetObjects Wraps GetObjectsWithContext using context.Background. -Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. +Retrieves one or more records, potentially from different indices. + +Records are returned in the same order as the requests. Required API Key ACLs: - search @@ -3930,7 +3990,9 @@ func (c *APIClient) GetObjects(r ApiGetObjectsRequest, opts ...Option) (*GetObje /* GetObjects -Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. +Retrieves one or more records, potentially from different indices. + +Records are returned in the same order as the requests. Required API Key ACLs: - search @@ -4049,14 +4111,15 @@ func (c *APIClient) NewApiGetRuleRequest(indexName string, objectID string) ApiG /* GetRule Wraps GetRuleWithContext using context.Background. -Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). +Retrieves a rule by its ID. +To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - settings Request can be constructed by NewApiGetRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a rule object. @return Rule */ @@ -4067,14 +4130,15 @@ func (c *APIClient) GetRule(r ApiGetRuleRequest, opts ...Option) (*Rule, error) /* GetRule -Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). +Retrieves a rule by its ID. +To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - settings Request can be constructed by NewApiGetRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a rule object. @return Rule */ @@ -4178,14 +4242,14 @@ func (c *APIClient) NewApiGetSettingsRequest(indexName string) ApiGetSettingsReq /* GetSettings Wraps GetSettingsWithContext using context.Background. -Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). +Retrieves an object with non-null index settings. Required API Key ACLs: - search Request can be constructed by NewApiGetSettingsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @return IndexSettings */ func (c *APIClient) GetSettings(r ApiGetSettingsRequest, opts ...Option) (*IndexSettings, error) { @@ -4195,14 +4259,14 @@ func (c *APIClient) GetSettings(r ApiGetSettingsRequest, opts ...Option) (*Index /* GetSettings -Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). +Retrieves an object with non-null index settings. Required API Key ACLs: - search Request can be constructed by NewApiGetSettingsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @return IndexSettings */ func (c *APIClient) GetSettingsWithContext(ctx context.Context, r ApiGetSettingsRequest, opts ...Option) (*IndexSettings, error) { @@ -4270,7 +4334,7 @@ func (c *APIClient) GetSettingsWithContext(ctx context.Context, r ApiGetSettings /* GetSources Wraps GetSourcesWithContext using context.Background. -Get all allowed sources (IP addresses). +Retrieves all allowed IP addresses with access to your application. Required API Key ACLs: - admin @@ -4286,7 +4350,7 @@ func (c *APIClient) GetSources(opts ...Option) ([]Source, error) { /* GetSources -Get all allowed sources (IP addresses). +Retrieves all allowed IP addresses with access to your application. Required API Key ACLs: - admin @@ -4398,14 +4462,16 @@ func (c *APIClient) NewApiGetSynonymRequest(indexName string, objectID string) A /* GetSynonym Wraps GetSynonymWithContext using context.Background. -Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). +Retrieves a syonym by its ID. +To find the object IDs for your synonyms, +use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - settings Request can be constructed by NewApiGetSynonymRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a synonym object. @return SynonymHit */ @@ -4416,14 +4482,16 @@ func (c *APIClient) GetSynonym(r ApiGetSynonymRequest, opts ...Option) (*Synonym /* GetSynonym -Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). +Retrieves a syonym by its ID. +To find the object IDs for your synonyms, +use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - settings Request can be constructed by NewApiGetSynonymRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a synonym object. @return SynonymHit */ @@ -4538,14 +4606,20 @@ func (c *APIClient) NewApiGetTaskRequest(indexName string, taskID int64) ApiGetT /* GetTask Wraps GetTaskWithContext using context.Background. -Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. +Checks the status of a given task. + +Indexing tasks are asynchronous. +When you add, update, or delete records or indices, +a task is created on a queue and completed depending on the load on the server. + +The indexing tasks' responses include a task ID that you can use to check the status. Required API Key ACLs: - addObject Request can be constructed by NewApiGetTaskRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param taskID int64 - Unique task identifier. @return GetTaskResponse */ @@ -4556,14 +4630,20 @@ func (c *APIClient) GetTask(r ApiGetTaskRequest, opts ...Option) (*GetTaskRespon /* GetTask -Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. +Checks the status of a given task. + +Indexing tasks are asynchronous. +When you add, update, or delete records or indices, +a task is created on a queue and completed depending on the load on the server. + +The indexing tasks' responses include a task ID that you can use to check the status. Required API Key ACLs: - addObject Request can be constructed by NewApiGetTaskRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param taskID int64 - Unique task identifier. @return GetTaskResponse */ @@ -4634,7 +4714,9 @@ func (c *APIClient) GetTaskWithContext(ctx context.Context, r ApiGetTaskRequest, GetTopUserIds Wraps GetTopUserIdsWithContext using context.Background. Get the IDs of the 10 users with the highest number of records per cluster. -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. Required API Key ACLs: - admin @@ -4651,7 +4733,9 @@ func (c *APIClient) GetTopUserIds(opts ...Option) (*GetTopUserIdsResponse, error GetTopUserIds Get the IDs of the 10 users with the highest number of records per cluster. -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. Required API Key ACLs: - admin @@ -4752,15 +4836,17 @@ func (c *APIClient) NewApiGetUserIdRequest(userID string) ApiGetUserIdRequest { /* GetUserId Wraps GetUserIdWithContext using context.Background. -Returns the userID data stored in the mapping. -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. +Returns the user ID data stored in the mapping. + +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. Required API Key ACLs: - admin Request can be constructed by NewApiGetUserIdRequest with parameters below. - @param userID string - userID to assign. + @param userID string - User ID to assign. @return UserId */ func (c *APIClient) GetUserId(r ApiGetUserIdRequest, opts ...Option) (*UserId, error) { @@ -4770,15 +4856,17 @@ func (c *APIClient) GetUserId(r ApiGetUserIdRequest, opts ...Option) (*UserId, e /* GetUserId -Returns the userID data stored in the mapping. -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. +Returns the user ID data stored in the mapping. + +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. Required API Key ACLs: - admin Request can be constructed by NewApiGetUserIdRequest with parameters below. - @param userID string - userID to assign. + @param userID string - User ID to assign. @return UserId */ func (c *APIClient) GetUserIdWithContext(ctx context.Context, r ApiGetUserIdRequest, opts ...Option) (*UserId, error) { @@ -4888,7 +4976,7 @@ Required API Key ACLs: Request can be constructed by NewApiHasPendingMappingsRequest with parameters below. - @param getClusters bool - Indicates whether to include the cluster's pending mapping state in the response. + @param getClusters bool - Whether to include the cluster's pending mapping state in the response. @return HasPendingMappingsResponse */ func (c *APIClient) HasPendingMappings(r ApiHasPendingMappingsRequest, opts ...Option) (*HasPendingMappingsResponse, error) { @@ -4905,7 +4993,7 @@ Required API Key ACLs: Request can be constructed by NewApiHasPendingMappingsRequest with parameters below. - @param getClusters bool - Indicates whether to include the cluster's pending mapping state in the response. + @param getClusters bool - Whether to include the cluster's pending mapping state in the response. @return HasPendingMappingsResponse */ func (c *APIClient) HasPendingMappingsWithContext(ctx context.Context, r ApiHasPendingMappingsRequest, opts ...Option) (*HasPendingMappingsResponse, error) { @@ -4973,7 +5061,7 @@ func (c *APIClient) HasPendingMappingsWithContext(ctx context.Context, r ApiHasP /* ListApiKeys Wraps ListApiKeysWithContext using context.Background. -List all API keys associated with your Algolia application, including their permissions and restrictions. +Lists all API keys associated with your Algolia application, including their permissions and restrictions. Required API Key ACLs: - admin @@ -4989,7 +5077,7 @@ func (c *APIClient) ListApiKeys(opts ...Option) (*ListApiKeysResponse, error) { /* ListApiKeys -List all API keys associated with your Algolia application, including their permissions and restrictions. +Lists all API keys associated with your Algolia application, including their permissions and restrictions. Required API Key ACLs: - admin @@ -5059,7 +5147,7 @@ func (c *APIClient) ListApiKeysWithContext(ctx context.Context, opts ...Option) /* ListClusters Wraps ListClustersWithContext using context.Background. -List the available clusters in a multi-cluster setup. +Lists the available clusters in a multi-cluster setup. Required API Key ACLs: - admin @@ -5075,7 +5163,7 @@ func (c *APIClient) ListClusters(opts ...Option) (*ListClustersResponse, error) /* ListClusters -List the available clusters in a multi-cluster setup. +Lists the available clusters in a multi-cluster setup. Required API Key ACLs: - admin @@ -5196,15 +5284,17 @@ func (r ApiListIndicesRequest) WithHitsPerPage(hitsPerPage int32) ApiListIndices /* ListIndices Wraps ListIndicesWithContext using context.Background. -List indices in an Algolia application. +Lists all indices in the current Algolia application. + +The request follows any index restrictions of the API key you use to make the request. Required API Key ACLs: - listIndexes Request can be constructed by NewApiListIndicesRequest with parameters below. - @param page int32 - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - @param hitsPerPage int32 - Maximum number of hits per page. + @param page int32 - Requested page of the API response. If `null`, the API response is not paginated. + @param hitsPerPage int32 - Number of hits per page. @return ListIndicesResponse */ func (c *APIClient) ListIndices(r ApiListIndicesRequest, opts ...Option) (*ListIndicesResponse, error) { @@ -5214,15 +5304,17 @@ func (c *APIClient) ListIndices(r ApiListIndicesRequest, opts ...Option) (*ListI /* ListIndices -List indices in an Algolia application. +Lists all indices in the current Algolia application. + +The request follows any index restrictions of the API key you use to make the request. Required API Key ACLs: - listIndexes Request can be constructed by NewApiListIndicesRequest with parameters below. - @param page int32 - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - @param hitsPerPage int32 - Maximum number of hits per page. + @param page int32 - Requested page of the API response. If `null`, the API response is not paginated. + @param hitsPerPage int32 - Number of hits per page. @return ListIndicesResponse */ func (c *APIClient) ListIndicesWithContext(ctx context.Context, r ApiListIndicesRequest, opts ...Option) (*ListIndicesResponse, error) { @@ -5344,16 +5436,18 @@ func (r ApiListUserIdsRequest) WithHitsPerPage(hitsPerPage int32) ApiListUserIds /* ListUserIds Wraps ListUserIdsWithContext using context.Background. -List the userIDs assigned to a multi-cluster application. -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. +Lists the userIDs assigned to a multi-cluster application. + +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. Required API Key ACLs: - admin Request can be constructed by NewApiListUserIdsRequest with parameters below. - @param page int32 - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - @param hitsPerPage int32 - Maximum number of hits per page. + @param page int32 - Requested page of the API response. If `null`, the API response is not paginated. + @param hitsPerPage int32 - Number of hits per page. @return ListUserIdsResponse */ func (c *APIClient) ListUserIds(r ApiListUserIdsRequest, opts ...Option) (*ListUserIdsResponse, error) { @@ -5363,16 +5457,18 @@ func (c *APIClient) ListUserIds(r ApiListUserIdsRequest, opts ...Option) (*ListU /* ListUserIds -List the userIDs assigned to a multi-cluster application. -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. +Lists the userIDs assigned to a multi-cluster application. + +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. Required API Key ACLs: - admin Request can be constructed by NewApiListUserIdsRequest with parameters below. - @param page int32 - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - @param hitsPerPage int32 - Maximum number of hits per page. + @param page int32 - Requested page of the API response. If `null`, the API response is not paginated. + @param hitsPerPage int32 - Number of hits per page. @return ListUserIdsResponse */ func (c *APIClient) ListUserIdsWithContext(ctx context.Context, r ApiListUserIdsRequest, opts ...Option) (*ListUserIdsResponse, error) { @@ -5479,8 +5575,10 @@ func (c *APIClient) NewApiMultipleBatchRequest(batchParams *BatchParams) ApiMult /* MultipleBatch Wraps MultipleBatchWithContext using context.Background. -To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. -The supported actions are equivalent to the individual operations of the same name. +Adds, updates, or deletes records in multiple indices with a single API request. + +- Actions are applied in the order they are specified. +- Actions are equivalent to the individual API requests of the same name. Request can be constructed by NewApiMultipleBatchRequest with parameters below. @@ -5494,8 +5592,10 @@ func (c *APIClient) MultipleBatch(r ApiMultipleBatchRequest, opts ...Option) (*M /* MultipleBatch -To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. -The supported actions are equivalent to the individual operations of the same name. +Adds, updates, or deletes records in multiple indices with a single API request. + +- Actions are applied in the order they are specified. +- Actions are equivalent to the individual API requests of the same name. Request can be constructed by NewApiMultipleBatchRequest with parameters below. @@ -5616,23 +5716,34 @@ func (c *APIClient) NewApiOperationIndexRequest(indexName string, operationIndex /* OperationIndex Wraps OperationIndexWithContext using context.Background. -This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. -If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. -If the destination index doesn't exist, it will be created. +Copies or moves (renames) an index within the same Algolia application. + +- Existing destination indices are overwritten, except for index-specific API keys and analytics data. +- If the destination index doesn't exist yet, it'll be created. -The choice between moving or copying an index depends on your needs. Choose: +**Copy** -- **Move** to rename an index. -- **Copy** to create a new index with the same records and configuration as an existing one. +- Copying a source index that doesn't exist creates a new index with 0 records and default settings. +- The API keys of the source index are merged with the existing keys in the destination index. +- You can't copy the `enableReRanking`, `mode`, and `replicas` settings. +- You can't copy to a destination index that already has replicas. +- Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). +- Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) -> **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). +**Move** + + - Moving a source index that doesn't exist is ignored without returning an error. + - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. + To access the original analytics in the dashboard, create an index with the original name. + - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. + - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). Required API Key ACLs: - addObject Request can be constructed by NewApiOperationIndexRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param operationIndexParams OperationIndexParams @return UpdatedAtResponse */ @@ -5643,23 +5754,34 @@ func (c *APIClient) OperationIndex(r ApiOperationIndexRequest, opts ...Option) ( /* OperationIndex -This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. -If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. -If the destination index doesn't exist, it will be created. +Copies or moves (renames) an index within the same Algolia application. + +- Existing destination indices are overwritten, except for index-specific API keys and analytics data. +- If the destination index doesn't exist yet, it'll be created. -The choice between moving or copying an index depends on your needs. Choose: +**Copy** -- **Move** to rename an index. -- **Copy** to create a new index with the same records and configuration as an existing one. +- Copying a source index that doesn't exist creates a new index with 0 records and default settings. +- The API keys of the source index are merged with the existing keys in the destination index. +- You can't copy the `enableReRanking`, `mode`, and `replicas` settings. +- You can't copy to a destination index that already has replicas. +- Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). +- Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) -> **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). +**Move** + + - Moving a source index that doesn't exist is ignored without returning an error. + - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. + To access the original analytics in the dashboard, create an index with the original name. + - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. + - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). Required API Key ACLs: - addObject Request can be constructed by NewApiOperationIndexRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param operationIndexParams OperationIndexParams @return UpdatedAtResponse */ @@ -5808,18 +5930,23 @@ func (r ApiPartialUpdateObjectRequest) WithCreateIfNotExists(createIfNotExists b /* PartialUpdateObject Wraps PartialUpdateObjectWithContext using context.Background. -Add new attributes or update current ones in an existing record. -You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. +Adds new attributes to a record, or update existing ones. + + - If a record with the specified object ID doesn't exist, + a new record is added to the index **if** `createIfNotExists` is true. + - If the index doesn't exist yet, this method creates a new index. + - You can use any first-level attribute but not nested attributes. + If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. Required API Key ACLs: - addObject Request can be constructed by NewApiPartialUpdateObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. - @param attributesToUpdate map[string]AttributeToUpdate - Object with attributes to update. - @param createIfNotExists bool - Indicates whether to create a new record if it doesn't exist yet. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. + @param attributesToUpdate map[string]AttributeToUpdate - Attributes with their values. + @param createIfNotExists bool - Whether to create a new record if it doesn't exist. @return UpdatedAtWithObjectIdResponse */ func (c *APIClient) PartialUpdateObject(r ApiPartialUpdateObjectRequest, opts ...Option) (*UpdatedAtWithObjectIdResponse, error) { @@ -5829,18 +5956,23 @@ func (c *APIClient) PartialUpdateObject(r ApiPartialUpdateObjectRequest, opts .. /* PartialUpdateObject -Add new attributes or update current ones in an existing record. -You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. +Adds new attributes to a record, or update existing ones. + + - If a record with the specified object ID doesn't exist, + a new record is added to the index **if** `createIfNotExists` is true. + - If the index doesn't exist yet, this method creates a new index. + - You can use any first-level attribute but not nested attributes. + If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. Required API Key ACLs: - addObject Request can be constructed by NewApiPartialUpdateObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param objectID string - Unique record (object) identifier. - @param attributesToUpdate map[string]AttributeToUpdate - Object with attributes to update. - @param createIfNotExists bool - Indicates whether to create a new record if it doesn't exist yet. + @param indexName string - Name of the index on which to perform the operation. + @param objectID string - Unique record identifier. + @param attributesToUpdate map[string]AttributeToUpdate - Attributes with their values. + @param createIfNotExists bool - Whether to create a new record if it doesn't exist. @return UpdatedAtWithObjectIdResponse */ func (c *APIClient) PartialUpdateObjectWithContext(ctx context.Context, r ApiPartialUpdateObjectRequest, opts ...Option) (*UpdatedAtWithObjectIdResponse, error) { @@ -5956,14 +6088,14 @@ func (c *APIClient) NewApiRemoveUserIdRequest(userID string) ApiRemoveUserIdRequ /* RemoveUserId Wraps RemoveUserIdWithContext using context.Background. -Remove a userID and its associated data from the multi-clusters. +Deletes a user ID and its associated data from the clusters. Required API Key ACLs: - admin Request can be constructed by NewApiRemoveUserIdRequest with parameters below. - @param userID string - userID to assign. + @param userID string - User ID to assign. @return RemoveUserIdResponse */ func (c *APIClient) RemoveUserId(r ApiRemoveUserIdRequest, opts ...Option) (*RemoveUserIdResponse, error) { @@ -5973,14 +6105,14 @@ func (c *APIClient) RemoveUserId(r ApiRemoveUserIdRequest, opts ...Option) (*Rem /* RemoveUserId -Remove a userID and its associated data from the multi-clusters. +Deletes a user ID and its associated data from the clusters. Required API Key ACLs: - admin Request can be constructed by NewApiRemoveUserIdRequest with parameters below. - @param userID string - userID to assign. + @param userID string - User ID to assign. @return RemoveUserIdResponse */ func (c *APIClient) RemoveUserIdWithContext(ctx context.Context, r ApiRemoveUserIdRequest, opts ...Option) (*RemoveUserIdResponse, error) { @@ -6084,7 +6216,7 @@ func (c *APIClient) NewApiReplaceSourcesRequest(source []Source) ApiReplaceSourc /* ReplaceSources Wraps ReplaceSourcesWithContext using context.Background. -Replace all allowed sources. +Replaces the list of allowed sources. Required API Key ACLs: - admin @@ -6101,7 +6233,7 @@ func (c *APIClient) ReplaceSources(r ApiReplaceSourcesRequest, opts ...Option) ( /* ReplaceSources -Replace all allowed sources. +Replaces the list of allowed sources. Required API Key ACLs: - admin @@ -6209,8 +6341,12 @@ func (c *APIClient) NewApiRestoreApiKeyRequest(key string) ApiRestoreApiKeyReque /* RestoreApiKey Wraps RestoreApiKeyWithContext using context.Background. -Restore a deleted API key, along with its associated permissions. -The request must be authenticated with the admin API key. +Restores a deleted API key. + +Restoring resets the `validity` attribute to `0`. + +Algolia stores up to 1,000 API keys per application. +If you create more, the oldest API keys are deleted and can't be restored. Required API Key ACLs: - admin @@ -6227,8 +6363,12 @@ func (c *APIClient) RestoreApiKey(r ApiRestoreApiKeyRequest, opts ...Option) (*A /* RestoreApiKey -Restore a deleted API key, along with its associated permissions. -The request must be authenticated with the admin API key. +Restores a deleted API key. + +Restoring resets the `validity` attribute to `0`. + +Algolia stores up to 1,000 API keys per application. +If you create more, the oldest API keys are deleted and can't be restored. Required API Key ACLs: - admin @@ -6350,18 +6490,23 @@ func (c *APIClient) NewApiSaveObjectRequest(indexName string, body map[string]in /* SaveObject Wraps SaveObjectWithContext using context.Background. -Add a record (object) to an index or replace it. -If the record doesn't contain an `objectID`, Algolia automatically adds it. -If you use an existing `objectID`, the existing record is replaced with the new one. -To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). +Adds a record to an index or replace it. + +- If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. +- If a record with the specified object ID exists, the existing record is replaced. +- If a record with the specified object ID doesn't exist, a new record is added to your index. +- If you add a record to an index that doesn't exist yet, a new index is created. + +To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). +To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject Request can be constructed by NewApiSaveObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param body map[string]interface{} - The Algolia record. + @param indexName string - Name of the index on which to perform the operation. + @param body map[string]interface{} - The record, a schemaless object with attributes that are useful in the context of search and discovery. @return SaveObjectResponse */ func (c *APIClient) SaveObject(r ApiSaveObjectRequest, opts ...Option) (*SaveObjectResponse, error) { @@ -6371,18 +6516,23 @@ func (c *APIClient) SaveObject(r ApiSaveObjectRequest, opts ...Option) (*SaveObj /* SaveObject -Add a record (object) to an index or replace it. -If the record doesn't contain an `objectID`, Algolia automatically adds it. -If you use an existing `objectID`, the existing record is replaced with the new one. -To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). +Adds a record to an index or replace it. + +- If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. +- If a record with the specified object ID exists, the existing record is replaced. +- If a record with the specified object ID doesn't exist, a new record is added to your index. +- If you add a record to an index that doesn't exist yet, a new index is created. + +To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). +To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject Request can be constructed by NewApiSaveObjectRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param body map[string]interface{} - The Algolia record. + @param indexName string - Name of the index on which to perform the operation. + @param body map[string]interface{} - The record, a schemaless object with attributes that are useful in the context of search and discovery. @return SaveObjectResponse */ func (c *APIClient) SaveObjectWithContext(ctx context.Context, r ApiSaveObjectRequest, opts ...Option) (*SaveObjectResponse, error) { @@ -6530,6 +6680,9 @@ func (r ApiSaveRuleRequest) WithForwardToReplicas(forwardToReplicas bool) ApiSav /* SaveRule Wraps SaveRuleWithContext using context.Background. +If a rule with the specified object ID doesn't exist, it's created. +Otherwise, the existing rule is replaced. + To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). Required API Key ACLs: @@ -6537,10 +6690,10 @@ Required API Key ACLs: Request can be constructed by NewApiSaveRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a rule object. @param rule Rule - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedRuleResponse */ func (c *APIClient) SaveRule(r ApiSaveRuleRequest, opts ...Option) (*UpdatedRuleResponse, error) { @@ -6550,6 +6703,9 @@ func (c *APIClient) SaveRule(r ApiSaveRuleRequest, opts ...Option) (*UpdatedRule /* SaveRule +If a rule with the specified object ID doesn't exist, it's created. +Otherwise, the existing rule is replaced. + To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). Required API Key ACLs: @@ -6557,10 +6713,10 @@ Required API Key ACLs: Request can be constructed by NewApiSaveRuleRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a rule object. @param rule Rule - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedRuleResponse */ func (c *APIClient) SaveRuleWithContext(ctx context.Context, r ApiSaveRuleRequest, opts ...Option) (*UpdatedRuleResponse, error) { @@ -6723,15 +6879,18 @@ SaveRules Wraps SaveRulesWithContext using context.Background. Create or update multiple rules. +If a rule with the specified object ID doesn't exist, Algolia creates a new one. +Otherwise, existing rules are replaced. + Required API Key ACLs: - editSettings Request can be constructed by NewApiSaveRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param rules []Rule - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. - @param clearExistingRules bool - Indicates whether existing rules should be deleted before adding this batch. + @param forwardToReplicas bool - Whether changes are applied to replica indices. + @param clearExistingRules bool - Whether existing rules should be deleted before adding this batch. @return UpdatedAtResponse */ func (c *APIClient) SaveRules(r ApiSaveRulesRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -6743,15 +6902,18 @@ SaveRules Create or update multiple rules. +If a rule with the specified object ID doesn't exist, Algolia creates a new one. +Otherwise, existing rules are replaced. + Required API Key ACLs: - editSettings Request can be constructed by NewApiSaveRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param rules []Rule - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. - @param clearExistingRules bool - Indicates whether existing rules should be deleted before adding this batch. + @param forwardToReplicas bool - Whether changes are applied to replica indices. + @param clearExistingRules bool - Whether existing rules should be deleted before adding this batch. @return UpdatedAtResponse */ func (c *APIClient) SaveRulesWithContext(ctx context.Context, r ApiSaveRulesRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -6906,9 +7068,8 @@ func (r ApiSaveSynonymRequest) WithForwardToReplicas(forwardToReplicas bool) Api /* SaveSynonym Wraps SaveSynonymWithContext using context.Background. -Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. -If the synonym `objectID` doesn't exist, Algolia adds a new one. -If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. +If a synonym with the specified object ID doesn't exist, Algolia adds a new one. +Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). Required API Key ACLs: @@ -6916,10 +7077,10 @@ Required API Key ACLs: Request can be constructed by NewApiSaveSynonymRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a synonym object. @param synonymHit SynonymHit - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return SaveSynonymResponse */ func (c *APIClient) SaveSynonym(r ApiSaveSynonymRequest, opts ...Option) (*SaveSynonymResponse, error) { @@ -6929,9 +7090,8 @@ func (c *APIClient) SaveSynonym(r ApiSaveSynonymRequest, opts ...Option) (*SaveS /* SaveSynonym -Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. -If the synonym `objectID` doesn't exist, Algolia adds a new one. -If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. +If a synonym with the specified object ID doesn't exist, Algolia adds a new one. +Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). Required API Key ACLs: @@ -6939,10 +7099,10 @@ Required API Key ACLs: Request can be constructed by NewApiSaveSynonymRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param objectID string - Unique identifier of a synonym object. @param synonymHit SynonymHit - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return SaveSynonymResponse */ func (c *APIClient) SaveSynonymWithContext(ctx context.Context, r ApiSaveSynonymRequest, opts ...Option) (*SaveSynonymResponse, error) { @@ -7103,17 +7263,18 @@ func (r ApiSaveSynonymsRequest) WithReplaceExistingSynonyms(replaceExistingSynon /* SaveSynonyms Wraps SaveSynonymsWithContext using context.Background. -Create or update multiple synonyms. +If a synonym with the `objectID` doesn't exist, Algolia adds a new one. +Otherwise, existing synonyms are replaced. Required API Key ACLs: - editSettings Request can be constructed by NewApiSaveSynonymsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param synonymHit []SynonymHit - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. - @param replaceExistingSynonyms bool - Indicates whether to replace all synonyms in the index with the ones sent with this request. + @param forwardToReplicas bool - Whether changes are applied to replica indices. + @param replaceExistingSynonyms bool - Whether to replace all synonyms in the index with the ones sent with this request. @return UpdatedAtResponse */ func (c *APIClient) SaveSynonyms(r ApiSaveSynonymsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -7123,17 +7284,18 @@ func (c *APIClient) SaveSynonyms(r ApiSaveSynonymsRequest, opts ...Option) (*Upd /* SaveSynonyms -Create or update multiple synonyms. +If a synonym with the `objectID` doesn't exist, Algolia adds a new one. +Otherwise, existing synonyms are replaced. Required API Key ACLs: - editSettings Request can be constructed by NewApiSaveSynonymsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param synonymHit []SynonymHit - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. - @param replaceExistingSynonyms bool - Indicates whether to replace all synonyms in the index with the ones sent with this request. + @param forwardToReplicas bool - Whether changes are applied to replica indices. + @param replaceExistingSynonyms bool - Whether to replace all synonyms in the index with the ones sent with this request. @return UpdatedAtResponse */ func (c *APIClient) SaveSynonymsWithContext(ctx context.Context, r ApiSaveSynonymsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -7250,14 +7412,19 @@ func (c *APIClient) NewApiSearchRequest(searchMethodParams *SearchMethodParams) /* Search Wraps SearchWithContext using context.Background. -Send multiple search queries to one or more indices. +Sends multiple search request to one or more indices. + +This can be useful in these cases: + +- Different indices for different purposes, such as, one index for products, another one for marketing content. +- Multiple searches to the same index—for example, with different filters. Required API Key ACLs: - search Request can be constructed by NewApiSearchRequest with parameters below. - @param searchMethodParams SearchMethodParams - Query requests and strategies. Results will be received in the same order as the queries. + @param searchMethodParams SearchMethodParams - Muli-search request body. Results are returned in the same order as the requests. @return SearchResponses */ func (c *APIClient) Search(r ApiSearchRequest, opts ...Option) (*SearchResponses, error) { @@ -7267,14 +7434,19 @@ func (c *APIClient) Search(r ApiSearchRequest, opts ...Option) (*SearchResponses /* Search -Send multiple search queries to one or more indices. +Sends multiple search request to one or more indices. + +This can be useful in these cases: + +- Different indices for different purposes, such as, one index for products, another one for marketing content. +- Multiple searches to the same index—for example, with different filters. Required API Key ACLs: - search Request can be constructed by NewApiSearchRequest with parameters below. - @param searchMethodParams SearchMethodParams - Query requests and strategies. Results will be received in the same order as the queries. + @param searchMethodParams SearchMethodParams - Muli-search request body. Results are returned in the same order as the requests. @return SearchResponses */ func (c *APIClient) SearchWithContext(ctx context.Context, r ApiSearchRequest, opts ...Option) (*SearchResponses, error) { @@ -7391,39 +7563,39 @@ func (c *APIClient) NewApiSearchDictionaryEntriesRequest(dictionaryName Dictiona /* SearchDictionaryEntries Wraps SearchDictionaryEntriesWithContext using context.Background. -Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. +Searches for standard and custom dictionary entries. Required API Key ACLs: - settings Request can be constructed by NewApiSearchDictionaryEntriesRequest with parameters below. - @param dictionaryName DictionaryType - Dictionary to search in. + @param dictionaryName DictionaryType - Dictionary type in which to search. @param searchDictionaryEntriesParams SearchDictionaryEntriesParams - @return UpdatedAtResponse + @return SearchDictionaryEntriesResponse */ -func (c *APIClient) SearchDictionaryEntries(r ApiSearchDictionaryEntriesRequest, opts ...Option) (*UpdatedAtResponse, error) { +func (c *APIClient) SearchDictionaryEntries(r ApiSearchDictionaryEntriesRequest, opts ...Option) (*SearchDictionaryEntriesResponse, error) { return c.SearchDictionaryEntriesWithContext(context.Background(), r, opts...) } /* SearchDictionaryEntries -Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. +Searches for standard and custom dictionary entries. Required API Key ACLs: - settings Request can be constructed by NewApiSearchDictionaryEntriesRequest with parameters below. - @param dictionaryName DictionaryType - Dictionary to search in. + @param dictionaryName DictionaryType - Dictionary type in which to search. @param searchDictionaryEntriesParams SearchDictionaryEntriesParams - @return UpdatedAtResponse + @return SearchDictionaryEntriesResponse */ -func (c *APIClient) SearchDictionaryEntriesWithContext(ctx context.Context, r ApiSearchDictionaryEntriesRequest, opts ...Option) (*UpdatedAtResponse, error) { +func (c *APIClient) SearchDictionaryEntriesWithContext(ctx context.Context, r ApiSearchDictionaryEntriesRequest, opts ...Option) (*SearchDictionaryEntriesResponse, error) { var ( postBody any - returnValue *UpdatedAtResponse + returnValue *SearchDictionaryEntriesResponse ) requestPath := "/1/dictionaries/{dictionaryName}/search" @@ -7546,16 +7718,19 @@ func (r ApiSearchForFacetValuesRequest) WithSearchForFacetValuesRequest(searchFo /* SearchForFacetValues Wraps SearchForFacetValuesWithContext using context.Background. -[Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. -> **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. +Searches for values of a specified facet attribute. + + - By default, facet values are sorted by decreasing count. + You can adjust this with the `sortFacetValueBy` parameter. + - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. Required API Key ACLs: - search Request can be constructed by NewApiSearchForFacetValuesRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param facetName string - Facet name. + @param indexName string - Name of the index on which to perform the operation. + @param facetName string - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. @param searchForFacetValuesRequest SearchForFacetValuesRequest @return SearchForFacetValuesResponse */ @@ -7566,16 +7741,19 @@ func (c *APIClient) SearchForFacetValues(r ApiSearchForFacetValuesRequest, opts /* SearchForFacetValues -[Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. -> **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. +Searches for values of a specified facet attribute. + + - By default, facet values are sorted by decreasing count. + You can adjust this with the `sortFacetValueBy` parameter. + - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. Required API Key ACLs: - search Request can be constructed by NewApiSearchForFacetValuesRequest with parameters below. - @param indexName string - Index on which to perform the request. - @param facetName string - Facet name. + @param indexName string - Name of the index on which to perform the operation. + @param facetName string - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. @param searchForFacetValuesRequest SearchForFacetValuesRequest @return SearchForFacetValuesResponse */ @@ -7701,14 +7879,14 @@ func (r ApiSearchRulesRequest) WithSearchRulesParams(searchRulesParams *SearchRu /* SearchRules Wraps SearchRulesWithContext using context.Background. -Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. +Searches for rules in your index. Required API Key ACLs: - settings Request can be constructed by NewApiSearchRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param searchRulesParams SearchRulesParams @return SearchRulesResponse */ @@ -7719,14 +7897,14 @@ func (c *APIClient) SearchRules(r ApiSearchRulesRequest, opts ...Option) (*Searc /* SearchRules -Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. +Searches for rules in your index. Required API Key ACLs: - settings Request can be constructed by NewApiSearchRulesRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param searchRulesParams SearchRulesParams @return SearchRulesResponse */ @@ -7848,14 +8026,17 @@ func (r ApiSearchSingleIndexRequest) WithSearchParams(searchParams *SearchParams /* SearchSingleIndex Wraps SearchSingleIndexWithContext using context.Background. -Return records that match the query. +Searches a single index and return matching search results (_hits_). + +This method lets you retrieve up to 1,000 hits. +If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. Required API Key ACLs: - search Request can be constructed by NewApiSearchSingleIndexRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param searchParams SearchParams @return SearchResponse */ @@ -7866,14 +8047,17 @@ func (c *APIClient) SearchSingleIndex(r ApiSearchSingleIndexRequest, opts ...Opt /* SearchSingleIndex -Return records that match the query. +Searches a single index and return matching search results (_hits_). + +This method lets you retrieve up to 1,000 hits. +If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. Required API Key ACLs: - search Request can be constructed by NewApiSearchSingleIndexRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param searchParams SearchParams @return SearchResponse */ @@ -7995,14 +8179,14 @@ func (r ApiSearchSynonymsRequest) WithSearchSynonymsParams(searchSynonymsParams /* SearchSynonyms Wraps SearchSynonymsWithContext using context.Background. -Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. +Searches for synonyms in your index. Required API Key ACLs: - settings Request can be constructed by NewApiSearchSynonymsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param searchSynonymsParams SearchSynonymsParams - Body of the `searchSynonyms` operation. @return SearchSynonymsResponse */ @@ -8013,14 +8197,14 @@ func (c *APIClient) SearchSynonyms(r ApiSearchSynonymsRequest, opts ...Option) ( /* SearchSynonyms -Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. +Searches for synonyms in your index. Required API Key ACLs: - settings Request can be constructed by NewApiSearchSynonymsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param searchSynonymsParams SearchSynonymsParams - Body of the `searchSynonyms` operation. @return SearchSynonymsResponse */ @@ -8131,7 +8315,9 @@ func (c *APIClient) NewApiSearchUserIdsRequest(searchUserIdsParams *SearchUserId /* SearchUserIds Wraps SearchUserIdsWithContext using context.Background. -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. + To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). Required API Key ACLs: @@ -8149,7 +8335,9 @@ func (c *APIClient) SearchUserIds(r ApiSearchUserIdsRequest, opts ...Option) (*S /* SearchUserIds -Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. +Since it can take a few seconds to get the data from the different clusters, +the response isn't real-time. + To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). Required API Key ACLs: @@ -8263,7 +8451,7 @@ func (c *APIClient) NewApiSetDictionarySettingsRequest(dictionarySettingsParams /* SetDictionarySettings Wraps SetDictionarySettingsWithContext using context.Background. -Set stop word settings for a specific language. +Turns standard stop word dictionary entries on or off for a given language. Required API Key ACLs: - editSettings @@ -8280,7 +8468,7 @@ func (c *APIClient) SetDictionarySettings(r ApiSetDictionarySettingsRequest, opt /* SetDictionarySettings -Set stop word settings for a specific language. +Turns standard stop word dictionary entries on or off for a given language. Required API Key ACLs: - editSettings @@ -8420,16 +8608,21 @@ func (r ApiSetSettingsRequest) WithForwardToReplicas(forwardToReplicas bool) Api /* SetSettings Wraps SetSettingsWithContext using context.Background. -Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. +Update the specified index settings. + +Index settings that you don't specify are left unchanged. +Specify `null` to reset a setting to its default value. + +For best performance, update the index settings before you add new records to your index. Required API Key ACLs: - editSettings Request can be constructed by NewApiSetSettingsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param indexSettings IndexSettings - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) SetSettings(r ApiSetSettingsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -8439,16 +8632,21 @@ func (c *APIClient) SetSettings(r ApiSetSettingsRequest, opts ...Option) (*Updat /* SetSettings -Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. +Update the specified index settings. + +Index settings that you don't specify are left unchanged. +Specify `null` to reset a setting to its default value. + +For best performance, update the index settings before you add new records to your index. Required API Key ACLs: - editSettings Request can be constructed by NewApiSetSettingsRequest with parameters below. - @param indexName string - Index on which to perform the request. + @param indexName string - Name of the index on which to perform the operation. @param indexSettings IndexSettings - @param forwardToReplicas bool - Indicates whether changed index settings are forwarded to the replica indices. + @param forwardToReplicas bool - Whether changes are applied to replica indices. @return UpdatedAtResponse */ func (c *APIClient) SetSettingsWithContext(ctx context.Context, r ApiSetSettingsRequest, opts ...Option) (*UpdatedAtResponse, error) { @@ -8573,9 +8771,9 @@ func (c *APIClient) NewApiUpdateApiKeyRequest(key string, apiKey *ApiKey) ApiUpd /* UpdateApiKey Wraps UpdateApiKeyWithContext using context.Background. -Replace the permissions of an existing API key. -Any unspecified parameter resets that permission to its default value. -The request must be authenticated with the admin API key. +Replaces the permissions of an existing API key. + +Any unspecified attribute resets that attribute to its default value. Required API Key ACLs: - admin @@ -8593,9 +8791,9 @@ func (c *APIClient) UpdateApiKey(r ApiUpdateApiKeyRequest, opts ...Option) (*Upd /* UpdateApiKey -Replace the permissions of an existing API key. -Any unspecified parameter resets that permission to its default value. -The request must be authenticated with the admin API key. +Replaces the permissions of an existing API key. + +Any unspecified attribute resets that attribute to its default value. Required API Key ACLs: - admin diff --git a/clients/algoliasearch-client-go/algolia/search/model_acl.go b/clients/algoliasearch-client-go/algolia/search/model_acl.go index 6241cea671..7eb2574ed5 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_acl.go +++ b/clients/algoliasearch-client-go/algolia/search/model_acl.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Acl API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. +// Acl Access control list permissions. type Acl string // List of acl. diff --git a/clients/algoliasearch-client-go/algolia/search/model_action.go b/clients/algoliasearch-client-go/algolia/search/model_action.go index eb785b47e6..f9c85a17d7 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_action.go +++ b/clients/algoliasearch-client-go/algolia/search/model_action.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Action Type of batch operation. +// Action Type of indexing operation. type Action string // List of action. diff --git a/clients/algoliasearch-client-go/algolia/search/model_add_api_key_response.go b/clients/algoliasearch-client-go/algolia/search/model_add_api_key_response.go index 649b642408..72496b9d8d 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_add_api_key_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_add_api_key_response.go @@ -10,7 +10,7 @@ import ( type AddApiKeyResponse struct { // API key. Key string `json:"key"` - // Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + // Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. CreatedAt string `json:"createdAt"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_anchoring.go b/clients/algoliasearch-client-go/algolia/search/model_anchoring.go index 5ecca1473b..4773182a2f 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_anchoring.go +++ b/clients/algoliasearch-client-go/algolia/search/model_anchoring.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Anchoring Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). +// Anchoring Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. type Anchoring string // List of anchoring. diff --git a/clients/algoliasearch-client-go/algolia/search/model_api_key.go b/clients/algoliasearch-client-go/algolia/search/model_api_key.go index 7e9ba2fa0f..a7b15a2142 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_api_key.go +++ b/clients/algoliasearch-client-go/algolia/search/model_api_key.go @@ -8,21 +8,21 @@ import ( // ApiKey API key object. type ApiKey struct { - // [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + // Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Acl []Acl `json:"acl"` - // Description of an API key for you and your team members. + // Description of an API key to help you identify this API key. Description *string `json:"description,omitempty"` - // Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + // Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". Indexes []string `json:"indexes,omitempty"` - // Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + // Maximum number of results this API key can retrieve in one query. By default, there's no limit. MaxHitsPerQuery *int32 `json:"maxHitsPerQuery,omitempty"` - // Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + // Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. MaxQueriesPerIPPerHour *int32 `json:"maxQueriesPerIPPerHour,omitempty"` - // Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + // Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. QueryParameters *string `json:"queryParameters,omitempty"` - // Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + // Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). Referers []string `json:"referers,omitempty"` - // Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + // Duration (in seconds) after which the API key expires. By default, API keys don't expire. Validity *int32 `json:"validity,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_around_precision.go b/clients/algoliasearch-client-go/algolia/search/model_around_precision.go index 50ef51487a..e84126e7e5 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_around_precision.go +++ b/clients/algoliasearch-client-go/algolia/search/model_around_precision.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AroundPrecision - Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +// AroundPrecision - Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. type AroundPrecision struct { ArrayOfAroundPrecisionFromValueInner *[]AroundPrecisionFromValueInner Int32 *int32 diff --git a/clients/algoliasearch-client-go/algolia/search/model_around_precision_from_value_inner.go b/clients/algoliasearch-client-go/algolia/search/model_around_precision_from_value_inner.go index 3a0b0f65cb..aa8f054e93 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_around_precision_from_value_inner.go +++ b/clients/algoliasearch-client-go/algolia/search/model_around_precision_from_value_inner.go @@ -6,9 +6,11 @@ import ( "fmt" ) -// AroundPrecisionFromValueInner struct for AroundPrecisionFromValueInner. +// AroundPrecisionFromValueInner Range object with lower and upper values in meters to define custom ranges. type AroundPrecisionFromValueInner struct { - From *int32 `json:"from,omitempty"` + // Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + From *int32 `json:"from,omitempty"` + // Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. Value *int32 `json:"value,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_around_radius.go b/clients/algoliasearch-client-go/algolia/search/model_around_radius.go index 979f168baa..ba36f8d485 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_around_radius.go +++ b/clients/algoliasearch-client-go/algolia/search/model_around_radius.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AroundRadius - [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). +// AroundRadius - Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. type AroundRadius struct { AroundRadiusAll *AroundRadiusAll Int32 *int32 diff --git a/clients/algoliasearch-client-go/algolia/search/model_around_radius_all.go b/clients/algoliasearch-client-go/algolia/search/model_around_radius_all.go index a255c6599c..2fc13c2157 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_around_radius_all.go +++ b/clients/algoliasearch-client-go/algolia/search/model_around_radius_all.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AroundRadiusAll the model 'AroundRadiusAll'. +// AroundRadiusAll Return all records with a valid `_geoloc` attribute. Don't filter by distance. type AroundRadiusAll string // List of aroundRadiusAll. diff --git a/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filter.go b/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filter.go index 41378c73f7..7c2c2ca1ff 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filter.go +++ b/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filter.go @@ -6,13 +6,13 @@ import ( "fmt" ) -// AutomaticFacetFilter Automatic facet Filter. +// AutomaticFacetFilter Filter or optional filter to be applied to the search. type AutomaticFacetFilter struct { - // Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + // Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. Facet string `json:"facet"` - // Score for the filter. Typically used for optional or disjunctive filters. + // Filter scores to give different weights to individual filters. Score *int32 `json:"score,omitempty"` - // Whether the filter is disjunctive (true) or conjunctive (false). + // Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurrences are combined with the logical `OR` operation. If false, multiple occurrences are combined with the logical `AND` operation. Disjunctive *bool `json:"disjunctive,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filters.go b/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filters.go index 75a077f5bb..4891ed38ff 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filters.go +++ b/clients/algoliasearch-client-go/algolia/search/model_automatic_facet_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// AutomaticFacetFilters - Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. +// AutomaticFacetFilters - Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. type AutomaticFacetFilters struct { ArrayOfAutomaticFacetFilter *[]AutomaticFacetFilter ArrayOfString *[]string diff --git a/clients/algoliasearch-client-go/algolia/search/model_base_index_settings.go b/clients/algoliasearch-client-go/algolia/search/model_base_index_settings.go index 42aef3bba4..ce7add1c0c 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_base_index_settings.go +++ b/clients/algoliasearch-client-go/algolia/search/model_base_index_settings.go @@ -8,42 +8,50 @@ import ( // BaseIndexSettings struct for BaseIndexSettings. type BaseIndexSettings struct { - // Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` + // Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). Replicas []string `json:"replicas,omitempty"` - // Maximum number of hits accessible through pagination. + // Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. PaginationLimitedTo *int32 `json:"paginationLimitedTo,omitempty"` - // Attributes that can't be retrieved at query time. + // Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. UnretrievableAttributes []string `json:"unretrievableAttributes,omitempty"` - // Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. DisableTypoToleranceOnWords []string `json:"disableTypoToleranceOnWords,omitempty"` - // Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + // Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. AttributesToTransliterate []string `json:"attributesToTransliterate,omitempty"` - // Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + // Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. CamelCaseAttributes []string `json:"camelCaseAttributes,omitempty"` - // Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + // Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). DecompoundedAttributes map[string]interface{} `json:"decompoundedAttributes,omitempty"` - // Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). IndexLanguages []string `json:"indexLanguages,omitempty"` - // Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + // Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). DisablePrefixOnAttributes []string `json:"disablePrefixOnAttributes,omitempty"` - // Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + // Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. AllowCompressionOfIntegerArray *bool `json:"allowCompressionOfIntegerArray,omitempty"` - // Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + // Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. NumericAttributesForFiltering []string `json:"numericAttributesForFiltering,omitempty"` - // Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + // Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. SeparatorsToIndex *string `json:"separatorsToIndex,omitempty"` - // [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + // Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higher than matches at the end. SearchableAttributes []string `json:"searchableAttributes,omitempty"` - // Lets you store custom data in your indices. + // An object with custom data. You can store up to 32 kB as custom data. UserData interface{} `json:"userData,omitempty"` - // A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). CustomNormalization *map[string]map[string]string `json:"customNormalization,omitempty"` - // Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + // Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. AttributeForDistinct *string `json:"attributeForDistinct,omitempty"` } type BaseIndexSettingsOption func(f *BaseIndexSettings) +func WithBaseIndexSettingsAttributesForFaceting(val []string) BaseIndexSettingsOption { + return func(f *BaseIndexSettings) { + f.AttributesForFaceting = val + } +} + func WithBaseIndexSettingsReplicas(val []string) BaseIndexSettingsOption { return func(f *BaseIndexSettings) { f.Replicas = val @@ -157,6 +165,39 @@ func NewEmptyBaseIndexSettings() *BaseIndexSettings { return &BaseIndexSettings{} } +// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. +func (o *BaseIndexSettings) GetAttributesForFaceting() []string { + if o == nil || o.AttributesForFaceting == nil { + var ret []string + return ret + } + return o.AttributesForFaceting +} + +// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseIndexSettings) GetAttributesForFacetingOk() ([]string, bool) { + if o == nil || o.AttributesForFaceting == nil { + return nil, false + } + return o.AttributesForFaceting, true +} + +// HasAttributesForFaceting returns a boolean if a field has been set. +func (o *BaseIndexSettings) HasAttributesForFaceting() bool { + if o != nil && o.AttributesForFaceting != nil { + return true + } + + return false +} + +// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. +func (o *BaseIndexSettings) SetAttributesForFaceting(v []string) *BaseIndexSettings { + o.AttributesForFaceting = v + return o +} + // GetReplicas returns the Replicas field value if set, zero value otherwise. func (o *BaseIndexSettings) GetReplicas() []string { if o == nil || o.Replicas == nil { @@ -688,6 +729,9 @@ func (o *BaseIndexSettings) SetAttributeForDistinct(v string) *BaseIndexSettings func (o BaseIndexSettings) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} + if o.AttributesForFaceting != nil { + toSerialize["attributesForFaceting"] = o.AttributesForFaceting + } if o.Replicas != nil { toSerialize["replicas"] = o.Replicas } @@ -746,6 +790,7 @@ func (o BaseIndexSettings) MarshalJSON() ([]byte, error) { func (o BaseIndexSettings) String() string { out := "" + out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" replicas=%v\n", o.Replicas) out += fmt.Sprintf(" paginationLimitedTo=%v\n", o.PaginationLimitedTo) out += fmt.Sprintf(" unretrievableAttributes=%v\n", o.UnretrievableAttributes) diff --git a/clients/algoliasearch-client-go/algolia/search/model_base_search_params.go b/clients/algoliasearch-client-go/algolia/search/model_base_search_params.go index a6b4364679..8f3cbe8cc0 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_base_search_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_base_search_params.go @@ -8,65 +8,63 @@ import ( // BaseSearchParams struct for BaseSearchParams. type BaseSearchParams struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` } @@ -228,12 +226,6 @@ func WithBaseSearchParamsGetRankingInfo(val bool) BaseSearchParamsOption { } } -func WithBaseSearchParamsExplain(val []string) BaseSearchParamsOption { - return func(f *BaseSearchParams) { - f.Explain = val - } -} - func WithBaseSearchParamsSynonyms(val bool) BaseSearchParamsOption { return func(f *BaseSearchParams) { f.Synonyms = &val @@ -1145,39 +1137,6 @@ func (o *BaseSearchParams) SetGetRankingInfo(v bool) *BaseSearchParams { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *BaseSearchParams) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseSearchParams) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *BaseSearchParams) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *BaseSearchParams) SetExplain(v []string) *BaseSearchParams { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *BaseSearchParams) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1456,9 +1415,6 @@ func (o BaseSearchParams) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -1513,7 +1469,6 @@ func (o BaseSearchParams) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) diff --git a/clients/algoliasearch-client-go/algolia/search/model_base_search_params_without_query.go b/clients/algoliasearch-client-go/algolia/search/model_base_search_params_without_query.go index a0592cef16..ed1021c4f8 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_base_search_params_without_query.go +++ b/clients/algoliasearch-client-go/algolia/search/model_base_search_params_without_query.go @@ -8,63 +8,61 @@ import ( // BaseSearchParamsWithoutQuery struct for BaseSearchParamsWithoutQuery. type BaseSearchParamsWithoutQuery struct { - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` } @@ -220,12 +218,6 @@ func WithBaseSearchParamsWithoutQueryGetRankingInfo(val bool) BaseSearchParamsWi } } -func WithBaseSearchParamsWithoutQueryExplain(val []string) BaseSearchParamsWithoutQueryOption { - return func(f *BaseSearchParamsWithoutQuery) { - f.Explain = val - } -} - func WithBaseSearchParamsWithoutQuerySynonyms(val bool) BaseSearchParamsWithoutQueryOption { return func(f *BaseSearchParamsWithoutQuery) { f.Synonyms = &val @@ -1104,39 +1096,6 @@ func (o *BaseSearchParamsWithoutQuery) SetGetRankingInfo(v bool) *BaseSearchPara return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *BaseSearchParamsWithoutQuery) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseSearchParamsWithoutQuery) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *BaseSearchParamsWithoutQuery) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *BaseSearchParamsWithoutQuery) SetExplain(v []string) *BaseSearchParamsWithoutQuery { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *BaseSearchParamsWithoutQuery) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1412,9 +1371,6 @@ func (o BaseSearchParamsWithoutQuery) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -1468,7 +1424,6 @@ func (o BaseSearchParamsWithoutQuery) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) diff --git a/clients/algoliasearch-client-go/algolia/search/model_base_search_response.go b/clients/algoliasearch-client-go/algolia/search/model_base_search_response.go index 8213eac830..190d4b09cf 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_base_search_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_base_search_response.go @@ -14,7 +14,7 @@ type BaseSearchResponse struct { AbTestVariantID *int32 `json:"abTestVariantID,omitempty"` // Computed geographical location. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Automatically-computed radius. + // Distance from a central coordinate provided by `aroundLatLng`. AutomaticRadius *string `json:"automaticRadius,omitempty"` Exhaustive *Exhaustive `json:"exhaustive,omitempty"` // See the `facetsCount` field of the `exhaustive` object in the response. @@ -26,7 +26,7 @@ type BaseSearchResponse struct { // See the `typo` field of the `exhaustive` object in the response. // Deprecated ExhaustiveTypo *bool `json:"exhaustiveTypo,omitempty"` - // Mapping of each facet name to the corresponding facet counts. + // Facet counts. Facets *map[string]map[string]int32 `json:"facets,omitempty"` // Statistics for numerical facets. FacetsStats *map[string]FacetsStats `json:"facets_stats,omitempty"` @@ -38,13 +38,13 @@ type BaseSearchResponse struct { IndexUsed *string `json:"indexUsed,omitempty"` // Warnings about the query. Message *string `json:"message,omitempty"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` - // Number of pages of results for the current query. + // Number of pages of results. NbPages int32 `json:"nbPages"` // Number of hits selected and sorted by the relevant sort algorithm. NbSortedHits *int32 `json:"nbSortedHits,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page int32 `json:"page"` // 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. ParsedQuery *string `json:"parsedQuery,omitempty"` @@ -60,7 +60,7 @@ type BaseSearchResponse struct { ServerTimeMS *int32 `json:"serverTimeMS,omitempty"` // Host name of the server that processed the request. ServerUsed *string `json:"serverUsed,omitempty"` - // Lets you store custom data in your indices. + // An object with custom data. You can store up to 32 kB as custom data. UserData interface{} `json:"userData,omitempty"` // Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). QueryID *string `json:"queryID,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_batch_dictionary_entries_params.go b/clients/algoliasearch-client-go/algolia/search/model_batch_dictionary_entries_params.go index 210563d038..527d66e0cb 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_batch_dictionary_entries_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_batch_dictionary_entries_params.go @@ -6,11 +6,11 @@ import ( "fmt" ) -// BatchDictionaryEntriesParams `batchDictionaryEntries` parameters. +// BatchDictionaryEntriesParams Request body for updating dictionary entries. type BatchDictionaryEntriesParams struct { - // Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + // Whether to replace all custom entries in the dictionary with the ones sent with this request. ClearExistingDictionaryEntries *bool `json:"clearExistingDictionaryEntries,omitempty"` - // Operations to batch. + // List of additions and deletions to your dictionaries. Requests []BatchDictionaryEntriesRequest `json:"requests"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_batch_response.go b/clients/algoliasearch-client-go/algolia/search/model_batch_response.go index 88e6c9aeff..b599615c5e 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_batch_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_batch_response.go @@ -8,9 +8,9 @@ import ( // BatchResponse struct for BatchResponse. type BatchResponse struct { - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` - // Unique object (record) identifiers. + // Unique record identifiers. ObjectIDs []string `json:"objectIDs"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go b/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go index 990568f167..eca4cac9c6 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go +++ b/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go @@ -8,146 +8,142 @@ import ( // BrowseParamsObject struct for BrowseParamsObject. type BrowseParamsObject struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` - // Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + // Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. Cursor *string `json:"cursor,omitempty"` } @@ -309,12 +305,6 @@ func WithBrowseParamsObjectGetRankingInfo(val bool) BrowseParamsObjectOption { } } -func WithBrowseParamsObjectExplain(val []string) BrowseParamsObjectOption { - return func(f *BrowseParamsObject) { - f.Explain = val - } -} - func WithBrowseParamsObjectSynonyms(val bool) BrowseParamsObjectOption { return func(f *BrowseParamsObject) { f.Synonyms = &val @@ -351,12 +341,6 @@ func WithBrowseParamsObjectEnableABTest(val bool) BrowseParamsObjectOption { } } -func WithBrowseParamsObjectAttributesForFaceting(val []string) BrowseParamsObjectOption { - return func(f *BrowseParamsObject) { - f.AttributesForFaceting = val - } -} - func WithBrowseParamsObjectAttributesToRetrieve(val []string) BrowseParamsObjectOption { return func(f *BrowseParamsObject) { f.AttributesToRetrieve = val @@ -1502,39 +1486,6 @@ func (o *BrowseParamsObject) SetGetRankingInfo(v bool) *BrowseParamsObject { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *BrowseParamsObject) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BrowseParamsObject) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *BrowseParamsObject) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *BrowseParamsObject) SetExplain(v []string) *BrowseParamsObject { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *BrowseParamsObject) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1733,39 +1684,6 @@ func (o *BrowseParamsObject) SetEnableABTest(v bool) *BrowseParamsObject { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *BrowseParamsObject) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BrowseParamsObject) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *BrowseParamsObject) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *BrowseParamsObject) SetAttributesForFaceting(v []string) *BrowseParamsObject { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *BrowseParamsObject) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3342,9 +3260,6 @@ func (o BrowseParamsObject) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3363,9 +3278,6 @@ func (o BrowseParamsObject) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3537,14 +3449,12 @@ func (o BrowseParamsObject) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/search/model_browse_response.go b/clients/algoliasearch-client-go/algolia/search/model_browse_response.go index 7103613ec4..dea5e1585e 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_browse_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_browse_response.go @@ -14,7 +14,7 @@ type BrowseResponse struct { AbTestVariantID *int32 `json:"abTestVariantID,omitempty"` // Computed geographical location. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Automatically-computed radius. + // Distance from a central coordinate provided by `aroundLatLng`. AutomaticRadius *string `json:"automaticRadius,omitempty"` Exhaustive *Exhaustive `json:"exhaustive,omitempty"` // See the `facetsCount` field of the `exhaustive` object in the response. @@ -26,7 +26,7 @@ type BrowseResponse struct { // See the `typo` field of the `exhaustive` object in the response. // Deprecated ExhaustiveTypo *bool `json:"exhaustiveTypo,omitempty"` - // Mapping of each facet name to the corresponding facet counts. + // Facet counts. Facets *map[string]map[string]int32 `json:"facets,omitempty"` // Statistics for numerical facets. FacetsStats *map[string]FacetsStats `json:"facets_stats,omitempty"` @@ -38,13 +38,13 @@ type BrowseResponse struct { IndexUsed *string `json:"indexUsed,omitempty"` // Warnings about the query. Message *string `json:"message,omitempty"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` - // Number of pages of results for the current query. + // Number of pages of results. NbPages int32 `json:"nbPages"` // Number of hits selected and sorted by the relevant sort algorithm. NbSortedHits *int32 `json:"nbSortedHits,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page int32 `json:"page"` // 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. ParsedQuery *string `json:"parsedQuery,omitempty"` @@ -60,16 +60,17 @@ type BrowseResponse struct { ServerTimeMS *int32 `json:"serverTimeMS,omitempty"` // Host name of the server that processed the request. ServerUsed *string `json:"serverUsed,omitempty"` - // Lets you store custom data in your indices. + // An object with custom data. You can store up to 32 kB as custom data. UserData map[string]interface{} `json:"userData,omitempty"` // Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). QueryID *string `json:"queryID,omitempty"` - Hits []Hit `json:"hits"` - // Text to search for in an index. + // Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. + Hits []Hit `json:"hits"` + // Search query. Query string `json:"query"` // URL-encoded string of all search parameters. Params string `json:"params"` - // Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + // Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. Cursor *string `json:"cursor,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_built_in_operation.go b/clients/algoliasearch-client-go/algolia/search/model_built_in_operation.go index 7e95b47e8b..2da12e9032 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_built_in_operation.go +++ b/clients/algoliasearch-client-go/algolia/search/model_built_in_operation.go @@ -6,10 +6,10 @@ import ( "fmt" ) -// BuiltInOperation To update an attribute without pushing the entire record, you can use these built-in operations. +// BuiltInOperation Update to perform on the attribute. type BuiltInOperation struct { Operation BuiltInOperationType `json:"_operation"` - // Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + // Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. Value string `json:"value"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_built_in_operation_type.go b/clients/algoliasearch-client-go/algolia/search/model_built_in_operation_type.go index 4bb018210a..04143d9e48 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_built_in_operation_type.go +++ b/clients/algoliasearch-client-go/algolia/search/model_built_in_operation_type.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// BuiltInOperationType Operation to apply to the attribute. +// BuiltInOperationType How to change the attribute. type BuiltInOperationType string // List of builtInOperationType. diff --git a/clients/algoliasearch-client-go/algolia/search/model_condition.go b/clients/algoliasearch-client-go/algolia/search/model_condition.go index 376fb8c13d..dd46dca522 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_condition.go +++ b/clients/algoliasearch-client-go/algolia/search/model_condition.go @@ -8,13 +8,15 @@ import ( // Condition struct for Condition. type Condition struct { - // Query pattern syntax. + // Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". Pattern *string `json:"pattern,omitempty"` Anchoring *Anchoring `json:"anchoring,omitempty"` - // Whether the pattern matches on plurals, synonyms, and typos. + // Whether the pattern should match plurals, synonyms, and typos. Alternatives *bool `json:"alternatives,omitempty"` - // Rule context format: [A-Za-z0-9_-]+). + // An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. Context *string `json:"context,omitempty"` + // Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + Filters *string `json:"filters,omitempty"` } type ConditionOption func(f *Condition) @@ -43,6 +45,12 @@ func WithConditionContext(val string) ConditionOption { } } +func WithConditionFilters(val string) ConditionOption { + return func(f *Condition) { + f.Filters = &val + } +} + // NewCondition instantiates a new Condition object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -192,6 +200,39 @@ func (o *Condition) SetContext(v string) *Condition { return o } +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *Condition) GetFilters() string { + if o == nil || o.Filters == nil { + var ret string + return ret + } + return *o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Condition) GetFiltersOk() (*string, bool) { + if o == nil || o.Filters == nil { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *Condition) HasFilters() bool { + if o != nil && o.Filters != nil { + return true + } + + return false +} + +// SetFilters gets a reference to the given string and assigns it to the Filters field. +func (o *Condition) SetFilters(v string) *Condition { + o.Filters = &v + return o +} + func (o Condition) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Pattern != nil { @@ -206,6 +247,9 @@ func (o Condition) MarshalJSON() ([]byte, error) { if o.Context != nil { toSerialize["context"] = o.Context } + if o.Filters != nil { + toSerialize["filters"] = o.Filters + } serialized, err := json.Marshal(toSerialize) if err != nil { return nil, fmt.Errorf("failed to marshal Condition: %w", err) @@ -220,6 +264,7 @@ func (o Condition) String() string { out += fmt.Sprintf(" anchoring=%v\n", o.Anchoring) out += fmt.Sprintf(" alternatives=%v\n", o.Alternatives) out += fmt.Sprintf(" context=%v\n", o.Context) + out += fmt.Sprintf(" filters=%v\n", o.Filters) return fmt.Sprintf("Condition {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/search/model_consequence.go b/clients/algoliasearch-client-go/algolia/search/model_consequence.go index 8da3dc7b8d..395b568532 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_consequence.go +++ b/clients/algoliasearch-client-go/algolia/search/model_consequence.go @@ -6,16 +6,16 @@ import ( "fmt" ) -// Consequence [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +// Consequence Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). type Consequence struct { Params *ConsequenceParams `json:"params,omitempty"` - // Records to promote. + // Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. Promote []Promote `json:"promote,omitempty"` - // Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + // Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precedence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. FilterPromotes *bool `json:"filterPromotes,omitempty"` - // Records to hide. By default, you can hide up to 50 records per rule. + // Records you want to hide from the search results. Hide []ConsequenceHide `json:"hide,omitempty"` - // Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + // A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. UserData interface{} `json:"userData,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_consequence_hide.go b/clients/algoliasearch-client-go/algolia/search/model_consequence_hide.go index 9e2344b432..25ff37cc46 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_consequence_hide.go +++ b/clients/algoliasearch-client-go/algolia/search/model_consequence_hide.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// ConsequenceHide Unique identifier of the record to hide. +// ConsequenceHide Object ID of the record to hide. type ConsequenceHide struct { - // Unique object identifier. + // Unique record identifier. ObjectID string `json:"objectID"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go b/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go index 8303b3053b..b27e4294e9 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go @@ -8,141 +8,137 @@ import ( // ConsequenceParams struct for ConsequenceParams. type ConsequenceParams struct { - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` Query *ConsequenceQuery `json:"query,omitempty"` @@ -302,12 +298,6 @@ func WithConsequenceParamsGetRankingInfo(val bool) ConsequenceParamsOption { } } -func WithConsequenceParamsExplain(val []string) ConsequenceParamsOption { - return func(f *ConsequenceParams) { - f.Explain = val - } -} - func WithConsequenceParamsSynonyms(val bool) ConsequenceParamsOption { return func(f *ConsequenceParams) { f.Synonyms = &val @@ -344,12 +334,6 @@ func WithConsequenceParamsEnableABTest(val bool) ConsequenceParamsOption { } } -func WithConsequenceParamsAttributesForFaceting(val []string) ConsequenceParamsOption { - return func(f *ConsequenceParams) { - f.AttributesForFaceting = val - } -} - func WithConsequenceParamsAttributesToRetrieve(val []string) ConsequenceParamsOption { return func(f *ConsequenceParams) { f.AttributesToRetrieve = val @@ -1474,39 +1458,6 @@ func (o *ConsequenceParams) SetGetRankingInfo(v bool) *ConsequenceParams { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *ConsequenceParams) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsequenceParams) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *ConsequenceParams) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *ConsequenceParams) SetExplain(v []string) *ConsequenceParams { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *ConsequenceParams) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1705,39 +1656,6 @@ func (o *ConsequenceParams) SetEnableABTest(v bool) *ConsequenceParams { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *ConsequenceParams) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsequenceParams) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *ConsequenceParams) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *ConsequenceParams) SetAttributesForFaceting(v []string) *ConsequenceParams { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *ConsequenceParams) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3377,9 +3295,6 @@ func (o ConsequenceParams) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3398,9 +3313,6 @@ func (o ConsequenceParams) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3577,14 +3489,12 @@ func (o ConsequenceParams) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/search/model_consequence_query.go b/clients/algoliasearch-client-go/algolia/search/model_consequence_query.go index 36d1ad543d..b02b76d38c 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_consequence_query.go +++ b/clients/algoliasearch-client-go/algolia/search/model_consequence_query.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// ConsequenceQuery - When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). +// ConsequenceQuery - Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. type ConsequenceQuery struct { ConsequenceQueryObject *ConsequenceQueryObject String *string diff --git a/clients/algoliasearch-client-go/algolia/search/model_consequence_query_object.go b/clients/algoliasearch-client-go/algolia/search/model_consequence_query_object.go index 7f562b08be..d60e06196d 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_consequence_query_object.go +++ b/clients/algoliasearch-client-go/algolia/search/model_consequence_query_object.go @@ -8,9 +8,9 @@ import ( // ConsequenceQueryObject struct for ConsequenceQueryObject. type ConsequenceQueryObject struct { - // Words to remove. + // Words to remove from the search query. Remove []string `json:"remove,omitempty"` - // Edits to apply. + // Changes to make to the search query. Edits []Edit `json:"edits,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_created_at_response.go b/clients/algoliasearch-client-go/algolia/search/model_created_at_response.go index 4298b1bee3..9136566bca 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_created_at_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_created_at_response.go @@ -8,7 +8,7 @@ import ( // CreatedAtResponse Response and creation timestamp. type CreatedAtResponse struct { - // Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + // Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. CreatedAt string `json:"createdAt"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_cursor.go b/clients/algoliasearch-client-go/algolia/search/model_cursor.go index e6ed067642..aeb0e40232 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_cursor.go +++ b/clients/algoliasearch-client-go/algolia/search/model_cursor.go @@ -8,7 +8,7 @@ import ( // Cursor struct for Cursor. type Cursor struct { - // Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + // Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. Cursor *string `json:"cursor,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_delete_by_params.go b/clients/algoliasearch-client-go/algolia/search/model_delete_by_params.go index 4f673580c4..712643a60f 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_delete_by_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_delete_by_params.go @@ -9,16 +9,16 @@ import ( // DeleteByParams struct for DeleteByParams. type DeleteByParams struct { FacetFilters *FacetFilters `json:"facetFilters,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_deleted_at_response.go b/clients/algoliasearch-client-go/algolia/search/model_deleted_at_response.go index 5813c3a005..d8f546bf9a 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_deleted_at_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_deleted_at_response.go @@ -8,7 +8,7 @@ import ( // DeletedAtResponse Response, taskID, and deletion timestamp. type DeletedAtResponse struct { - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` // Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. DeletedAt string `json:"deletedAt"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry.go b/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry.go index ced6c399ca..2678a7f5b5 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry.go +++ b/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry.go @@ -8,15 +8,15 @@ import ( // DictionaryEntry Dictionary entry. type DictionaryEntry struct { - // Unique identifier for a dictionary object. + // Unique identifier for the dictionary entry. ObjectID string `json:"objectID"` - // [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + // ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). Language string `json:"language"` - // Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + // Matching dictionary word for `stopwords` and `compounds` dictionaries. Word *string `json:"word,omitempty"` - // Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + // Matching words in the `plurals` dictionary including declensions. Words []string `json:"words,omitempty"` - // For compound entries, governs the behavior of the `word` parameter. + // Invividual components of a compound word in the `compounds` dictionary. Decomposition []string `json:"decomposition,omitempty"` State *DictionaryEntryState `json:"state,omitempty"` AdditionalProperties map[string]any diff --git a/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry_state.go b/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry_state.go index 9349fd042e..0ebe4600fd 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry_state.go +++ b/clients/algoliasearch-client-go/algolia/search/model_dictionary_entry_state.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// DictionaryEntryState Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). +// DictionaryEntryState Whether a dictionary entry is active. type DictionaryEntryState string // List of dictionaryEntryState. diff --git a/clients/algoliasearch-client-go/algolia/search/model_dictionary_language.go b/clients/algoliasearch-client-go/algolia/search/model_dictionary_language.go index 9174603e40..eccb45b6d5 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_dictionary_language.go +++ b/clients/algoliasearch-client-go/algolia/search/model_dictionary_language.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// DictionaryLanguage Custom entries for a dictionary. +// DictionaryLanguage Dictionary type. If `null`, this dictionary type isn't supported for the language. type DictionaryLanguage struct { - // If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + // Number of custom dictionary entries. NbCustomEntries *int32 `json:"nbCustomEntries,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_dictionary_settings_params.go b/clients/algoliasearch-client-go/algolia/search/model_dictionary_settings_params.go index 449deea46b..71050187f0 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_dictionary_settings_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_dictionary_settings_params.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// DictionarySettingsParams Enable or turn off the built-in Algolia stop words for a specific language. +// DictionarySettingsParams Turn on or off the built-in Algolia stop words for a specific language. type DictionarySettingsParams struct { DisableStandardEntries StandardEntries `json:"disableStandardEntries"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_distinct.go b/clients/algoliasearch-client-go/algolia/search/model_distinct.go index 27e3ed279c..d1dbf62787 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_distinct.go +++ b/clients/algoliasearch-client-go/algolia/search/model_distinct.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Distinct - Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +// Distinct - Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. type Distinct struct { Bool *bool Int32 *int32 diff --git a/clients/algoliasearch-client-go/algolia/search/model_edit.go b/clients/algoliasearch-client-go/algolia/search/model_edit.go index a78800a50e..83973fed14 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_edit.go +++ b/clients/algoliasearch-client-go/algolia/search/model_edit.go @@ -11,7 +11,7 @@ type Edit struct { Type *EditType `json:"type,omitempty"` // Text or patterns to remove from the query string. Delete *string `json:"delete,omitempty"` - // Text that should be inserted in place of the removed text inside the query string. + // Text to be added in place of the deleted text inside the query string. Insert *string `json:"insert,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_exact_on_single_word_query.go b/clients/algoliasearch-client-go/algolia/search/model_exact_on_single_word_query.go index 4bc2081173..dd8a2123de 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_exact_on_single_word_query.go +++ b/clients/algoliasearch-client-go/algolia/search/model_exact_on_single_word_query.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// ExactOnSingleWordQuery Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. +// ExactOnSingleWordQuery Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. type ExactOnSingleWordQuery string // List of exactOnSingleWordQuery. diff --git a/clients/algoliasearch-client-go/algolia/search/model_facet_filters.go b/clients/algoliasearch-client-go/algolia/search/model_facet_filters.go index 8118f6a482..5f6d89e308 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_facet_filters.go +++ b/clients/algoliasearch-client-go/algolia/search/model_facet_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// FacetFilters - [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +// FacetFilters - Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. type FacetFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/search/model_facet_hits.go b/clients/algoliasearch-client-go/algolia/search/model_facet_hits.go index 442c152abe..8b19aaa5fc 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_facet_hits.go +++ b/clients/algoliasearch-client-go/algolia/search/model_facet_hits.go @@ -10,9 +10,9 @@ import ( type FacetHits struct { // Facet value. Value string `json:"value"` - // Markup text with `facetQuery` matches highlighted. + // Highlighted attribute value, including HTML tags. Highlighted string `json:"highlighted"` - // Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + // Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). Count int32 `json:"count"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_facet_ordering.go b/clients/algoliasearch-client-go/algolia/search/model_facet_ordering.go index c1cb1dd7a5..661b03233e 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_facet_ordering.go +++ b/clients/algoliasearch-client-go/algolia/search/model_facet_ordering.go @@ -6,10 +6,10 @@ import ( "fmt" ) -// FacetOrdering Defines the ordering of facets (widgets). +// FacetOrdering Order of facet names and facet values in your UI. type FacetOrdering struct { Facets *Facets `json:"facets,omitempty"` - // Ordering of facet values within an individual facet. + // Order of facet values. One object for each facet. Values *map[string]Value `json:"values,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_facets.go b/clients/algoliasearch-client-go/algolia/search/model_facets.go index 02de89e080..e3a66b0437 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_facets.go +++ b/clients/algoliasearch-client-go/algolia/search/model_facets.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// Facets Ordering of facets (widgets). +// Facets Order of facet names. type Facets struct { - // Pinned order of facet lists. + // Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. Order []string `json:"order,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_get_api_key_response.go b/clients/algoliasearch-client-go/algolia/search/model_get_api_key_response.go index 3e9024552d..742541a7a6 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_get_api_key_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_get_api_key_response.go @@ -12,21 +12,21 @@ type GetApiKeyResponse struct { Value *string `json:"value,omitempty"` // Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). CreatedAt int64 `json:"createdAt"` - // [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + // Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Acl []Acl `json:"acl"` - // Description of an API key for you and your team members. + // Description of an API key to help you identify this API key. Description *string `json:"description,omitempty"` - // Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + // Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". Indexes []string `json:"indexes,omitempty"` - // Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + // Maximum number of results this API key can retrieve in one query. By default, there's no limit. MaxHitsPerQuery *int32 `json:"maxHitsPerQuery,omitempty"` - // Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + // Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. MaxQueriesPerIPPerHour *int32 `json:"maxQueriesPerIPPerHour,omitempty"` - // Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + // Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. QueryParameters *string `json:"queryParameters,omitempty"` - // Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + // Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). Referers []string `json:"referers,omitempty"` - // Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + // Duration (in seconds) after which the API key expires. By default, API keys don't expire. Validity *int32 `json:"validity,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_get_objects_request.go b/clients/algoliasearch-client-go/algolia/search/model_get_objects_request.go index cbe10b4609..1c92120831 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_get_objects_request.go +++ b/clients/algoliasearch-client-go/algolia/search/model_get_objects_request.go @@ -6,13 +6,13 @@ import ( "fmt" ) -// GetObjectsRequest Record retrieval operation. +// GetObjectsRequest Request body for retrieving records. type GetObjectsRequest struct { // Attributes to retrieve. If not specified, all retrievable attributes are returned. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Record's objectID. + // Object ID for the record to retrieve. ObjectID string `json:"objectID"` - // Name of the index containing the required records. + // Index from which to retrieve the records. IndexName string `json:"indexName"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_get_objects_response.go b/clients/algoliasearch-client-go/algolia/search/model_get_objects_response.go index 6101c37d09..1d23b6941d 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_get_objects_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_get_objects_response.go @@ -8,7 +8,7 @@ import ( // GetObjectsResponse struct for GetObjectsResponse. type GetObjectsResponse struct { - // Retrieved results. + // Retrieved records. Results []map[string]interface{} `json:"results"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_has_pending_mappings_response.go b/clients/algoliasearch-client-go/algolia/search/model_has_pending_mappings_response.go index 3dee74995d..b54ba699e1 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_has_pending_mappings_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_has_pending_mappings_response.go @@ -8,7 +8,7 @@ import ( // HasPendingMappingsResponse struct for HasPendingMappingsResponse. type HasPendingMappingsResponse struct { - // Indicates whether there are clusters undergoing migration, creation, or deletion. + // Whether there are clusters undergoing migration, creation, or deletion. Pending bool `json:"pending"` // Cluster pending mapping state: migrating, creating, deleting. Clusters *map[string][]string `json:"clusters,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_highlight_result_option.go b/clients/algoliasearch-client-go/algolia/search/model_highlight_result_option.go index e0ffbb47bf..a3b40d349a 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_highlight_result_option.go +++ b/clients/algoliasearch-client-go/algolia/search/model_highlight_result_option.go @@ -6,12 +6,12 @@ import ( "fmt" ) -// HighlightResultOption Show highlighted section and words matched on a query. +// HighlightResultOption Surround words that match the query with HTML tags for highlighting. type HighlightResultOption struct { - // Markup text with `facetQuery` matches highlighted. + // Highlighted attribute value, including HTML tags. Value string `json:"value"` MatchLevel MatchLevel `json:"matchLevel"` - // List of words from the query that matched the object. + // List of matched words from the search query. MatchedWords []string `json:"matchedWords"` // Whether the entire attribute value is highlighted. FullyHighlighted *bool `json:"fullyHighlighted,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_hit.go b/clients/algoliasearch-client-go/algolia/search/model_hit.go index 2109f2f326..370e1ebf34 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_hit.go +++ b/clients/algoliasearch-client-go/algolia/search/model_hit.go @@ -6,13 +6,13 @@ import ( "fmt" ) -// Hit A single hit. +// Hit Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. type Hit struct { - // Unique object identifier. + // Unique record identifier. ObjectID string `json:"objectID"` - // Show highlighted section and words matched on a query. + // Surround words that match the query with HTML tags for highlighting. HighlightResult *map[string]HighlightResult `json:"_highlightResult,omitempty"` - // Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + // Snippets that show the context around a matching search query. SnippetResult *map[string]SnippetResult `json:"_snippetResult,omitempty"` RankingInfo *RankingInfo `json:"_rankingInfo,omitempty"` DistinctSeqID *int32 `json:"_distinctSeqID,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_ignore_plurals.go b/clients/algoliasearch-client-go/algolia/search/model_ignore_plurals.go index acbed3a94b..505fc9a53e 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_ignore_plurals.go +++ b/clients/algoliasearch-client-go/algolia/search/model_ignore_plurals.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// IgnorePlurals - Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). +// IgnorePlurals - Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. type IgnorePlurals struct { ArrayOfString *[]string Bool *bool diff --git a/clients/algoliasearch-client-go/algolia/search/model_index_settings.go b/clients/algoliasearch-client-go/algolia/search/model_index_settings.go index b9e68bcef1..d8efb61485 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_index_settings.go +++ b/clients/algoliasearch-client-go/algolia/search/model_index_settings.go @@ -6,123 +6,129 @@ import ( "fmt" ) -// IndexSettings Algolia index settings. +// IndexSettings Index settings. type IndexSettings struct { - // Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` + // Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). Replicas []string `json:"replicas,omitempty"` - // Maximum number of hits accessible through pagination. + // Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. PaginationLimitedTo *int32 `json:"paginationLimitedTo,omitempty"` - // Attributes that can't be retrieved at query time. + // Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. UnretrievableAttributes []string `json:"unretrievableAttributes,omitempty"` - // Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. DisableTypoToleranceOnWords []string `json:"disableTypoToleranceOnWords,omitempty"` - // Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + // Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. AttributesToTransliterate []string `json:"attributesToTransliterate,omitempty"` - // Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + // Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. CamelCaseAttributes []string `json:"camelCaseAttributes,omitempty"` - // Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + // Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). DecompoundedAttributes map[string]interface{} `json:"decompoundedAttributes,omitempty"` - // Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). IndexLanguages []string `json:"indexLanguages,omitempty"` - // Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + // Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). DisablePrefixOnAttributes []string `json:"disablePrefixOnAttributes,omitempty"` - // Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + // Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. AllowCompressionOfIntegerArray *bool `json:"allowCompressionOfIntegerArray,omitempty"` - // Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + // Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. NumericAttributesForFiltering []string `json:"numericAttributesForFiltering,omitempty"` - // Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + // Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. SeparatorsToIndex *string `json:"separatorsToIndex,omitempty"` - // [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + // Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higher than matches at the end. SearchableAttributes []string `json:"searchableAttributes,omitempty"` - // Lets you store custom data in your indices. + // An object with custom data. You can store up to 32 kB as custom data. UserData map[string]interface{} `json:"userData,omitempty"` - // A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). CustomNormalization *map[string]map[string]string `json:"customNormalization,omitempty"` - // Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + // Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. AttributeForDistinct *string `json:"attributeForDistinct,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` } type IndexSettingsOption func(f *IndexSettings) +func WithIndexSettingsAttributesForFaceting(val []string) IndexSettingsOption { + return func(f *IndexSettings) { + f.AttributesForFaceting = val + } +} + func WithIndexSettingsReplicas(val []string) IndexSettingsOption { return func(f *IndexSettings) { f.Replicas = val @@ -219,12 +225,6 @@ func WithIndexSettingsAttributeForDistinct(val string) IndexSettingsOption { } } -func WithIndexSettingsAttributesForFaceting(val []string) IndexSettingsOption { - return func(f *IndexSettings) { - f.AttributesForFaceting = val - } -} - func WithIndexSettingsAttributesToRetrieve(val []string) IndexSettingsOption { return func(f *IndexSettings) { f.AttributesToRetrieve = val @@ -506,6 +506,39 @@ func NewEmptyIndexSettings() *IndexSettings { return &IndexSettings{} } +// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. +func (o *IndexSettings) GetAttributesForFaceting() []string { + if o == nil || o.AttributesForFaceting == nil { + var ret []string + return ret + } + return o.AttributesForFaceting +} + +// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndexSettings) GetAttributesForFacetingOk() ([]string, bool) { + if o == nil || o.AttributesForFaceting == nil { + return nil, false + } + return o.AttributesForFaceting, true +} + +// HasAttributesForFaceting returns a boolean if a field has been set. +func (o *IndexSettings) HasAttributesForFaceting() bool { + if o != nil && o.AttributesForFaceting != nil { + return true + } + + return false +} + +// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. +func (o *IndexSettings) SetAttributesForFaceting(v []string) *IndexSettings { + o.AttributesForFaceting = v + return o +} + // GetReplicas returns the Replicas field value if set, zero value otherwise. func (o *IndexSettings) GetReplicas() []string { if o == nil || o.Replicas == nil { @@ -1034,39 +1067,6 @@ func (o *IndexSettings) SetAttributeForDistinct(v string) *IndexSettings { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *IndexSettings) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndexSettings) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *IndexSettings) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *IndexSettings) SetAttributesForFaceting(v []string) *IndexSettings { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *IndexSettings) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -2532,6 +2532,9 @@ func (o *IndexSettings) UnsetReRankingApplyFilter() { func (o IndexSettings) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} + if o.AttributesForFaceting != nil { + toSerialize["attributesForFaceting"] = o.AttributesForFaceting + } if o.Replicas != nil { toSerialize["replicas"] = o.Replicas } @@ -2580,9 +2583,6 @@ func (o IndexSettings) MarshalJSON() ([]byte, error) { if o.AttributeForDistinct != nil { toSerialize["attributeForDistinct"] = o.AttributeForDistinct } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -2725,6 +2725,7 @@ func (o IndexSettings) MarshalJSON() ([]byte, error) { func (o IndexSettings) String() string { out := "" + out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" replicas=%v\n", o.Replicas) out += fmt.Sprintf(" paginationLimitedTo=%v\n", o.PaginationLimitedTo) out += fmt.Sprintf(" unretrievableAttributes=%v\n", o.UnretrievableAttributes) @@ -2741,7 +2742,6 @@ func (o IndexSettings) String() string { out += fmt.Sprintf(" userData=%v\n", o.UserData) out += fmt.Sprintf(" customNormalization=%v\n", o.CustomNormalization) out += fmt.Sprintf(" attributeForDistinct=%v\n", o.AttributeForDistinct) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/search/model_index_settings_as_search_params.go b/clients/algoliasearch-client-go/algolia/search/model_index_settings_as_search_params.go index 4070ce4774..47375070ce 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_index_settings_as_search_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_index_settings_as_search_params.go @@ -8,95 +8,87 @@ import ( // IndexSettingsAsSearchParams struct for IndexSettingsAsSearchParams. type IndexSettingsAsSearchParams struct { - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` } type IndexSettingsAsSearchParamsOption func(f *IndexSettingsAsSearchParams) -func WithIndexSettingsAsSearchParamsAttributesForFaceting(val []string) IndexSettingsAsSearchParamsOption { - return func(f *IndexSettingsAsSearchParams) { - f.AttributesForFaceting = val - } -} - func WithIndexSettingsAsSearchParamsAttributesToRetrieve(val []string) IndexSettingsAsSearchParamsOption { return func(f *IndexSettingsAsSearchParams) { f.AttributesToRetrieve = val @@ -378,39 +370,6 @@ func NewEmptyIndexSettingsAsSearchParams() *IndexSettingsAsSearchParams { return &IndexSettingsAsSearchParams{} } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *IndexSettingsAsSearchParams) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndexSettingsAsSearchParams) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *IndexSettingsAsSearchParams) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *IndexSettingsAsSearchParams) SetAttributesForFaceting(v []string) *IndexSettingsAsSearchParams { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *IndexSettingsAsSearchParams) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -1876,9 +1835,6 @@ func (o *IndexSettingsAsSearchParams) UnsetReRankingApplyFilter() { func (o IndexSettingsAsSearchParams) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -2021,7 +1977,6 @@ func (o IndexSettingsAsSearchParams) MarshalJSON() ([]byte, error) { func (o IndexSettingsAsSearchParams) String() string { out := "" - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/search/model_log.go b/clients/algoliasearch-client-go/algolia/search/model_log.go index 7e67d0cf20..2ad5f05c88 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_log.go +++ b/clients/algoliasearch-client-go/algolia/search/model_log.go @@ -8,35 +8,35 @@ import ( // Log struct for Log. type Log struct { - // Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + // Timestamp of the API request in ISO 8601 format. Timestamp string `json:"timestamp"` - // HTTP method of the performed request. + // HTTP method of the request. Method string `json:"method"` - // HTTP response code. + // HTTP status code of the response. AnswerCode string `json:"answer_code"` - // Request body. Truncated after 1,000 characters. + // Request body. QueryBody string `json:"query_body"` - // Answer body. Truncated after 1,000 characters. + // Response body. Answer string `json:"answer"` - // Request URL. + // URL of the API endpoint. Url string `json:"url"` // IP address of the client that performed the request. Ip string `json:"ip"` - // Request headers (API key is obfuscated). + // Request headers (API keys are obfuscated). QueryHeaders string `json:"query_headers"` // SHA1 signature of the log entry. Sha1 string `json:"sha1"` - // Number of API calls. + // Number of API requests. NbApiCalls string `json:"nb_api_calls"` - // Processing time for the query. Doesn't include network time. + // Processing time for the query in milliseconds. This doesn't include latency due to the network. ProcessingTimeMs string `json:"processing_time_ms"` // Index targeted by the query. Index *string `json:"index,omitempty"` // Query parameters sent with the request. QueryParams *string `json:"query_params,omitempty"` - // Number of hits returned for the query. + // Number of search results (hits) returned for the query. QueryNbHits *string `json:"query_nb_hits,omitempty"` - // Performed queries for the given request. + // Queries performed for the given request. InnerQueries []LogQuery `json:"inner_queries,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_log_query.go b/clients/algoliasearch-client-go/algolia/search/model_log_query.go index fb45e09e39..d3e7ce803b 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_log_query.go +++ b/clients/algoliasearch-client-go/algolia/search/model_log_query.go @@ -10,7 +10,7 @@ import ( type LogQuery struct { // Index targeted by the query. IndexName *string `json:"index_name,omitempty"` - // User identifier. + // A user identifier. UserToken *string `json:"user_token,omitempty"` // Unique query identifier. QueryId *string `json:"query_id,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_match_level.go b/clients/algoliasearch-client-go/algolia/search/model_match_level.go index daaae06daa..8e8bf7625a 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_match_level.go +++ b/clients/algoliasearch-client-go/algolia/search/model_match_level.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// MatchLevel Indicates how well the attribute matched the search query. +// MatchLevel Whether the whole query string matches or only a part. type MatchLevel string // List of matchLevel. diff --git a/clients/algoliasearch-client-go/algolia/search/model_mode.go b/clients/algoliasearch-client-go/algolia/search/model_mode.go index 83f8f40ca9..69ad509b24 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_mode.go +++ b/clients/algoliasearch-client-go/algolia/search/model_mode.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Mode Search mode the index will use to query for results. +// Mode Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. type Mode string // List of mode. diff --git a/clients/algoliasearch-client-go/algolia/search/model_multiple_batch_response.go b/clients/algoliasearch-client-go/algolia/search/model_multiple_batch_response.go index d08bc6c203..c2c079286a 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_multiple_batch_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_multiple_batch_response.go @@ -8,9 +8,9 @@ import ( // MultipleBatchResponse struct for MultipleBatchResponse. type MultipleBatchResponse struct { - // TaskIDs per index. + // Task IDs. One for each index. TaskID map[string]int64 `json:"taskID"` - // Unique object (record) identifiers. + // Unique record identifiers. ObjectIDs []string `json:"objectIDs"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_numeric_filters.go b/clients/algoliasearch-client-go/algolia/search/model_numeric_filters.go index be456d5894..22f83c44ea 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_numeric_filters.go +++ b/clients/algoliasearch-client-go/algolia/search/model_numeric_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// NumericFilters - [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +// NumericFilters - Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. type NumericFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/search/model_operation_index_params.go b/clients/algoliasearch-client-go/algolia/search/model_operation_index_params.go index 3b0da11b07..bd5e55ebe4 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_operation_index_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_operation_index_params.go @@ -9,9 +9,9 @@ import ( // OperationIndexParams struct for OperationIndexParams. type OperationIndexParams struct { Operation OperationType `json:"operation"` - // Algolia index name. + // Index name. Destination string `json:"destination"` - // **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + // **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. Scope []ScopeType `json:"scope,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_operation_type.go b/clients/algoliasearch-client-go/algolia/search/model_operation_type.go index 17c82b1b2c..c7df94cbf4 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_operation_type.go +++ b/clients/algoliasearch-client-go/algolia/search/model_operation_type.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// OperationType Operation to perform (_move_ or _copy_). +// OperationType Operation to perform on the index. type OperationType string // List of operationType. diff --git a/clients/algoliasearch-client-go/algolia/search/model_optional_filters.go b/clients/algoliasearch-client-go/algolia/search/model_optional_filters.go index bf14fcbaea..c4c8f34027 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_optional_filters.go +++ b/clients/algoliasearch-client-go/algolia/search/model_optional_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// OptionalFilters - Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. +// OptionalFilters - Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. type OptionalFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/search/model_params.go b/clients/algoliasearch-client-go/algolia/search/model_params.go index 163c286e71..ca4160b75b 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_params.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// Params Additional search parameters. +// Params Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. type Params struct { Query *ConsequenceQuery `json:"query,omitempty"` AutomaticFacetFilters *AutomaticFacetFilters `json:"automaticFacetFilters,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_promote_object_id.go b/clients/algoliasearch-client-go/algolia/search/model_promote_object_id.go index 80dec4a51d..95b43dddb1 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_promote_object_id.go +++ b/clients/algoliasearch-client-go/algolia/search/model_promote_object_id.go @@ -8,9 +8,9 @@ import ( // PromoteObjectID Record to promote. type PromoteObjectID struct { - // Unique identifier of the record to promote. + // Unique record identifier. ObjectID string `json:"objectID"` - // The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + // Position in the search results where you want to show the promoted records. Position int32 `json:"position"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_promote_object_ids.go b/clients/algoliasearch-client-go/algolia/search/model_promote_object_ids.go index 7b6d6620a9..1b2a1c12b8 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_promote_object_ids.go +++ b/clients/algoliasearch-client-go/algolia/search/model_promote_object_ids.go @@ -8,9 +8,9 @@ import ( // PromoteObjectIDs Records to promote. type PromoteObjectIDs struct { - // Unique identifiers of the records to promote. + // Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. ObjectIDs []string `json:"objectIDs"` - // The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + // Position in the search results where you want to show the promoted records. Position int32 `json:"position"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_query_type.go b/clients/algoliasearch-client-go/algolia/search/model_query_type.go index 8c13af8150..2ea8872bc4 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_query_type.go +++ b/clients/algoliasearch-client-go/algolia/search/model_query_type.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// QueryType Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +// QueryType Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). type QueryType string // List of queryType. diff --git a/clients/algoliasearch-client-go/algolia/search/model_ranking_info.go b/clients/algoliasearch-client-go/algolia/search/model_ranking_info.go index d30fbb06d2..1fc101e26d 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_ranking_info.go +++ b/clients/algoliasearch-client-go/algolia/search/model_ranking_info.go @@ -6,11 +6,11 @@ import ( "fmt" ) -// RankingInfo struct for RankingInfo. +// RankingInfo Object with detailed information about the record's ranking. type RankingInfo struct { - // This field is reserved for advanced usage. + // Whether a filter matched the query. Filters int32 `json:"filters"` - // Position of the most important matched attribute in the attributes to index list. + // Position of the first matched word in the best matching attribute of the record. FirstMatchedWord int32 `json:"firstMatchedWord"` // Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). GeoDistance int32 `json:"geoDistance"` @@ -22,15 +22,15 @@ type RankingInfo struct { NbExactWords int32 `json:"nbExactWords"` // Number of typos encountered when matching the record. NbTypos int32 `json:"nbTypos"` - // Present and set to true if a Rule promoted the hit. + // Whether the record was promoted by a rule. Promoted bool `json:"promoted"` - // When the query contains more than one word, the sum of the distances between matched words (in meters). + // Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. ProximityDistance *int32 `json:"proximityDistance,omitempty"` - // Custom ranking for the object, expressed as a single integer value. + // Overall ranking of the record, expressed as a single integer. This attribute is internal. UserScore int32 `json:"userScore"` - // Number of matched words, including prefixes and typos. + // Number of matched words. Words int32 `json:"words"` - // Wether the record are promoted by the re-ranking strategy. + // Whether the record is re-ranked. PromotedByReRanking *bool `json:"promotedByReRanking,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_re_ranking_apply_filter.go b/clients/algoliasearch-client-go/algolia/search/model_re_ranking_apply_filter.go index e49b0b95f9..bb9148034f 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_re_ranking_apply_filter.go +++ b/clients/algoliasearch-client-go/algolia/search/model_re_ranking_apply_filter.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// ReRankingApplyFilter - When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. +// ReRankingApplyFilter - Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. type ReRankingApplyFilter struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/search/model_remove_stop_words.go b/clients/algoliasearch-client-go/algolia/search/model_remove_stop_words.go index 4cdc3e67dd..dd4cf586c3 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_remove_stop_words.go +++ b/clients/algoliasearch-client-go/algolia/search/model_remove_stop_words.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// RemoveStopWords - Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. +// RemoveStopWords - Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. type RemoveStopWords struct { ArrayOfString *[]string Bool *bool diff --git a/clients/algoliasearch-client-go/algolia/search/model_remove_words_if_no_results.go b/clients/algoliasearch-client-go/algolia/search/model_remove_words_if_no_results.go index 5f3166f187..04a1205c6a 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_remove_words_if_no_results.go +++ b/clients/algoliasearch-client-go/algolia/search/model_remove_words_if_no_results.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// RemoveWordsIfNoResults Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. +// RemoveWordsIfNoResults Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). type RemoveWordsIfNoResults string // List of removeWordsIfNoResults. diff --git a/clients/algoliasearch-client-go/algolia/search/model_rendering_content.go b/clients/algoliasearch-client-go/algolia/search/model_rendering_content.go index c2ec23a7b3..36213f21be 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_rendering_content.go +++ b/clients/algoliasearch-client-go/algolia/search/model_rendering_content.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// RenderingContent Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +// RenderingContent Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. type RenderingContent struct { FacetOrdering *FacetOrdering `json:"facetOrdering,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_rule.go b/clients/algoliasearch-client-go/algolia/search/model_rule.go index bfbee6e8fe..c76a9bd820 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_rule.go +++ b/clients/algoliasearch-client-go/algolia/search/model_rule.go @@ -8,16 +8,16 @@ import ( // Rule Rule object. type Rule struct { - // Unique identifier for a rule object. + // Unique identifier of a rule object. ObjectID string `json:"objectID"` - // [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + // Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). Conditions []Condition `json:"conditions,omitempty"` Consequence *Consequence `json:"consequence,omitempty"` - // Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + // Description of the rule's purpose to help you distinguish between different rules. Description *string `json:"description,omitempty"` - // Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + // Whether the rule is active. Enabled *bool `json:"enabled,omitempty"` - // If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + // Time periods when the rule is active. Validity []TimeRange `json:"validity,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_save_object_response.go b/clients/algoliasearch-client-go/algolia/search/model_save_object_response.go index bb2d2e0409..bd91e251d2 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_save_object_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_save_object_response.go @@ -8,11 +8,11 @@ import ( // SaveObjectResponse struct for SaveObjectResponse. type SaveObjectResponse struct { - // Date of creation (ISO-8601 format). + // Timestamp when the record was added, in ISO 8601 format. CreatedAt string `json:"createdAt"` - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` - // Unique object identifier. + // Unique record identifier. ObjectID *string `json:"objectID,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_save_synonym_response.go b/clients/algoliasearch-client-go/algolia/search/model_save_synonym_response.go index 90c6375000..4efd1c032a 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_save_synonym_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_save_synonym_response.go @@ -8,7 +8,7 @@ import ( // SaveSynonymResponse struct for SaveSynonymResponse. type SaveSynonymResponse struct { - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` // Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. UpdatedAt string `json:"updatedAt"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_params.go b/clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_params.go index 11e4a7b365..e782237bee 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_params.go @@ -6,15 +6,15 @@ import ( "fmt" ) -// SearchDictionaryEntriesParams `searchDictionaryEntries` parameters. +// SearchDictionaryEntriesParams Search parameter. type SearchDictionaryEntriesParams struct { - // Text to search for in an index. + // Search query. Query string `json:"query"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + // ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). Language *string `json:"language,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_response.go b/clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_response.go new file mode 100644 index 0000000000..842c6a2b0b --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/search/model_search_dictionary_entries_response.go @@ -0,0 +1,204 @@ +// File generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. +package search + +import ( + "encoding/json" + "fmt" +) + +// SearchDictionaryEntriesResponse struct for SearchDictionaryEntriesResponse. +type SearchDictionaryEntriesResponse struct { + // Dictionary entries matching the search criteria. + Hits []DictionaryEntry `json:"hits"` + // Requested page of the API response. + Page int32 `json:"page"` + // Number of results (hits). + NbHits int32 `json:"nbHits"` + // Number of pages of results. + NbPages int32 `json:"nbPages"` +} + +// NewSearchDictionaryEntriesResponse instantiates a new SearchDictionaryEntriesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSearchDictionaryEntriesResponse(hits []DictionaryEntry, page int32, nbHits int32, nbPages int32) *SearchDictionaryEntriesResponse { + this := &SearchDictionaryEntriesResponse{} + this.Hits = hits + this.Page = page + this.NbHits = nbHits + this.NbPages = nbPages + return this +} + +// NewEmptySearchDictionaryEntriesResponse return a pointer to an empty SearchDictionaryEntriesResponse object. +func NewEmptySearchDictionaryEntriesResponse() *SearchDictionaryEntriesResponse { + return &SearchDictionaryEntriesResponse{} +} + +// GetHits returns the Hits field value. +func (o *SearchDictionaryEntriesResponse) GetHits() []DictionaryEntry { + if o == nil { + var ret []DictionaryEntry + return ret + } + + return o.Hits +} + +// GetHitsOk returns a tuple with the Hits field value +// and a boolean to check if the value has been set. +func (o *SearchDictionaryEntriesResponse) GetHitsOk() ([]DictionaryEntry, bool) { + if o == nil { + return nil, false + } + return o.Hits, true +} + +// SetHits sets field value. +func (o *SearchDictionaryEntriesResponse) SetHits(v *[]DictionaryEntry) *SearchDictionaryEntriesResponse { + o.Hits = *v + return o +} + +// GetPage returns the Page field value. +func (o *SearchDictionaryEntriesResponse) GetPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *SearchDictionaryEntriesResponse) GetPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value. +func (o *SearchDictionaryEntriesResponse) SetPage(v int32) *SearchDictionaryEntriesResponse { + o.Page = v + return o +} + +// GetNbHits returns the NbHits field value. +func (o *SearchDictionaryEntriesResponse) GetNbHits() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NbHits +} + +// GetNbHitsOk returns a tuple with the NbHits field value +// and a boolean to check if the value has been set. +func (o *SearchDictionaryEntriesResponse) GetNbHitsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NbHits, true +} + +// SetNbHits sets field value. +func (o *SearchDictionaryEntriesResponse) SetNbHits(v int32) *SearchDictionaryEntriesResponse { + o.NbHits = v + return o +} + +// GetNbPages returns the NbPages field value. +func (o *SearchDictionaryEntriesResponse) GetNbPages() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NbPages +} + +// GetNbPagesOk returns a tuple with the NbPages field value +// and a boolean to check if the value has been set. +func (o *SearchDictionaryEntriesResponse) GetNbPagesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NbPages, true +} + +// SetNbPages sets field value. +func (o *SearchDictionaryEntriesResponse) SetNbPages(v int32) *SearchDictionaryEntriesResponse { + o.NbPages = v + return o +} + +func (o SearchDictionaryEntriesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if true { + toSerialize["hits"] = o.Hits + } + if true { + toSerialize["page"] = o.Page + } + if true { + toSerialize["nbHits"] = o.NbHits + } + if true { + toSerialize["nbPages"] = o.NbPages + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal SearchDictionaryEntriesResponse: %w", err) + } + + return serialized, nil +} + +func (o SearchDictionaryEntriesResponse) String() string { + out := "" + out += fmt.Sprintf(" hits=%v\n", o.Hits) + out += fmt.Sprintf(" page=%v\n", o.Page) + out += fmt.Sprintf(" nbHits=%v\n", o.NbHits) + out += fmt.Sprintf(" nbPages=%v\n", o.NbPages) + return fmt.Sprintf("SearchDictionaryEntriesResponse {\n%s}", out) +} + +type NullableSearchDictionaryEntriesResponse struct { + value *SearchDictionaryEntriesResponse + isSet bool +} + +func (v NullableSearchDictionaryEntriesResponse) Get() *SearchDictionaryEntriesResponse { + return v.value +} + +func (v *NullableSearchDictionaryEntriesResponse) Set(val *SearchDictionaryEntriesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSearchDictionaryEntriesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSearchDictionaryEntriesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSearchDictionaryEntriesResponse(val *SearchDictionaryEntriesResponse) *NullableSearchDictionaryEntriesResponse { + return &NullableSearchDictionaryEntriesResponse{value: val, isSet: true} +} + +func (v NullableSearchDictionaryEntriesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) //nolint:wrapcheck +} + +func (v *NullableSearchDictionaryEntriesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) //nolint:wrapcheck +} diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_request.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_request.go index 35396ef2ef..1729e90ad9 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_request.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_request.go @@ -12,7 +12,7 @@ type SearchForFacetValuesRequest struct { Params *string `json:"params,omitempty"` // Text to search inside the facet's values. FacetQuery *string `json:"facetQuery,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_response.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_response.go index cb66bf42f3..b15cab6c1b 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_facet_values_response.go @@ -8,6 +8,7 @@ import ( // SearchForFacetValuesResponse struct for SearchForFacetValuesResponse. type SearchForFacetValuesResponse struct { + // Matching facet values. FacetHits []FacetHits `json:"facetHits"` // See the `facetsCount` field of the `exhaustive` object in the response. // Deprecated diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go index 9a0c82090b..6675ac1cb6 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go @@ -10,148 +10,144 @@ import ( type SearchForFacets struct { // Search parameters as a URL-encoded query string. Params *string `json:"params,omitempty"` - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` // Facet name. Facet string `json:"facet"` - // Algolia index name. + // Index name. IndexName string `json:"indexName"` // Text to search inside the facet's values. FacetQuery *string `json:"facetQuery,omitempty"` @@ -322,12 +318,6 @@ func WithSearchForFacetsGetRankingInfo(val bool) SearchForFacetsOption { } } -func WithSearchForFacetsExplain(val []string) SearchForFacetsOption { - return func(f *SearchForFacets) { - f.Explain = val - } -} - func WithSearchForFacetsSynonyms(val bool) SearchForFacetsOption { return func(f *SearchForFacets) { f.Synonyms = &val @@ -364,12 +354,6 @@ func WithSearchForFacetsEnableABTest(val bool) SearchForFacetsOption { } } -func WithSearchForFacetsAttributesForFaceting(val []string) SearchForFacetsOption { - return func(f *SearchForFacets) { - f.AttributesForFaceting = val - } -} - func WithSearchForFacetsAttributesToRetrieve(val []string) SearchForFacetsOption { return func(f *SearchForFacets) { f.AttributesToRetrieve = val @@ -1551,39 +1535,6 @@ func (o *SearchForFacets) SetGetRankingInfo(v bool) *SearchForFacets { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *SearchForFacets) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForFacets) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *SearchForFacets) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *SearchForFacets) SetExplain(v []string) *SearchForFacets { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *SearchForFacets) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1782,39 +1733,6 @@ func (o *SearchForFacets) SetEnableABTest(v bool) *SearchForFacets { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *SearchForFacets) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForFacets) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *SearchForFacets) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *SearchForFacets) SetAttributesForFaceting(v []string) *SearchForFacets { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *SearchForFacets) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3469,9 +3387,6 @@ func (o SearchForFacets) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3490,9 +3405,6 @@ func (o SearchForFacets) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3674,14 +3586,12 @@ func (o SearchForFacets) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_facets_options.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_facets_options.go index 8a3e4bf842..fe3100005e 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_facets_options.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_facets_options.go @@ -10,11 +10,11 @@ import ( type SearchForFacetsOptions struct { // Facet name. Facet string `json:"facet"` - // Algolia index name. + // Index name. IndexName string `json:"indexName"` // Text to search inside the facet's values. FacetQuery *string `json:"facetQuery,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` Type SearchTypeFacet `json:"type"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go index 5ffdce1b9b..de7267539f 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go @@ -10,146 +10,142 @@ import ( type SearchForHits struct { // Search parameters as a URL-encoded query string. Params *string `json:"params,omitempty"` - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` - // Algolia index name. + // Index name. IndexName string `json:"indexName"` Type *SearchTypeDefault `json:"type,omitempty"` } @@ -318,12 +314,6 @@ func WithSearchForHitsGetRankingInfo(val bool) SearchForHitsOption { } } -func WithSearchForHitsExplain(val []string) SearchForHitsOption { - return func(f *SearchForHits) { - f.Explain = val - } -} - func WithSearchForHitsSynonyms(val bool) SearchForHitsOption { return func(f *SearchForHits) { f.Synonyms = &val @@ -360,12 +350,6 @@ func WithSearchForHitsEnableABTest(val bool) SearchForHitsOption { } } -func WithSearchForHitsAttributesForFaceting(val []string) SearchForHitsOption { - return func(f *SearchForHits) { - f.AttributesForFaceting = val - } -} - func WithSearchForHitsAttributesToRetrieve(val []string) SearchForHitsOption { return func(f *SearchForHits) { f.AttributesToRetrieve = val @@ -1545,39 +1529,6 @@ func (o *SearchForHits) SetGetRankingInfo(v bool) *SearchForHits { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *SearchForHits) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForHits) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *SearchForHits) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *SearchForHits) SetExplain(v []string) *SearchForHits { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *SearchForHits) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1776,39 +1727,6 @@ func (o *SearchForHits) SetEnableABTest(v bool) *SearchForHits { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *SearchForHits) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForHits) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *SearchForHits) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *SearchForHits) SetAttributesForFaceting(v []string) *SearchForHits { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *SearchForHits) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3413,9 +3331,6 @@ func (o SearchForHits) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3434,9 +3349,6 @@ func (o SearchForHits) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3612,14 +3524,12 @@ func (o SearchForHits) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_hits_options.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_hits_options.go index a5ed0dfe49..4b7d008711 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_hits_options.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_hits_options.go @@ -8,7 +8,7 @@ import ( // SearchForHitsOptions struct for SearchForHitsOptions. type SearchForHitsOptions struct { - // Algolia index name. + // Index name. IndexName string `json:"indexName"` Type *SearchTypeDefault `json:"type,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_hits.go b/clients/algoliasearch-client-go/algolia/search/model_search_hits.go index 1d25448ceb..ec0348f062 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_hits.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_hits.go @@ -8,8 +8,9 @@ import ( // SearchHits struct for SearchHits. type SearchHits struct { + // Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. Hits []Hit `json:"hits"` - // Text to search for in an index. + // Search query. Query string `json:"query"` // URL-encoded string of all search parameters. Params string `json:"params"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go b/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go index 7b28cb6acf..92b6fd8746 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go @@ -8,143 +8,139 @@ import ( // SearchParamsObject struct for SearchParamsObject. type SearchParamsObject struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` - // Overrides the query parameter and performs a more generic search. + // Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. SimilarQuery *string `json:"similarQuery,omitempty"` - // [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + // Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). Filters *string `json:"filters,omitempty"` FacetFilters *FacetFilters `json:"facetFilters,omitempty"` OptionalFilters *OptionalFilters `json:"optionalFilters,omitempty"` NumericFilters *NumericFilters `json:"numericFilters,omitempty"` TagFilters *TagFilters `json:"tagFilters,omitempty"` - // Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + // Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). SumOrFiltersScores *bool `json:"sumOrFiltersScores,omitempty"` - // Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + // Restricts a search to a subset of your searchable attributes. RestrictSearchableAttributes []string `json:"restrictSearchableAttributes,omitempty"` - // Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + // Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). Facets []string `json:"facets,omitempty"` - // Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + // Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. FacetingAfterDistinct *bool `json:"facetingAfterDistinct,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` - // Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Position of the first hit to retrieve. Offset *int32 `json:"offset,omitempty"` - // Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + // Number of hits to retrieve (used in combination with `offset`). Length *int32 `json:"length,omitempty"` - // Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + // Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Search for entries around a location. The location is automatically computed from the requester's IP address. + // Whether to obtain the coordinates from the request's IP address. AroundLatLngViaIP *bool `json:"aroundLatLngViaIP,omitempty"` AroundRadius *AroundRadius `json:"aroundRadius,omitempty"` AroundPrecision *AroundPrecision `json:"aroundPrecision,omitempty"` - // Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + // Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. MinimumAroundRadius *int32 `json:"minimumAroundRadius,omitempty"` - // Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). InsideBoundingBox [][]float64 `json:"insideBoundingBox,omitempty"` - // Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + // Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. InsidePolygon [][]float64 `json:"insidePolygon,omitempty"` - // Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + // ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. NaturalLanguages []string `json:"naturalLanguages,omitempty"` - // Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + // Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. RuleContexts []string `json:"ruleContexts,omitempty"` - // Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + // Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). PersonalizationImpact *int32 `json:"personalizationImpact,omitempty"` - // Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + // Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). UserToken *string `json:"userToken,omitempty"` - // Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + // Whether the search response should include detailed ranking information. GetRankingInfo *bool `json:"getRankingInfo,omitempty"` - // Enriches the API's response with information about how the query was processed. - Explain []string `json:"explain,omitempty"` - // Whether to take into account an index's synonyms for a particular search. + // Whether to take into account an index's synonyms for this search. Synonyms *bool `json:"synonyms,omitempty"` - // Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + // Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ClickAnalytics *bool `json:"clickAnalytics,omitempty"` - // Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + // Whether this search will be included in Analytics. Analytics *bool `json:"analytics,omitempty"` // Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). AnalyticsTags []string `json:"analyticsTags,omitempty"` - // Whether to include or exclude a query from the processing-time percentile computation. + // Whether to include this search when calculating processing-time percentiles. PercentileComputation *bool `json:"percentileComputation,omitempty"` - // Incidates whether this search will be considered in A/B testing. + // Whether to enable A/B testing for this search. EnableABTest *bool `json:"enableABTest,omitempty"` - // Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` - // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + // Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` - // Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + // Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). Ranking []string `json:"ranking,omitempty"` - // Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + // Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. CustomRanking []string `json:"customRanking,omitempty"` - // Relevancy threshold below which less relevant results aren't included in the results. + // Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` - // Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). AttributesToHighlight []string `json:"attributesToHighlight,omitempty"` - // Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + // Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. AttributesToSnippet []string `json:"attributesToSnippet,omitempty"` - // HTML string to insert before the highlighted parts in all highlight and snippet results. + // HTML tag to insert before the highlighted parts in all highlighted results and snippets. HighlightPreTag *string `json:"highlightPreTag,omitempty"` - // HTML string to insert after the highlighted parts in all highlight and snippet results. + // HTML tag to insert after the highlighted parts in all highlighted results and snippets. HighlightPostTag *string `json:"highlightPostTag,omitempty"` // String used as an ellipsis indicator when a snippet is truncated. SnippetEllipsisText *string `json:"snippetEllipsisText,omitempty"` - // Restrict highlighting and snippeting to items that matched the query. + // Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. RestrictHighlightAndSnippetArrays *bool `json:"restrictHighlightAndSnippetArrays,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor1Typo *int32 `json:"minWordSizefor1Typo,omitempty"` - // Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + // Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). MinWordSizefor2Typos *int32 `json:"minWordSizefor2Typos,omitempty"` TypoTolerance *TypoTolerance `json:"typoTolerance,omitempty"` - // Whether to allow typos on numbers (\"numeric tokens\") in the query string. + // Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. AllowTyposOnNumericTokens *bool `json:"allowTyposOnNumericTokens,omitempty"` - // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + // Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + // Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` - // Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + // [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). QueryLanguages []string `json:"queryLanguages,omitempty"` - // [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + // Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. DecompoundQuery *bool `json:"decompoundQuery,omitempty"` - // Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + // Whether to enable rules. EnableRules *bool `json:"enableRules,omitempty"` - // Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + // Whether to enable Personalization. EnablePersonalization *bool `json:"enablePersonalization,omitempty"` QueryType *QueryType `json:"queryType,omitempty"` RemoveWordsIfNoResults *RemoveWordsIfNoResults `json:"removeWordsIfNoResults,omitempty"` Mode *Mode `json:"mode,omitempty"` SemanticSearch *SemanticSearch `json:"semanticSearch,omitempty"` - // Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + // Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. AdvancedSyntax *bool `json:"advancedSyntax,omitempty"` - // Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + // Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). OptionalWords []string `json:"optionalWords,omitempty"` - // Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. DisableExactOnAttributes []string `json:"disableExactOnAttributes,omitempty"` ExactOnSingleWordQuery *ExactOnSingleWordQuery `json:"exactOnSingleWordQuery,omitempty"` - // Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + // Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. AlternativesAsExact []AlternativesAsExact `json:"alternativesAsExact,omitempty"` - // Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + // Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. AdvancedSyntaxFeatures []AdvancedSyntaxFeatures `json:"advancedSyntaxFeatures,omitempty"` Distinct *Distinct `json:"distinct,omitempty"` - // Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + // Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response. ReplaceSynonymsInHighlight *bool `json:"replaceSynonymsInHighlight,omitempty"` - // Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + // Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. MinProximity *int32 `json:"minProximity,omitempty"` - // Attributes to include in the API response for search and browse queries. + // Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ResponseFields []string `json:"responseFields,omitempty"` - // Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + // Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` // Maximum number of facet values to return for each facet. MaxValuesPerFacet *int32 `json:"maxValuesPerFacet,omitempty"` - // Controls how facet values are fetched. + // Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). SortFacetValuesBy *string `json:"sortFacetValuesBy,omitempty"` - // When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + // Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. AttributeCriteriaComputedByMinProximity *bool `json:"attributeCriteriaComputedByMinProximity,omitempty"` RenderingContent *RenderingContent `json:"renderingContent,omitempty"` - // Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. EnableReRanking *bool `json:"enableReRanking,omitempty"` ReRankingApplyFilter NullableReRankingApplyFilter `json:"reRankingApplyFilter,omitempty"` } @@ -307,12 +303,6 @@ func WithSearchParamsObjectGetRankingInfo(val bool) SearchParamsObjectOption { } } -func WithSearchParamsObjectExplain(val []string) SearchParamsObjectOption { - return func(f *SearchParamsObject) { - f.Explain = val - } -} - func WithSearchParamsObjectSynonyms(val bool) SearchParamsObjectOption { return func(f *SearchParamsObject) { f.Synonyms = &val @@ -349,12 +339,6 @@ func WithSearchParamsObjectEnableABTest(val bool) SearchParamsObjectOption { } } -func WithSearchParamsObjectAttributesForFaceting(val []string) SearchParamsObjectOption { - return func(f *SearchParamsObject) { - f.AttributesForFaceting = val - } -} - func WithSearchParamsObjectAttributesToRetrieve(val []string) SearchParamsObjectOption { return func(f *SearchParamsObject) { f.AttributesToRetrieve = val @@ -1494,39 +1478,6 @@ func (o *SearchParamsObject) SetGetRankingInfo(v bool) *SearchParamsObject { return o } -// GetExplain returns the Explain field value if set, zero value otherwise. -func (o *SearchParamsObject) GetExplain() []string { - if o == nil || o.Explain == nil { - var ret []string - return ret - } - return o.Explain -} - -// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchParamsObject) GetExplainOk() ([]string, bool) { - if o == nil || o.Explain == nil { - return nil, false - } - return o.Explain, true -} - -// HasExplain returns a boolean if a field has been set. -func (o *SearchParamsObject) HasExplain() bool { - if o != nil && o.Explain != nil { - return true - } - - return false -} - -// SetExplain gets a reference to the given []string and assigns it to the Explain field. -func (o *SearchParamsObject) SetExplain(v []string) *SearchParamsObject { - o.Explain = v - return o -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise. func (o *SearchParamsObject) GetSynonyms() bool { if o == nil || o.Synonyms == nil { @@ -1725,39 +1676,6 @@ func (o *SearchParamsObject) SetEnableABTest(v bool) *SearchParamsObject { return o } -// GetAttributesForFaceting returns the AttributesForFaceting field value if set, zero value otherwise. -func (o *SearchParamsObject) GetAttributesForFaceting() []string { - if o == nil || o.AttributesForFaceting == nil { - var ret []string - return ret - } - return o.AttributesForFaceting -} - -// GetAttributesForFacetingOk returns a tuple with the AttributesForFaceting field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchParamsObject) GetAttributesForFacetingOk() ([]string, bool) { - if o == nil || o.AttributesForFaceting == nil { - return nil, false - } - return o.AttributesForFaceting, true -} - -// HasAttributesForFaceting returns a boolean if a field has been set. -func (o *SearchParamsObject) HasAttributesForFaceting() bool { - if o != nil && o.AttributesForFaceting != nil { - return true - } - - return false -} - -// SetAttributesForFaceting gets a reference to the given []string and assigns it to the AttributesForFaceting field. -func (o *SearchParamsObject) SetAttributesForFaceting(v []string) *SearchParamsObject { - o.AttributesForFaceting = v - return o -} - // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *SearchParamsObject) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3301,9 +3219,6 @@ func (o SearchParamsObject) MarshalJSON() ([]byte, error) { if o.GetRankingInfo != nil { toSerialize["getRankingInfo"] = o.GetRankingInfo } - if o.Explain != nil { - toSerialize["explain"] = o.Explain - } if o.Synonyms != nil { toSerialize["synonyms"] = o.Synonyms } @@ -3322,9 +3237,6 @@ func (o SearchParamsObject) MarshalJSON() ([]byte, error) { if o.EnableABTest != nil { toSerialize["enableABTest"] = o.EnableABTest } - if o.AttributesForFaceting != nil { - toSerialize["attributesForFaceting"] = o.AttributesForFaceting - } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3493,14 +3405,12 @@ func (o SearchParamsObject) String() string { out += fmt.Sprintf(" personalizationImpact=%v\n", o.PersonalizationImpact) out += fmt.Sprintf(" userToken=%v\n", o.UserToken) out += fmt.Sprintf(" getRankingInfo=%v\n", o.GetRankingInfo) - out += fmt.Sprintf(" explain=%v\n", o.Explain) out += fmt.Sprintf(" synonyms=%v\n", o.Synonyms) out += fmt.Sprintf(" clickAnalytics=%v\n", o.ClickAnalytics) out += fmt.Sprintf(" analytics=%v\n", o.Analytics) out += fmt.Sprintf(" analyticsTags=%v\n", o.AnalyticsTags) out += fmt.Sprintf(" percentileComputation=%v\n", o.PercentileComputation) out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) - out += fmt.Sprintf(" attributesForFaceting=%v\n", o.AttributesForFaceting) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_params_query.go b/clients/algoliasearch-client-go/algolia/search/model_search_params_query.go index c6494b9513..5bf8c13efb 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_params_query.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_params_query.go @@ -8,7 +8,7 @@ import ( // SearchParamsQuery struct for SearchParamsQuery. type SearchParamsQuery struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_response.go b/clients/algoliasearch-client-go/algolia/search/model_search_response.go index 85e6f2e747..1daabe5a69 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_response.go @@ -14,7 +14,7 @@ type SearchResponse struct { AbTestVariantID *int32 `json:"abTestVariantID,omitempty"` // Computed geographical location. AroundLatLng *string `json:"aroundLatLng,omitempty"` - // Automatically-computed radius. + // Distance from a central coordinate provided by `aroundLatLng`. AutomaticRadius *string `json:"automaticRadius,omitempty"` Exhaustive *Exhaustive `json:"exhaustive,omitempty"` // See the `facetsCount` field of the `exhaustive` object in the response. @@ -26,7 +26,7 @@ type SearchResponse struct { // See the `typo` field of the `exhaustive` object in the response. // Deprecated ExhaustiveTypo *bool `json:"exhaustiveTypo,omitempty"` - // Mapping of each facet name to the corresponding facet counts. + // Facet counts. Facets *map[string]map[string]int32 `json:"facets,omitempty"` // Statistics for numerical facets. FacetsStats *map[string]FacetsStats `json:"facets_stats,omitempty"` @@ -38,13 +38,13 @@ type SearchResponse struct { IndexUsed *string `json:"indexUsed,omitempty"` // Warnings about the query. Message *string `json:"message,omitempty"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` - // Number of pages of results for the current query. + // Number of pages of results. NbPages int32 `json:"nbPages"` // Number of hits selected and sorted by the relevant sort algorithm. NbSortedHits *int32 `json:"nbSortedHits,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page int32 `json:"page"` // 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. ParsedQuery *string `json:"parsedQuery,omitempty"` @@ -60,12 +60,13 @@ type SearchResponse struct { ServerTimeMS *int32 `json:"serverTimeMS,omitempty"` // Host name of the server that processed the request. ServerUsed *string `json:"serverUsed,omitempty"` - // Lets you store custom data in your indices. + // An object with custom data. You can store up to 32 kB as custom data. UserData map[string]interface{} `json:"userData,omitempty"` // Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). QueryID *string `json:"queryID,omitempty"` - Hits []Hit `json:"hits"` - // Text to search for in an index. + // Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. + Hits []Hit `json:"hits"` + // Search query. Query string `json:"query"` // URL-encoded string of all search parameters. Params string `json:"params"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_rules_params.go b/clients/algoliasearch-client-go/algolia/search/model_search_rules_params.go index 61fa43fd39..ed5f33f221 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_rules_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_rules_params.go @@ -10,19 +10,17 @@ import ( // SearchRulesParams Rules search parameters. type SearchRulesParams struct { - // Rule object query. + // Search query for rules. Query *string `json:"query,omitempty"` Anchoring *Anchoring `json:"anchoring,omitempty"` - // Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + // Only return rules that match the context (exact match). Context *string `json:"context,omitempty"` - // Requested page (the first page is page 0). + // Requested page of the API response. Page *int32 `json:"page,omitempty"` // Maximum number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` - // Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + // If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. Enabled utils.NullableBool `json:"enabled,omitempty"` - // Request options to send with the API call. - RequestOptions []map[string]interface{} `json:"requestOptions,omitempty"` } type SearchRulesParamsOption func(f *SearchRulesParams) @@ -63,12 +61,6 @@ func WithSearchRulesParamsEnabled(val utils.NullableBool) SearchRulesParamsOptio } } -func WithSearchRulesParamsRequestOptions(val []map[string]interface{}) SearchRulesParamsOption { - return func(f *SearchRulesParams) { - f.RequestOptions = val - } -} - // NewSearchRulesParams instantiates a new SearchRulesParams object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -295,39 +287,6 @@ func (o *SearchRulesParams) UnsetEnabled() { o.Enabled.Unset() } -// GetRequestOptions returns the RequestOptions field value if set, zero value otherwise. -func (o *SearchRulesParams) GetRequestOptions() []map[string]interface{} { - if o == nil || o.RequestOptions == nil { - var ret []map[string]interface{} - return ret - } - return o.RequestOptions -} - -// GetRequestOptionsOk returns a tuple with the RequestOptions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchRulesParams) GetRequestOptionsOk() ([]map[string]interface{}, bool) { - if o == nil || o.RequestOptions == nil { - return nil, false - } - return o.RequestOptions, true -} - -// HasRequestOptions returns a boolean if a field has been set. -func (o *SearchRulesParams) HasRequestOptions() bool { - if o != nil && o.RequestOptions != nil { - return true - } - - return false -} - -// SetRequestOptions gets a reference to the given []map[string]interface{} and assigns it to the RequestOptions field. -func (o *SearchRulesParams) SetRequestOptions(v []map[string]interface{}) *SearchRulesParams { - o.RequestOptions = v - return o -} - func (o SearchRulesParams) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Query != nil { @@ -348,9 +307,6 @@ func (o SearchRulesParams) MarshalJSON() ([]byte, error) { if o.Enabled.IsSet() { toSerialize["enabled"] = o.Enabled.Get() } - if o.RequestOptions != nil { - toSerialize["requestOptions"] = o.RequestOptions - } serialized, err := json.Marshal(toSerialize) if err != nil { return nil, fmt.Errorf("failed to marshal SearchRulesParams: %w", err) @@ -367,7 +323,6 @@ func (o SearchRulesParams) String() string { out += fmt.Sprintf(" page=%v\n", o.Page) out += fmt.Sprintf(" hitsPerPage=%v\n", o.HitsPerPage) out += fmt.Sprintf(" enabled=%v\n", o.Enabled) - out += fmt.Sprintf(" requestOptions=%v\n", o.RequestOptions) return fmt.Sprintf("SearchRulesParams {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_rules_response.go b/clients/algoliasearch-client-go/algolia/search/model_search_rules_response.go index 2603840e45..946f33b587 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_rules_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_rules_response.go @@ -8,9 +8,9 @@ import ( // SearchRulesResponse struct for SearchRulesResponse. type SearchRulesResponse struct { - // Fetched rules. + // Rules that matched the search criteria. Hits []Rule `json:"hits"` - // Number of fetched rules. + // Number of rules that matched the search criteria. NbHits int32 `json:"nbHits"` // Current page. Page int32 `json:"page"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_strategy.go b/clients/algoliasearch-client-go/algolia/search/model_search_strategy.go index 57f64cd089..9b4dd80b3f 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_strategy.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_strategy.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// SearchStrategy - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. +// SearchStrategy Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. type SearchStrategy string // List of searchStrategy. diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_params.go b/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_params.go index 6c9d139ac7..2d16515680 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_params.go @@ -8,10 +8,10 @@ import ( // SearchSynonymsParams struct for SearchSynonymsParams. type SearchSynonymsParams struct { - // Text to search for in an index. + // Search query. Query *string `json:"query,omitempty"` Type *SynonymType `json:"type,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_response.go b/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_response.go index 314db724ad..1a85fade37 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_synonyms_response.go @@ -8,9 +8,9 @@ import ( // SearchSynonymsResponse struct for SearchSynonymsResponse. type SearchSynonymsResponse struct { - // Synonym objects. + // Matching synonyms. Hits []SynonymHit `json:"hits"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` AdditionalProperties map[string]any } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_params.go b/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_params.go index 7139707da1..c32c37f726 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_params.go @@ -12,7 +12,7 @@ type SearchUserIdsParams struct { Query string `json:"query"` // Cluster name. ClusterName *string `json:"clusterName,omitempty"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page *int32 `json:"page,omitempty"` // Number of hits per page. HitsPerPage *int32 `json:"hitsPerPage,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_response.go b/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_response.go index bdee040da8..6d1cbc55fb 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_user_ids_response.go @@ -10,9 +10,9 @@ import ( type SearchUserIdsResponse struct { // User objects that match the query. Hits []UserHit `json:"hits"` - // Number of hits the search query matched. + // Number of results (hits). NbHits int32 `json:"nbHits"` - // Page to retrieve (the first page is `0`, not `1`). + // Page of search results to retrieve. Page int32 `json:"page"` // Maximum number of hits per page. HitsPerPage int32 `json:"hitsPerPage"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_secured_api_key_restrictions.go b/clients/algoliasearch-client-go/algolia/search/model_secured_api_key_restrictions.go index a5cb968072..59dae3de96 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_secured_api_key_restrictions.go +++ b/clients/algoliasearch-client-go/algolia/search/model_secured_api_key_restrictions.go @@ -9,15 +9,15 @@ import ( // SecuredAPIKeyRestrictions struct for SecuredAPIKeyRestrictions. type SecuredAPIKeyRestrictions struct { SearchParams *SearchParamsObject `json:"searchParams,omitempty"` - // Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + // Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. Filters *string `json:"filters,omitempty"` - // Unix timestamp used to set the expiration date of the API key. + // Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. ValidUntil *int64 `json:"validUntil,omitempty"` - // Index names that can be queried. + // Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". RestrictIndices []string `json:"restrictIndices,omitempty"` - // IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + // IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. RestrictSources *string `json:"restrictSources,omitempty"` - // Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + // Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. UserToken *string `json:"userToken,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_semantic_search.go b/clients/algoliasearch-client-go/algolia/search/model_semantic_search.go index b8a3b2ca9d..f4061183d4 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_semantic_search.go +++ b/clients/algoliasearch-client-go/algolia/search/model_semantic_search.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// SemanticSearch Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +// SemanticSearch Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. type SemanticSearch struct { - // Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + // Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. EventSources []string `json:"eventSources,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_snippet_result_option.go b/clients/algoliasearch-client-go/algolia/search/model_snippet_result_option.go index 47326df4ab..7aba2da488 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_snippet_result_option.go +++ b/clients/algoliasearch-client-go/algolia/search/model_snippet_result_option.go @@ -6,9 +6,9 @@ import ( "fmt" ) -// SnippetResultOption Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +// SnippetResultOption Snippets that show the context around a matching search query. type SnippetResultOption struct { - // Markup text with `facetQuery` matches highlighted. + // Highlighted attribute value, including HTML tags. Value string `json:"value"` MatchLevel MatchLevel `json:"matchLevel"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_sort_remaining_by.go b/clients/algoliasearch-client-go/algolia/search/model_sort_remaining_by.go index 32c863bf27..b7ee6533ed 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_sort_remaining_by.go +++ b/clients/algoliasearch-client-go/algolia/search/model_sort_remaining_by.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// SortRemainingBy How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. +// SortRemainingBy Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. type SortRemainingBy string // List of sortRemainingBy. diff --git a/clients/algoliasearch-client-go/algolia/search/model_tag_filters.go b/clients/algoliasearch-client-go/algolia/search/model_tag_filters.go index 92cad0ee6d..4e4ef6d1be 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_tag_filters.go +++ b/clients/algoliasearch-client-go/algolia/search/model_tag_filters.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TagFilters - [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +// TagFilters - Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. type TagFilters struct { ArrayOfMixedSearchFilters *[]MixedSearchFilters String *string diff --git a/clients/algoliasearch-client-go/algolia/search/model_task_status.go b/clients/algoliasearch-client-go/algolia/search/model_task_status.go index 10a129a83b..a893f1d0f5 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_task_status.go +++ b/clients/algoliasearch-client-go/algolia/search/model_task_status.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TaskStatus _published_ if the task has been processed, _notPublished_ otherwise. +// TaskStatus Task status, `published` if the task is completed, `notPublished` otherwise. type TaskStatus string // List of taskStatus. diff --git a/clients/algoliasearch-client-go/algolia/search/model_time_range.go b/clients/algoliasearch-client-go/algolia/search/model_time_range.go index 2de26a117e..7b6f4d7eaa 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_time_range.go +++ b/clients/algoliasearch-client-go/algolia/search/model_time_range.go @@ -8,9 +8,9 @@ import ( // TimeRange struct for TimeRange. type TimeRange struct { - // Lower bound of the time range (Unix timestamp). + // When the rule should start to be active, in Unix epoch time. From int32 `json:"from"` - // Upper bound of the time range (Unix timestamp). + // When the rule should stop to be active, in Unix epoch time. Until int32 `json:"until"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance.go b/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance.go index a4b9101ef8..db7e8db590 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance.go +++ b/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TypoTolerance - Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. +// TypoTolerance - Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. type TypoTolerance struct { TypoToleranceEnum *TypoToleranceEnum Bool *bool diff --git a/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance_enum.go b/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance_enum.go index 2d4d8d986c..918f8c3ec3 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance_enum.go +++ b/clients/algoliasearch-client-go/algolia/search/model_typo_tolerance_enum.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// TypoToleranceEnum the model 'TypoToleranceEnum'. +// TypoToleranceEnum - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. type TypoToleranceEnum string // List of typoToleranceEnum. diff --git a/clients/algoliasearch-client-go/algolia/search/model_updated_at_response.go b/clients/algoliasearch-client-go/algolia/search/model_updated_at_response.go index 05a10599dc..abad35beda 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_updated_at_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_updated_at_response.go @@ -8,7 +8,7 @@ import ( // UpdatedAtResponse Response, taskID, and update timestamp. type UpdatedAtResponse struct { - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` // Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. UpdatedAt string `json:"updatedAt"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_updated_at_with_object_id_response.go b/clients/algoliasearch-client-go/algolia/search/model_updated_at_with_object_id_response.go index 54382ad042..7b94cbcc4d 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_updated_at_with_object_id_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_updated_at_with_object_id_response.go @@ -8,11 +8,11 @@ import ( // UpdatedAtWithObjectIdResponse Response, taskID, unique object identifier, and an update timestamp. type UpdatedAtWithObjectIdResponse struct { - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID *int64 `json:"taskID,omitempty"` // Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. UpdatedAt *string `json:"updatedAt,omitempty"` - // Unique object identifier. + // Unique record identifier. ObjectID *string `json:"objectID,omitempty"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_updated_rule_response.go b/clients/algoliasearch-client-go/algolia/search/model_updated_rule_response.go index 2975513262..f135219f97 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_updated_rule_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_updated_rule_response.go @@ -8,11 +8,11 @@ import ( // UpdatedRuleResponse struct for UpdatedRuleResponse. type UpdatedRuleResponse struct { - // Unique object identifier. + // Unique identifier of a rule object. ObjectID string `json:"objectID"` // Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. UpdatedAt string `json:"updatedAt"` - // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + // Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. TaskID int64 `json:"taskID"` } diff --git a/clients/algoliasearch-client-go/algolia/search/model_user_hit.go b/clients/algoliasearch-client-go/algolia/search/model_user_hit.go index 422ddacb60..bd3d928012 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_user_hit.go +++ b/clients/algoliasearch-client-go/algolia/search/model_user_hit.go @@ -8,7 +8,7 @@ import ( // UserHit struct for UserHit. type UserHit struct { - // userID of the user. + // User ID. UserID string `json:"userID"` // Cluster name. ClusterName string `json:"clusterName"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_user_id.go b/clients/algoliasearch-client-go/algolia/search/model_user_id.go index eaffa1448b..ac4d6ada70 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_user_id.go +++ b/clients/algoliasearch-client-go/algolia/search/model_user_id.go @@ -8,7 +8,7 @@ import ( // UserId Unique user ID. type UserId struct { - // userID of the user. + // User ID. UserID string `json:"userID"` // Cluster to which the user is assigned. ClusterName string `json:"clusterName"` diff --git a/clients/algoliasearch-client-go/algolia/search/model_value.go b/clients/algoliasearch-client-go/algolia/search/model_value.go index dc61994e1a..3fa1b9357b 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_value.go +++ b/clients/algoliasearch-client-go/algolia/search/model_value.go @@ -8,7 +8,7 @@ import ( // Value struct for Value. type Value struct { - // Pinned order of facet lists. + // Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. Order []string `json:"order,omitempty"` SortRemainingBy *SortRemainingBy `json:"sortRemainingBy,omitempty"` } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AbtestingClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AbtestingClient.java index ccd0ad22ec..e63f86886e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AbtestingClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AbtestingClient.java @@ -635,9 +635,8 @@ public CompletableFuture getABTestAsync(@Nonnull Integer id) throws Algo /** * List all A/B tests. * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -657,9 +656,8 @@ public ListABTestsResponse listABTests( /** * List all A/B tests. * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -692,9 +690,8 @@ public ListABTestsResponse listABTests() throws AlgoliaRuntimeException { /** * (asynchronously) List all A/B tests. * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -723,9 +720,8 @@ public CompletableFuture listABTestsAsync( /** * (asynchronously) List all A/B tests. * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AnalyticsClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AnalyticsClient.java index 5f60709921..c0eb43aa90 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AnalyticsClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/AnalyticsClient.java @@ -484,11 +484,9 @@ public CompletableFuture customPutAsync(@Nonnull String path) throws Alg * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -513,11 +511,9 @@ public GetAverageClickPositionResponse getAverageClickPosition( * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -535,7 +531,7 @@ public GetAverageClickPositionResponse getAverageClickPosition(@Nonnull String i * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -551,7 +547,7 @@ public GetAverageClickPositionResponse getAverageClickPosition(@Nonnull String i * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetAverageClickPositionResponse getAverageClickPosition(@Nonnull String index) throws AlgoliaRuntimeException { @@ -564,11 +560,9 @@ public GetAverageClickPositionResponse getAverageClickPosition(@Nonnull String i * Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search * request where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -604,11 +598,9 @@ public CompletableFuture getAverageClickPositio * Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search * request where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -630,7 +622,7 @@ public CompletableFuture getAverageClickPositio * Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search * request where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -648,7 +640,7 @@ public CompletableFuture getAverageClickPositio * Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search * request where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getAverageClickPositionAsync(@Nonnull String index) @@ -662,11 +654,9 @@ public CompletableFuture getAverageClickPositio * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -691,11 +681,9 @@ public GetClickPositionsResponse getClickPositions( * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -713,7 +701,7 @@ public GetClickPositionsResponse getClickPositions(@Nonnull String index, String * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -728,7 +716,7 @@ public GetClickPositionsResponse getClickPositions(@Nonnull String index, Reques * receive any click events for tracked searches. A _tracked_ search is a search request where the * `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetClickPositionsResponse getClickPositions(@Nonnull String index) throws AlgoliaRuntimeException { @@ -741,11 +729,9 @@ public GetClickPositionsResponse getClickPositions(@Nonnull String index) throws * didn't receive any click events for tracked searches. A _tracked_ search is a search request * where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -781,11 +767,9 @@ public CompletableFuture getClickPositionsAsync( * didn't receive any click events for tracked searches. A _tracked_ search is a search request * where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -807,7 +791,7 @@ public CompletableFuture getClickPositionsAsync( * didn't receive any click events for tracked searches. A _tracked_ search is a search request * where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -823,7 +807,7 @@ public CompletableFuture getClickPositionsAsync(@Nonn * didn't receive any click events for tracked searches. A _tracked_ search is a search request * where the `clickAnalytics` parameter is `true`. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getClickPositionsAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -834,11 +818,9 @@ public CompletableFuture getClickPositionsAsync(@Nonn * Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -861,11 +843,9 @@ public GetClickThroughRateResponse getClickThroughRate( * Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -881,7 +861,7 @@ public GetClickThroughRateResponse getClickThroughRate(@Nonnull String index, St * Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -895,7 +875,7 @@ public GetClickThroughRateResponse getClickThroughRate(@Nonnull String index, Re * Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetClickThroughRateResponse getClickThroughRate(@Nonnull String index) throws AlgoliaRuntimeException { @@ -906,11 +886,9 @@ public GetClickThroughRateResponse getClickThroughRate(@Nonnull String index) th * (asynchronously) Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -944,11 +922,9 @@ public CompletableFuture getClickThroughRateAsync( * (asynchronously) Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -968,7 +944,7 @@ public CompletableFuture getClickThroughRateAsync( * (asynchronously) Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -982,7 +958,7 @@ public CompletableFuture getClickThroughRateAsync(@ * (asynchronously) Returns a [click-through rate * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getClickThroughRateAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -993,11 +969,9 @@ public CompletableFuture getClickThroughRateAsync(@ * Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1020,11 +994,9 @@ public GetConversationRateResponse getConversationRate( * Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1040,7 +1012,7 @@ public GetConversationRateResponse getConversationRate(@Nonnull String index, St * Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1054,7 +1026,7 @@ public GetConversationRateResponse getConversationRate(@Nonnull String index, Re * Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetConversationRateResponse getConversationRate(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1065,11 +1037,9 @@ public GetConversationRateResponse getConversationRate(@Nonnull String index) th * (asynchronously) Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1103,11 +1073,9 @@ public CompletableFuture getConversationRateAsync( * (asynchronously) Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1127,7 +1095,7 @@ public CompletableFuture getConversationRateAsync( * (asynchronously) Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1141,7 +1109,7 @@ public CompletableFuture getConversationRateAsync(@ * (asynchronously) Return a [conversion * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getConversationRateAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1153,11 +1121,9 @@ public CompletableFuture getConversationRateAsync(@ * the complete given time range, as well as a value per day. It also returns the count of * searches and searches without clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1181,11 +1147,9 @@ public GetNoClickRateResponse getNoClickRate( * the complete given time range, as well as a value per day. It also returns the count of * searches and searches without clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1202,7 +1166,7 @@ public GetNoClickRateResponse getNoClickRate(@Nonnull String index, String start * the complete given time range, as well as a value per day. It also returns the count of * searches and searches without clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1216,7 +1180,7 @@ public GetNoClickRateResponse getNoClickRate(@Nonnull String index, RequestOptio * the complete given time range, as well as a value per day. It also returns the count of * searches and searches without clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetNoClickRateResponse getNoClickRate(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1228,11 +1192,9 @@ public GetNoClickRateResponse getNoClickRate(@Nonnull String index) throws Algol * returns a value for the complete given time range, as well as a value per day. It also returns * the count of searches and searches without clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1267,11 +1229,9 @@ public CompletableFuture getNoClickRateAsync( * returns a value for the complete given time range, as well as a value per day. It also returns * the count of searches and searches without clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1292,7 +1252,7 @@ public CompletableFuture getNoClickRateAsync( * returns a value for the complete given time range, as well as a value per day. It also returns * the count of searches and searches without clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1307,7 +1267,7 @@ public CompletableFuture getNoClickRateAsync(@Nonnull St * returns a value for the complete given time range, as well as a value per day. It also returns * the count of searches and searches without clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getNoClickRateAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1317,11 +1277,9 @@ public CompletableFuture getNoClickRateAsync(@Nonnull St /** * Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1343,11 +1301,9 @@ public GetNoResultsRateResponse getNoResultsRate( /** * Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1362,7 +1318,7 @@ public GetNoResultsRateResponse getNoResultsRate(@Nonnull String index, String s /** * Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1374,7 +1330,7 @@ public GetNoResultsRateResponse getNoResultsRate(@Nonnull String index, RequestO /** * Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetNoResultsRateResponse getNoResultsRate(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1384,11 +1340,9 @@ public GetNoResultsRateResponse getNoResultsRate(@Nonnull String index) throws A /** * (asynchronously) Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1421,11 +1375,9 @@ public CompletableFuture getNoResultsRateAsync( /** * (asynchronously) Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1444,7 +1396,7 @@ public CompletableFuture getNoResultsRateAsync( /** * (asynchronously) Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1457,7 +1409,7 @@ public CompletableFuture getNoResultsRateAsync(@Nonnul /** * (asynchronously) Returns the rate at which searches didn't return any results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getNoResultsRateAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1467,11 +1419,9 @@ public CompletableFuture getNoResultsRateAsync(@Nonnul /** * Returns the number of searches within a time range. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1493,11 +1443,9 @@ public GetSearchesCountResponse getSearchesCount( /** * Returns the number of searches within a time range. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1512,7 +1460,7 @@ public GetSearchesCountResponse getSearchesCount(@Nonnull String index, String s /** * Returns the number of searches within a time range. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1524,7 +1472,7 @@ public GetSearchesCountResponse getSearchesCount(@Nonnull String index, RequestO /** * Returns the number of searches within a time range. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetSearchesCountResponse getSearchesCount(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1534,11 +1482,9 @@ public GetSearchesCountResponse getSearchesCount(@Nonnull String index) throws A /** * (asynchronously) Returns the number of searches within a time range. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1571,11 +1517,9 @@ public CompletableFuture getSearchesCountAsync( /** * (asynchronously) Returns the number of searches within a time range. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1594,7 +1538,7 @@ public CompletableFuture getSearchesCountAsync( /** * (asynchronously) Returns the number of searches within a time range. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1607,7 +1551,7 @@ public CompletableFuture getSearchesCountAsync(@Nonnul /** * (asynchronously) Returns the number of searches within a time range. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getSearchesCountAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1617,14 +1561,11 @@ public CompletableFuture getSearchesCountAsync(@Nonnul /** * Return the most popular of the last 1,000 searches that didn't lead to any clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1648,14 +1589,11 @@ public GetSearchesNoClicksResponse getSearchesNoClicks( /** * Return the most popular of the last 1,000 searches that didn't lead to any clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1676,7 +1614,7 @@ public GetSearchesNoClicksResponse getSearchesNoClicks( /** * Return the most popular of the last 1,000 searches that didn't lead to any clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1689,7 +1627,7 @@ public GetSearchesNoClicksResponse getSearchesNoClicks(@Nonnull String index, Re /** * Return the most popular of the last 1,000 searches that didn't lead to any clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetSearchesNoClicksResponse getSearchesNoClicks(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1700,14 +1638,11 @@ public GetSearchesNoClicksResponse getSearchesNoClicks(@Nonnull String index) th * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any * clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1745,14 +1680,11 @@ public CompletableFuture getSearchesNoClicksAsync( * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any * clicks. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1774,7 +1706,7 @@ public CompletableFuture getSearchesNoClicksAsync( * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any * clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1788,7 +1720,7 @@ public CompletableFuture getSearchesNoClicksAsync(@ * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any * clicks. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getSearchesNoClicksAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1798,14 +1730,11 @@ public CompletableFuture getSearchesNoClicksAsync(@ /** * Returns the most popular of the latest 1,000 searches that didn't return any results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1829,14 +1758,11 @@ public GetSearchesNoResultsResponse getSearchesNoResults( /** * Returns the most popular of the latest 1,000 searches that didn't return any results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1857,7 +1783,7 @@ public GetSearchesNoResultsResponse getSearchesNoResults( /** * Returns the most popular of the latest 1,000 searches that didn't return any results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1870,7 +1796,7 @@ public GetSearchesNoResultsResponse getSearchesNoResults(@Nonnull String index, /** * Returns the most popular of the latest 1,000 searches that didn't return any results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetSearchesNoResultsResponse getSearchesNoResults(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1881,14 +1807,11 @@ public GetSearchesNoResultsResponse getSearchesNoResults(@Nonnull String index) * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return any * results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1926,14 +1849,11 @@ public CompletableFuture getSearchesNoResultsAsync * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return any * results. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -1955,7 +1875,7 @@ public CompletableFuture getSearchesNoResultsAsync * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return any * results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1969,7 +1889,7 @@ public CompletableFuture getSearchesNoResultsAsync * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return any * results. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getSearchesNoResultsAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -1981,7 +1901,7 @@ public CompletableFuture getSearchesNoResultsAsync * created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The * Analytics API is updated every 5 minutes. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1995,7 +1915,7 @@ public GetStatusResponse getStatus(@Nonnull String index, RequestOptions request * created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The * Analytics API is updated every 5 minutes. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetStatusResponse getStatus(@Nonnull String index) throws AlgoliaRuntimeException { @@ -2007,7 +1927,7 @@ public GetStatusResponse getStatus(@Nonnull String index) throws AlgoliaRuntimeE * has been recently created or no search has been performed yet, `updatedAt` will be `null`. > * **Note**: The Analytics API is updated every 5 minutes. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2025,7 +1945,7 @@ public CompletableFuture getStatusAsync(@Nonnull String index * has been recently created or no search has been performed yet, `updatedAt` will be `null`. > * **Note**: The Analytics API is updated every 5 minutes. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getStatusAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -2035,14 +1955,11 @@ public CompletableFuture getStatusAsync(@Nonnull String index /** * Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2066,14 +1983,11 @@ public GetTopCountriesResponse getTopCountries( /** * Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2094,7 +2008,7 @@ public GetTopCountriesResponse getTopCountries( /** * Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2106,7 +2020,7 @@ public GetTopCountriesResponse getTopCountries(@Nonnull String index, RequestOpt /** * Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetTopCountriesResponse getTopCountries(@Nonnull String index) throws AlgoliaRuntimeException { @@ -2116,14 +2030,11 @@ public GetTopCountriesResponse getTopCountries(@Nonnull String index) throws Alg /** * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2160,14 +2071,11 @@ public CompletableFuture getTopCountriesAsync( /** * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2188,7 +2096,7 @@ public CompletableFuture getTopCountriesAsync( /** * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2201,7 +2109,7 @@ public CompletableFuture getTopCountriesAsync(@Nonnull /** * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getTopCountriesAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -2213,15 +2121,12 @@ public CompletableFuture getTopCountriesAsync(@Nonnull * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2248,15 +2153,12 @@ public GetTopFilterAttributesResponse getTopFilterAttributes( * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2280,7 +2182,7 @@ public GetTopFilterAttributesResponse getTopFilterAttributes( * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2295,7 +2197,7 @@ public GetTopFilterAttributesResponse getTopFilterAttributes(@Nonnull String ind * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetTopFilterAttributesResponse getTopFilterAttributes(@Nonnull String index) throws AlgoliaRuntimeException { @@ -2307,15 +2209,12 @@ public GetTopFilterAttributesResponse getTopFilterAttributes(@Nonnull String ind * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2356,15 +2255,12 @@ public CompletableFuture getTopFilterAttributesA * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2388,7 +2284,7 @@ public CompletableFuture getTopFilterAttributesA * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2405,7 +2301,7 @@ public CompletableFuture getTopFilterAttributesA * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in * the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getTopFilterAttributesAsync(@Nonnull String index) @@ -2418,15 +2314,12 @@ public CompletableFuture getTopFilterAttributesA * filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2456,15 +2349,12 @@ public GetTopFilterForAttributeResponse getTopFilterForAttribute( * filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2489,7 +2379,7 @@ public GetTopFilterForAttributeResponse getTopFilterForAttribute( * filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2507,7 +2397,7 @@ public GetTopFilterForAttributeResponse getTopFilterForAttribute( * filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetTopFilterForAttributeResponse getTopFilterForAttribute(@Nonnull String attribute, @Nonnull String index) @@ -2520,15 +2410,12 @@ public GetTopFilterForAttributeResponse getTopFilterForAttribute(@Nonnull String * recently used filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2572,15 +2459,12 @@ public CompletableFuture getTopFilterForAttrib * recently used filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2605,7 +2489,7 @@ public CompletableFuture getTopFilterForAttrib * recently used filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2623,7 +2507,7 @@ public CompletableFuture getTopFilterForAttrib * recently used filters. * * @param attribute Attribute name. (required) - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getTopFilterForAttributeAsync( @@ -2637,15 +2521,12 @@ public CompletableFuture getTopFilterForAttrib * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 * most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2671,15 +2552,12 @@ public GetTopFiltersNoResultsResponse getTopFiltersNoResults( * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 * most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2702,7 +2580,7 @@ public GetTopFiltersNoResultsResponse getTopFiltersNoResults( * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 * most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2716,7 +2594,7 @@ public GetTopFiltersNoResultsResponse getTopFiltersNoResults(@Nonnull String ind * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 * most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetTopFiltersNoResultsResponse getTopFiltersNoResults(@Nonnull String index) throws AlgoliaRuntimeException { @@ -2727,15 +2605,12 @@ public GetTopFiltersNoResultsResponse getTopFiltersNoResults(@Nonnull String ind * (asynchronously) Returns top filters for filter-enabled searches that don't return results. * Limited to the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2775,15 +2650,12 @@ public CompletableFuture getTopFiltersNoResultsA * (asynchronously) Returns top filters for filter-enabled searches that don't return results. * Limited to the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2806,7 +2678,7 @@ public CompletableFuture getTopFiltersNoResultsA * (asynchronously) Returns top filters for filter-enabled searches that don't return results. * Limited to the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2822,7 +2694,7 @@ public CompletableFuture getTopFiltersNoResultsA * (asynchronously) Returns top filters for filter-enabled searches that don't return results. * Limited to the 1,000 most recently used filters. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getTopFiltersNoResultsAsync(@Nonnull String index) @@ -2833,18 +2705,15 @@ public CompletableFuture getTopFiltersNoResultsA /** * Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2870,18 +2739,15 @@ public GetTopHitsResponse getTopHits( /** * Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2904,7 +2770,7 @@ public GetTopHitsResponse getTopHits( /** * Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2916,7 +2782,7 @@ public GetTopHitsResponse getTopHits(@Nonnull String index, RequestOptions reque /** * Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetTopHitsResponse getTopHits(@Nonnull String index) throws AlgoliaRuntimeException { @@ -2926,18 +2792,15 @@ public GetTopHitsResponse getTopHits(@Nonnull String index) throws AlgoliaRuntim /** * (asynchronously) Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -2978,18 +2841,15 @@ public CompletableFuture getTopHitsAsync( /** * (asynchronously) Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param search User query. (optional) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3012,7 +2872,7 @@ public CompletableFuture getTopHitsAsync( /** * (asynchronously) Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3025,7 +2885,7 @@ public CompletableFuture getTopHitsAsync(@Nonnull String ind /** * (asynchronously) Return the most popular clicked results in the last 1,000 searches. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getTopHitsAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -3036,20 +2896,17 @@ public CompletableFuture getTopHitsAsync(@Nonnull String ind * Returns the most popular of the latest 1,000 searches. For each search, also returns the number * of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param orderBy Reorder the results. (optional, default to searchCount) * @param direction Sorting direction of the results: ascending or descending. (optional, default * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3079,20 +2936,17 @@ public GetTopSearchesResponse getTopSearches( * Returns the most popular of the latest 1,000 searches. For each search, also returns the number * of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param orderBy Reorder the results. (optional, default to searchCount) * @param direction Sorting direction of the results: ascending or descending. (optional, default * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3117,7 +2971,7 @@ public GetTopSearchesResponse getTopSearches( * Returns the most popular of the latest 1,000 searches. For each search, also returns the number * of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3130,7 +2984,7 @@ public GetTopSearchesResponse getTopSearches(@Nonnull String index, RequestOptio * Returns the most popular of the latest 1,000 searches. For each search, also returns the number * of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetTopSearchesResponse getTopSearches(@Nonnull String index) throws AlgoliaRuntimeException { @@ -3141,20 +2995,17 @@ public GetTopSearchesResponse getTopSearches(@Nonnull String index) throws Algol * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also * returns the number of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param orderBy Reorder the results. (optional, default to searchCount) * @param direction Sorting direction of the results: ascending or descending. (optional, default * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3198,20 +3049,17 @@ public CompletableFuture getTopSearchesAsync( * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also * returns the number of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param clickAnalytics Whether to include [click and * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param orderBy Reorder the results. (optional, default to searchCount) * @param direction Sorting direction of the results: ascending or descending. (optional, default * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) + * @param limit Number of items to return. (optional, default to 10) + * @param offset Position of the first item to return. (optional, default to 0) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3236,7 +3084,7 @@ public CompletableFuture getTopSearchesAsync( * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also * returns the number of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3250,7 +3098,7 @@ public CompletableFuture getTopSearchesAsync(@Nonnull St * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also * returns the number of hits. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getTopSearchesAsync(@Nonnull String index) throws AlgoliaRuntimeException { @@ -3260,11 +3108,9 @@ public CompletableFuture getTopSearchesAsync(@Nonnull St /** * Return the count of unique users. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3286,11 +3132,9 @@ public GetUsersCountResponse getUsersCount( /** * Return the count of unique users. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3305,7 +3149,7 @@ public GetUsersCountResponse getUsersCount(@Nonnull String index, String startDa /** * Return the count of unique users. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3317,7 +3161,7 @@ public GetUsersCountResponse getUsersCount(@Nonnull String index, RequestOptions /** * Return the count of unique users. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public GetUsersCountResponse getUsersCount(@Nonnull String index) throws AlgoliaRuntimeException { @@ -3327,11 +3171,9 @@ public GetUsersCountResponse getUsersCount(@Nonnull String index) throws Algolia /** * (asynchronously) Return the count of unique users. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3364,11 +3206,9 @@ public CompletableFuture getUsersCountAsync( /** * (asynchronously) Return the count of unique users. * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) + * @param index Index name. (required) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param tags Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag @@ -3383,7 +3223,7 @@ public CompletableFuture getUsersCountAsync(@Nonnull Stri /** * (asynchronously) Return the count of unique users. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3396,7 +3236,7 @@ public CompletableFuture getUsersCountAsync(@Nonnull Stri /** * (asynchronously) Return the count of unique users. * - * @param index Index name to target. (required) + * @param index Index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getUsersCountAsync(@Nonnull String index) throws AlgoliaRuntimeException { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/RecommendClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/RecommendClient.java index 2408ce37c5..f2e69d8336 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/RecommendClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/RecommendClient.java @@ -467,11 +467,11 @@ public CompletableFuture customPutAsync(@Nonnull String path) throws Alg /** * Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -488,11 +488,11 @@ public DeletedAtResponse deleteRecommendRule( /** * Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public DeletedAtResponse deleteRecommendRule(@Nonnull String indexName, @Nonnull RecommendModels model, @Nonnull String objectID) @@ -504,11 +504,11 @@ public DeletedAtResponse deleteRecommendRule(@Nonnull String indexName, @Nonnull * (asynchronously) Delete a [Recommend * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -537,11 +537,11 @@ public CompletableFuture deleteRecommendRuleAsync( * (asynchronously) Delete a [Recommend * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture deleteRecommendRuleAsync( @@ -555,11 +555,11 @@ public CompletableFuture deleteRecommendRuleAsync( /** * Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -576,11 +576,11 @@ public RuleResponse getRecommendRule( /** * Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public RuleResponse getRecommendRule(@Nonnull String indexName, @Nonnull RecommendModels model, @Nonnull String objectID) @@ -592,11 +592,11 @@ public RuleResponse getRecommendRule(@Nonnull String indexName, @Nonnull Recomme * (asynchronously) Return a [Recommend * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -625,11 +625,11 @@ public CompletableFuture getRecommendRuleAsync( * (asynchronously) Return a [Recommend * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) - * @param objectID Unique record (object) identifier. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getRecommendRuleAsync( @@ -644,7 +644,7 @@ public CompletableFuture getRecommendRuleAsync( * Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use * this value here to check the status of that task. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -666,7 +666,7 @@ public GetRecommendTaskResponse getRecommendStatus( * Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use * this value here to check the status of that task. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -682,7 +682,7 @@ public GetRecommendTaskResponse getRecommendStatus(@Nonnull String indexName, @N * (asynchronously) Some operations, such as deleting a Recommend rule, will respond with a * `taskID` value. Use this value here to check the status of that task. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -715,7 +715,7 @@ public CompletableFuture getRecommendStatusAsync( * (asynchronously) Some operations, such as deleting a Recommend rule, will respond with a * `taskID` value. Use this value here to check the status of that task. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -821,7 +821,7 @@ public CompletableFuture getRecommendationsAsync(@No /** * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -842,7 +842,7 @@ public SearchRecommendRulesResponse searchRecommendRules( /** * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -860,7 +860,7 @@ public SearchRecommendRulesResponse searchRecommendRules( /** * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -879,7 +879,7 @@ public SearchRecommendRulesResponse searchRecommendRules( /** * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -894,7 +894,7 @@ public SearchRecommendRulesResponse searchRecommendRules(@Nonnull String indexNa * (asynchronously) List [Recommend * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -927,7 +927,7 @@ public CompletableFuture searchRecommendRulesAsync * (asynchronously) List [Recommend * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -946,7 +946,7 @@ public CompletableFuture searchRecommendRulesAsync * (asynchronously) List [Recommend * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) @@ -966,7 +966,7 @@ public CompletableFuture searchRecommendRulesAsync * (asynchronously) List [Recommend * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param model [Recommend * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * (required) diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java index 7dedb6ed95..581b65bcd2 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java @@ -48,8 +48,7 @@ private static List getDefaultHosts(String appId) { } /** - * Add a new API key with specific permissions and restrictions. The request must be authenticated - * with the admin API key. The response returns an API key string. + * Creates a new API key with specific permissions and restrictions. * * @param apiKey (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -61,8 +60,7 @@ public AddApiKeyResponse addApiKey(@Nonnull ApiKey apiKey, RequestOptions reques } /** - * Add a new API key with specific permissions and restrictions. The request must be authenticated - * with the admin API key. The response returns an API key string. + * Creates a new API key with specific permissions and restrictions. * * @param apiKey (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -72,8 +70,7 @@ public AddApiKeyResponse addApiKey(@Nonnull ApiKey apiKey) throws AlgoliaRuntime } /** - * (asynchronously) Add a new API key with specific permissions and restrictions. The request must - * be authenticated with the admin API key. The response returns an API key string. + * (asynchronously) Creates a new API key with specific permissions and restrictions. * * @param apiKey (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -90,8 +87,7 @@ public CompletableFuture addApiKeyAsync(@Nonnull ApiKey apiKe } /** - * (asynchronously) Add a new API key with specific permissions and restrictions. The request must - * be authenticated with the admin API key. The response returns an API key string. + * (asynchronously) Creates a new API key with specific permissions and restrictions. * * @param apiKey (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -101,14 +97,15 @@ public CompletableFuture addApiKeyAsync(@Nonnull ApiKey apiKe } /** - * If you use an existing `objectID`, the existing record will be replaced with the new one. To - * update only some attributes of an existing record, use the [`partial` - * operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your - * index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a + * new record is added to the index. To update _some_ attributes of an existing record, use the + * [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or + * replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -123,14 +120,15 @@ public UpdatedAtWithObjectIdResponse addOrUpdateObject( } /** - * If you use an existing `objectID`, the existing record will be replaced with the new one. To - * update only some attributes of an existing record, use the [`partial` - * operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your - * index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a + * new record is added to the index. To update _some_ attributes of an existing record, use the + * [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or + * replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtWithObjectIdResponse addOrUpdateObject(@Nonnull String indexName, @Nonnull String objectID, @Nonnull Object body) @@ -139,14 +137,16 @@ public UpdatedAtWithObjectIdResponse addOrUpdateObject(@Nonnull String indexName } /** - * (asynchronously) If you use an existing `objectID`, the existing record will be replaced with - * the new one. To update only some attributes of an existing record, use the [`partial` - * operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your - * index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * (asynchronously) If a record with the specified object ID exists, the existing record is + * replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an + * existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) + * instead. To add, update, or replace multiple records, use the [`batch` + * operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -173,14 +173,16 @@ public CompletableFuture addOrUpdateObjectAsync( } /** - * (asynchronously) If you use an existing `objectID`, the existing record will be replaced with - * the new one. To update only some attributes of an existing record, use the [`partial` - * operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your - * index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * (asynchronously) If a record with the specified object ID exists, the existing record is + * replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an + * existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) + * instead. To add, update, or replace multiple records, use the [`batch` + * operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture addOrUpdateObjectAsync( @@ -192,7 +194,7 @@ public CompletableFuture addOrUpdateObjectAsync( } /** - * Add a source to the list of allowed sources. + * Adds a source to the list of allowed sources. * * @param source Source to add. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -204,7 +206,7 @@ public CreatedAtResponse appendSource(@Nonnull Source source, RequestOptions req } /** - * Add a source to the list of allowed sources. + * Adds a source to the list of allowed sources. * * @param source Source to add. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -214,7 +216,7 @@ public CreatedAtResponse appendSource(@Nonnull Source source) throws AlgoliaRunt } /** - * (asynchronously) Add a source to the list of allowed sources. + * (asynchronously) Adds a source to the list of allowed sources. * * @param source Source to add. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -230,7 +232,7 @@ public CompletableFuture appendSourceAsync(@Nonnull Source so } /** - * (asynchronously) Add a source to the list of allowed sources. + * (asynchronously) Adds a source to the list of allowed sources. * * @param source Source to add. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -240,10 +242,10 @@ public CompletableFuture appendSourceAsync(@Nonnull Source so } /** - * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the - * amount of data linked to the user ID. + * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to + * the amount of data linked to the user ID. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param assignUserIdParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -258,10 +260,10 @@ public CreatedAtResponse assignUserId( } /** - * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the - * amount of data linked to the user ID. + * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to + * the amount of data linked to the user ID. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param assignUserIdParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -271,10 +273,10 @@ public CreatedAtResponse assignUserId(@Nonnull String xAlgoliaUserID, @Nonnull A } /** - * (asynchronously) Assign or move a user ID to a cluster. The time it takes to move a user is + * (asynchronously) Assigns or moves a user ID to a cluster. The time it takes to move a user is * proportional to the amount of data linked to the user ID. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param assignUserIdParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -300,10 +302,10 @@ public CompletableFuture assignUserIdAsync( } /** - * (asynchronously) Assign or move a user ID to a cluster. The time it takes to move a user is + * (asynchronously) Assigns or moves a user ID to a cluster. The time it takes to move a user is * proportional to the amount of data linked to the user ID. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param assignUserIdParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -315,11 +317,11 @@ public CompletableFuture assignUserIdAsync( } /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single API call. Actions are applied in the order they are specified. The supported `action`s - * are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in one index with a single API request. Batching index + * updates reduces latency and increases data integrity. - Actions are applied in the order + * they're specified. - Actions are equivalent to the individual API requests of the same name. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param batchWriteParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -331,11 +333,11 @@ public BatchResponse batch(@Nonnull String indexName, @Nonnull BatchWriteParams } /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single API call. Actions are applied in the order they are specified. The supported `action`s - * are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in one index with a single API request. Batching index + * updates reduces latency and increases data integrity. - Actions are applied in the order + * they're specified. - Actions are equivalent to the individual API requests of the same name. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param batchWriteParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -344,11 +346,12 @@ public BatchResponse batch(@Nonnull String indexName, @Nonnull BatchWriteParams } /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single API call. Actions are applied in the order they are specified. The - * supported `action`s are equivalent to the individual operations of the same name. + * (asynchronously) Adds, updates, or deletes records in one index with a single API request. + * Batching index updates reduces latency and increases data integrity. - Actions are applied in + * the order they're specified. - Actions are equivalent to the individual API requests of the + * same name. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param batchWriteParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -373,11 +376,12 @@ public CompletableFuture batchAsync( } /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single API call. Actions are applied in the order they are specified. The - * supported `action`s are equivalent to the individual operations of the same name. + * (asynchronously) Adds, updates, or deletes records in one index with a single API request. + * Batching index updates reduces latency and increases data integrity. - Actions are applied in + * the order they're specified. - Actions are equivalent to the individual API requests of the + * same name. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param batchWriteParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -387,9 +391,9 @@ public CompletableFuture batchAsync(@Nonnull String indexName, @N } /** - * Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + * Assigns multiple user IDs to a cluster. **You can't move users with this operation**. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param batchAssignUserIdsParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -404,9 +408,9 @@ public CreatedAtResponse batchAssignUserIds( } /** - * Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + * Assigns multiple user IDs to a cluster. **You can't move users with this operation**. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param batchAssignUserIdsParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -416,10 +420,10 @@ public CreatedAtResponse batchAssignUserIds(@Nonnull String xAlgoliaUserID, @Non } /** - * (asynchronously) Assign multiple user IDs to a cluster. **You can't _move_ users with this - * operation.**. + * (asynchronously) Assigns multiple user IDs to a cluster. **You can't move users with this + * operation**. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param batchAssignUserIdsParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -448,10 +452,10 @@ public CompletableFuture batchAssignUserIdsAsync( } /** - * (asynchronously) Assign multiple user IDs to a cluster. **You can't _move_ users with this - * operation.**. + * (asynchronously) Assigns multiple user IDs to a cluster. **You can't move users with this + * operation**. * - * @param xAlgoliaUserID userID to assign. (required) + * @param xAlgoliaUserID User ID to assign. (required) * @param batchAssignUserIdsParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -463,9 +467,9 @@ public CompletableFuture batchAssignUserIdsAsync( } /** - * Add or remove a batch of dictionary entries. + * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param batchDictionaryEntriesParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -480,9 +484,9 @@ public UpdatedAtResponse batchDictionaryEntries( } /** - * Add or remove a batch of dictionary entries. + * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param batchDictionaryEntriesParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -494,9 +498,10 @@ public UpdatedAtResponse batchDictionaryEntries( } /** - * (asynchronously) Add or remove a batch of dictionary entries. + * (asynchronously) Adds or deletes multiple entries from your plurals, segmentation, or stop word + * dictionaries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param batchDictionaryEntriesParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -524,9 +529,10 @@ public CompletableFuture batchDictionaryEntriesAsync( } /** - * (asynchronously) Add or remove a batch of dictionary entries. + * (asynchronously) Adds or deletes multiple entries from your plurals, segmentation, or stop word + * dictionaries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param batchDictionaryEntriesParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -538,11 +544,14 @@ public CompletableFuture batchDictionaryEntriesAsync( } /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. + * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ + * (records augmented with attributes for highlighting and ranking details), browsing _just_ + * returns matching records. This can be useful if you want to export your indices. - The + * Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and + * custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: + * typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param browseParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -559,11 +568,14 @@ public BrowseResponse browse( } /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. + * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ + * (records augmented with attributes for highlighting and ranking details), browsing _just_ + * returns matching records. This can be useful if you want to export your indices. - The + * Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and + * custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: + * typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param browseParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -574,11 +586,14 @@ public BrowseResponse browse(@Nonnull String indexName, BrowseParams brow } /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. + * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ + * (records augmented with attributes for highlighting and ranking details), browsing _just_ + * returns matching records. This can be useful if you want to export your indices. - The + * Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and + * custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: + * typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -590,11 +605,14 @@ public BrowseResponse browse(@Nonnull String indexName, Class innerTyp } /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. + * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ + * (records augmented with attributes for highlighting and ranking details), browsing _just_ + * returns matching records. This can be useful if you want to export your indices. - The + * Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and + * custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: + * typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -603,11 +621,14 @@ public BrowseResponse browse(@Nonnull String indexName, Class innerTyp } /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - Sorting by - * typos, proximity, words, or geographical distance. + * (asynchronously) Retrieves records from an index, up to 1,000 per request. While searching + * retrieves _hits_ (records augmented with attributes for highlighting and ranking details), + * browsing _just_ returns matching records. This can be useful if you want to export your + * indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by + * attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking + * for: typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param browseParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -632,11 +653,14 @@ public CompletableFuture> browseAsync( } /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - Sorting by - * typos, proximity, words, or geographical distance. + * (asynchronously) Retrieves records from an index, up to 1,000 per request. While searching + * retrieves _hits_ (records augmented with attributes for highlighting and ranking details), + * browsing _just_ returns matching records. This can be useful if you want to export your + * indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by + * attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking + * for: typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param browseParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -647,11 +671,14 @@ public CompletableFuture> browseAsync(@Nonnull String inde } /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - Sorting by - * typos, proximity, words, or geographical distance. + * (asynchronously) Retrieves records from an index, up to 1,000 per request. While searching + * retrieves _hits_ (records augmented with attributes for highlighting and ranking details), + * browsing _just_ returns matching records. This can be useful if you want to export your + * indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by + * attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking + * for: typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -663,11 +690,14 @@ public CompletableFuture> browseAsync(@Nonnull String inde } /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - Sorting by - * typos, proximity, words, or geographical distance. + * (asynchronously) Retrieves records from an index, up to 1,000 per request. While searching + * retrieves _hits_ (records augmented with attributes for highlighting and ranking details), + * browsing _just_ returns matching records. This can be useful if you want to export your + * indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by + * attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking + * for: typo-tolerance, number of matched words, proximity, geo distance. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -677,9 +707,9 @@ public CompletableFuture> browseAsync(@Nonnull String inde } /** - * Delete the records but leave settings and index-specific API keys untouched. + * Deletes only the records from an index while keeping settings, synonyms, and rules. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -689,9 +719,9 @@ public UpdatedAtResponse clearObjects(@Nonnull String indexName, RequestOptions } /** - * Delete the records but leave settings and index-specific API keys untouched. + * Deletes only the records from an index while keeping settings, synonyms, and rules. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse clearObjects(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -699,9 +729,10 @@ public UpdatedAtResponse clearObjects(@Nonnull String indexName) throws AlgoliaR } /** - * (asynchronously) Delete the records but leave settings and index-specific API keys untouched. + * (asynchronously) Deletes only the records from an index while keeping settings, synonyms, and + * rules. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -715,9 +746,10 @@ public CompletableFuture clearObjectsAsync(@Nonnull String in } /** - * (asynchronously) Delete the records but leave settings and index-specific API keys untouched. + * (asynchronously) Deletes only the records from an index while keeping settings, synonyms, and + * rules. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture clearObjectsAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -725,11 +757,10 @@ public CompletableFuture clearObjectsAsync(@Nonnull String in } /** - * Delete all rules in the index. + * Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -740,11 +771,10 @@ public UpdatedAtResponse clearRules(@Nonnull String indexName, Boolean forwardTo } /** - * Delete all rules in the index. + * Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse clearRules(@Nonnull String indexName, Boolean forwardToReplicas) throws AlgoliaRuntimeException { @@ -752,9 +782,9 @@ public UpdatedAtResponse clearRules(@Nonnull String indexName, Boolean forwardTo } /** - * Delete all rules in the index. + * Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -764,9 +794,9 @@ public UpdatedAtResponse clearRules(@Nonnull String indexName, RequestOptions re } /** - * Delete all rules in the index. + * Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse clearRules(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -774,11 +804,10 @@ public UpdatedAtResponse clearRules(@Nonnull String indexName) throws AlgoliaRun } /** - * (asynchronously) Delete all rules in the index. + * (asynchronously) Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -800,11 +829,10 @@ public CompletableFuture clearRulesAsync( } /** - * (asynchronously) Delete all rules in the index. + * (asynchronously) Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture clearRulesAsync(@Nonnull String indexName, Boolean forwardToReplicas) @@ -813,9 +841,9 @@ public CompletableFuture clearRulesAsync(@Nonnull String inde } /** - * (asynchronously) Delete all rules in the index. + * (asynchronously) Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -826,9 +854,9 @@ public CompletableFuture clearRulesAsync(@Nonnull String inde } /** - * (asynchronously) Delete all rules in the index. + * (asynchronously) Deletes all rules from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture clearRulesAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -836,11 +864,10 @@ public CompletableFuture clearRulesAsync(@Nonnull String inde } /** - * Delete all synonyms in the index. + * Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -851,11 +878,10 @@ public UpdatedAtResponse clearSynonyms(@Nonnull String indexName, Boolean forwar } /** - * Delete all synonyms in the index. + * Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse clearSynonyms(@Nonnull String indexName, Boolean forwardToReplicas) throws AlgoliaRuntimeException { @@ -863,9 +889,9 @@ public UpdatedAtResponse clearSynonyms(@Nonnull String indexName, Boolean forwar } /** - * Delete all synonyms in the index. + * Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -875,9 +901,9 @@ public UpdatedAtResponse clearSynonyms(@Nonnull String indexName, RequestOptions } /** - * Delete all synonyms in the index. + * Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse clearSynonyms(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -885,11 +911,10 @@ public UpdatedAtResponse clearSynonyms(@Nonnull String indexName) throws Algolia } /** - * (asynchronously) Delete all synonyms in the index. + * (asynchronously) Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -911,11 +936,10 @@ public CompletableFuture clearSynonymsAsync( } /** - * (asynchronously) Delete all synonyms in the index. + * (asynchronously) Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param indexName Name of the index on which to perform the operation. (required) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture clearSynonymsAsync(@Nonnull String indexName, Boolean forwardToReplicas) @@ -924,9 +948,9 @@ public CompletableFuture clearSynonymsAsync(@Nonnull String i } /** - * (asynchronously) Delete all synonyms in the index. + * (asynchronously) Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -937,9 +961,9 @@ public CompletableFuture clearSynonymsAsync(@Nonnull String i } /** - * (asynchronously) Delete all synonyms in the index. + * (asynchronously) Deletes all synonyms from the index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture clearSynonymsAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -1365,7 +1389,7 @@ public CompletableFuture customPutAsync(@Nonnull String path) throws Alg } /** - * Delete an existing API key. The request must be authenticated with the admin API key. + * Deletes the API key. * * @param key API key. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -1377,7 +1401,7 @@ public DeleteApiKeyResponse deleteApiKey(@Nonnull String key, RequestOptions req } /** - * Delete an existing API key. The request must be authenticated with the admin API key. + * Deletes the API key. * * @param key API key. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1387,8 +1411,7 @@ public DeleteApiKeyResponse deleteApiKey(@Nonnull String key) throws AlgoliaRunt } /** - * (asynchronously) Delete an existing API key. The request must be authenticated with the admin - * API key. + * (asynchronously) Deletes the API key. * * @param key API key. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -1405,8 +1428,7 @@ public CompletableFuture deleteApiKeyAsync(@Nonnull String } /** - * (asynchronously) Delete an existing API key. The request must be authenticated with the admin - * API key. + * (asynchronously) Deletes the API key. * * @param key API key. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1416,10 +1438,11 @@ public CompletableFuture deleteApiKeyAsync(@Nonnull String } /** - * This operation doesn't support all the query options, only its filters (numeric, facet, or tag) - * and geo queries. It doesn't accept empty filters or queries. + * This operation doesn't accept empty queries or filters. It's more efficient to get a list of + * object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the + * records using the [`batch` operation](tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param deleteByParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -1431,10 +1454,11 @@ public DeletedAtResponse deleteBy(@Nonnull String indexName, @Nonnull DeleteByPa } /** - * This operation doesn't support all the query options, only its filters (numeric, facet, or tag) - * and geo queries. It doesn't accept empty filters or queries. + * This operation doesn't accept empty queries or filters. It's more efficient to get a list of + * object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the + * records using the [`batch` operation](tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param deleteByParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -1443,10 +1467,11 @@ public DeletedAtResponse deleteBy(@Nonnull String indexName, @Nonnull DeleteByPa } /** - * (asynchronously) This operation doesn't support all the query options, only its filters - * (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + * (asynchronously) This operation doesn't accept empty queries or filters. It's more efficient to + * get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then + * delete the records using the [`batch` operation](tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param deleteByParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -1471,10 +1496,11 @@ public CompletableFuture deleteByAsync( } /** - * (asynchronously) This operation doesn't support all the query options, only its filters - * (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + * (asynchronously) This operation doesn't accept empty queries or filters. It's more efficient to + * get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then + * delete the records using the [`batch` operation](tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param deleteByParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -1484,9 +1510,14 @@ public CompletableFuture deleteByAsync(@Nonnull String indexN } /** - * Delete an existing index. + * Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - + * If you try to delete a non-existing index, the operation is ignored without warning. - If the + * index you want to delete has replica indices, the replicas become independent indices. - If the + * index you want to delete is a replica index, you must first unlink it from its primary index + * before you can delete it. For more information, see [Delete replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1496,9 +1527,14 @@ public DeletedAtResponse deleteIndex(@Nonnull String indexName, RequestOptions r } /** - * Delete an existing index. + * Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - + * If you try to delete a non-existing index, the operation is ignored without warning. - If the + * index you want to delete has replica indices, the replicas become independent indices. - If the + * index you want to delete is a replica index, you must first unlink it from its primary index + * before you can delete it. For more information, see [Delete replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public DeletedAtResponse deleteIndex(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -1506,9 +1542,14 @@ public DeletedAtResponse deleteIndex(@Nonnull String indexName) throws AlgoliaRu } /** - * (asynchronously) Delete an existing index. + * (asynchronously) Deletes an index and all its settings. - Deleting an index doesn't delete its + * analytics data. - If you try to delete a non-existing index, the operation is ignored without + * warning. - If the index you want to delete has replica indices, the replicas become independent + * indices. - If the index you want to delete is a replica index, you must first unlink it from + * its primary index before you can delete it. For more information, see [Delete replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1522,9 +1563,14 @@ public CompletableFuture deleteIndexAsync(@Nonnull String ind } /** - * (asynchronously) Delete an existing index. + * (asynchronously) Deletes an index and all its settings. - Deleting an index doesn't delete its + * analytics data. - If you try to delete a non-existing index, the operation is ignored without + * warning. - If the index you want to delete has replica indices, the replicas become independent + * indices. - If the index you want to delete is a replica index, you must first unlink it from + * its primary index before you can delete it. For more information, see [Delete replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture deleteIndexAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -1532,11 +1578,12 @@ public CompletableFuture deleteIndexAsync(@Nonnull String ind } /** - * To delete a set of records matching a query, use the [`deleteByQuery` - * operation](#tag/Records/operation/deleteBy) instead. + * Deletes a record by its object ID. To delete more than one record, use the [`batch` + * operation](#tag/Records/operation/batch). To delete records matching a query, use the + * [`deleteByQuery` operation](#tag/Records/operation/deleteBy). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1547,11 +1594,12 @@ public DeletedAtResponse deleteObject(@Nonnull String indexName, @Nonnull String } /** - * To delete a set of records matching a query, use the [`deleteByQuery` - * operation](#tag/Records/operation/deleteBy) instead. + * Deletes a record by its object ID. To delete more than one record, use the [`batch` + * operation](#tag/Records/operation/batch). To delete records matching a query, use the + * [`deleteByQuery` operation](#tag/Records/operation/deleteBy). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public DeletedAtResponse deleteObject(@Nonnull String indexName, @Nonnull String objectID) throws AlgoliaRuntimeException { @@ -1559,11 +1607,12 @@ public DeletedAtResponse deleteObject(@Nonnull String indexName, @Nonnull String } /** - * (asynchronously) To delete a set of records matching a query, use the [`deleteByQuery` - * operation](#tag/Records/operation/deleteBy) instead. + * (asynchronously) Deletes a record by its object ID. To delete more than one record, use the + * [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the + * [`deleteByQuery` operation](#tag/Records/operation/deleteBy). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1586,11 +1635,12 @@ public CompletableFuture deleteObjectAsync( } /** - * (asynchronously) To delete a set of records matching a query, use the [`deleteByQuery` - * operation](#tag/Records/operation/deleteBy) instead. + * (asynchronously) Deletes a record by its object ID. To delete more than one record, use the + * [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the + * [`deleteByQuery` operation](#tag/Records/operation/deleteBy). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture deleteObjectAsync(@Nonnull String indexName, @Nonnull String objectID) @@ -1599,13 +1649,12 @@ public CompletableFuture deleteObjectAsync(@Nonnull String in } /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + * Deletes a rule by its ID. To find the object ID for rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1620,13 +1669,12 @@ public UpdatedAtResponse deleteRule( } /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + * Deletes a rule by its ID. To find the object ID for rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse deleteRule(@Nonnull String indexName, @Nonnull String objectID, Boolean forwardToReplicas) @@ -1635,10 +1683,10 @@ public UpdatedAtResponse deleteRule(@Nonnull String indexName, @Nonnull String o } /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + * Deletes a rule by its ID. To find the object ID for rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -1650,10 +1698,10 @@ public UpdatedAtResponse deleteRule(@Nonnull String indexName, @Nonnull String o } /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + * Deletes a rule by its ID. To find the object ID for rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -1662,13 +1710,12 @@ public UpdatedAtResponse deleteRule(@Nonnull String indexName, @Nonnull String o } /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` for rules, use the - * [`search` operation](#tag/Rules/operation/searchRules). + * (asynchronously) Deletes a rule by its ID. To find the object ID for rules, use the [`search` + * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1693,13 +1740,12 @@ public CompletableFuture deleteRuleAsync( } /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` for rules, use the - * [`search` operation](#tag/Rules/operation/searchRules). + * (asynchronously) Deletes a rule by its ID. To find the object ID for rules, use the [`search` + * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture deleteRuleAsync( @@ -1711,10 +1757,10 @@ public CompletableFuture deleteRuleAsync( } /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` for rules, use the - * [`search` operation](#tag/Rules/operation/searchRules). + * (asynchronously) Deletes a rule by its ID. To find the object ID for rules, use the [`search` + * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -1729,10 +1775,10 @@ public CompletableFuture deleteRuleAsync( } /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` for rules, use the - * [`search` operation](#tag/Rules/operation/searchRules). + * (asynchronously) Deletes a rule by its ID. To find the object ID for rules, use the [`search` + * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -1742,7 +1788,7 @@ public CompletableFuture deleteRuleAsync(@Nonnull String inde } /** - * Remove a source from the list of allowed sources. + * Deletes a source from the list of allowed sources. * * @param source IP address range of the source. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -1754,7 +1800,7 @@ public DeleteSourceResponse deleteSource(@Nonnull String source, RequestOptions } /** - * Remove a source from the list of allowed sources. + * Deletes a source from the list of allowed sources. * * @param source IP address range of the source. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1764,7 +1810,7 @@ public DeleteSourceResponse deleteSource(@Nonnull String source) throws AlgoliaR } /** - * (asynchronously) Remove a source from the list of allowed sources. + * (asynchronously) Deletes a source from the list of allowed sources. * * @param source IP address range of the source. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -1780,7 +1826,7 @@ public CompletableFuture deleteSourceAsync(@Nonnull String } /** - * (asynchronously) Remove a source from the list of allowed sources. + * (asynchronously) Deletes a source from the list of allowed sources. * * @param source IP address range of the source. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1790,13 +1836,12 @@ public CompletableFuture deleteSourceAsync(@Nonnull String } /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` + * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1811,13 +1856,12 @@ public DeletedAtResponse deleteSynonym( } /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` + * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public DeletedAtResponse deleteSynonym(@Nonnull String indexName, @Nonnull String objectID, Boolean forwardToReplicas) @@ -1826,10 +1870,10 @@ public DeletedAtResponse deleteSynonym(@Nonnull String indexName, @Nonnull Strin } /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` + * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -1841,10 +1885,10 @@ public DeletedAtResponse deleteSynonym(@Nonnull String indexName, @Nonnull Strin } /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` + * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -1853,13 +1897,12 @@ public DeletedAtResponse deleteSynonym(@Nonnull String indexName, @Nonnull Strin } /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your synonyms, - * use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * (asynchronously) Deletes a synonym by its ID. To find the object IDs of your synonyms, use the + * [`search` operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1884,13 +1927,12 @@ public CompletableFuture deleteSynonymAsync( } /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your synonyms, - * use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * (asynchronously) Deletes a synonym by its ID. To find the object IDs of your synonyms, use the + * [`search` operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture deleteSynonymAsync( @@ -1902,10 +1944,10 @@ public CompletableFuture deleteSynonymAsync( } /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your synonyms, - * use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * (asynchronously) Deletes a synonym by its ID. To find the object IDs of your synonyms, use the + * [`search` operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -1920,10 +1962,10 @@ public CompletableFuture deleteSynonymAsync( } /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your synonyms, - * use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * (asynchronously) Deletes a synonym by its ID. To find the object IDs of your synonyms, use the + * [`search` operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -1933,9 +1975,9 @@ public CompletableFuture deleteSynonymAsync(@Nonnull String i } /** - * Get the permissions and restrictions of a specific API key. When authenticating with the admin - * API key, you can request information for any of your application's keys. When authenticating - * with other API keys, you can only retrieve information for that key. + * Gets the permissions and restrictions of an API key. When authenticating with the admin API + * key, you can request information for any of your application's keys. When authenticating with + * other API keys, you can only retrieve information for that key. * * @param key API key. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -1947,9 +1989,9 @@ public GetApiKeyResponse getApiKey(@Nonnull String key, RequestOptions requestOp } /** - * Get the permissions and restrictions of a specific API key. When authenticating with the admin - * API key, you can request information for any of your application's keys. When authenticating - * with other API keys, you can only retrieve information for that key. + * Gets the permissions and restrictions of an API key. When authenticating with the admin API + * key, you can request information for any of your application's keys. When authenticating with + * other API keys, you can only retrieve information for that key. * * @param key API key. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1959,10 +2001,9 @@ public GetApiKeyResponse getApiKey(@Nonnull String key) throws AlgoliaRuntimeExc } /** - * (asynchronously) Get the permissions and restrictions of a specific API key. When - * authenticating with the admin API key, you can request information for any of your - * application's keys. When authenticating with other API keys, you can only retrieve information - * for that key. + * (asynchronously) Gets the permissions and restrictions of an API key. When authenticating with + * the admin API key, you can request information for any of your application's keys. When + * authenticating with other API keys, you can only retrieve information for that key. * * @param key API key. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -1979,10 +2020,9 @@ public CompletableFuture getApiKeyAsync(@Nonnull String key, } /** - * (asynchronously) Get the permissions and restrictions of a specific API key. When - * authenticating with the admin API key, you can request information for any of your - * application's keys. When authenticating with other API keys, you can only retrieve information - * for that key. + * (asynchronously) Gets the permissions and restrictions of an API key. When authenticating with + * the admin API key, you can request information for any of your application's keys. When + * authenticating with other API keys, you can only retrieve information for that key. * * @param key API key. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -1992,14 +2032,7 @@ public CompletableFuture getApiKeyAsync(@Nonnull String key) } /** - * Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. + * Lists supported languages with their supported dictionary types and number of custom entries. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2010,14 +2043,7 @@ public Map getDictionaryLanguages(RequestOptions requestOptio } /** - * Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. + * Lists supported languages with their supported dictionary types and number of custom entries. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2026,14 +2052,8 @@ public Map getDictionaryLanguages() throws AlgoliaRuntimeExce } /** - * (asynchronously) Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. + * (asynchronously) Lists supported languages with their supported dictionary types and number of + * custom entries. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2047,14 +2067,8 @@ public CompletableFuture> getDictionaryLanguagesAsync(Req } /** - * (asynchronously) Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. + * (asynchronously) Lists supported languages with their supported dictionary types and number of + * custom entries. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2063,8 +2077,7 @@ public CompletableFuture> getDictionaryLanguagesAsync() t } /** - * Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). + * Retrieves the languages for which standard dictionary entries are turned off. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2075,8 +2088,7 @@ public GetDictionarySettingsResponse getDictionarySettings(RequestOptions reques } /** - * Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). + * Retrieves the languages for which standard dictionary entries are turned off. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2085,8 +2097,7 @@ public GetDictionarySettingsResponse getDictionarySettings() throws AlgoliaRunti } /** - * (asynchronously) Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). + * (asynchronously) Retrieves the languages for which standard dictionary entries are turned off. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2100,8 +2111,7 @@ public CompletableFuture getDictionarySettingsAsy } /** - * (asynchronously) Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). + * (asynchronously) Retrieves the languages for which standard dictionary entries are turned off. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2111,20 +2121,18 @@ public CompletableFuture getDictionarySettingsAsy /** * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) + * @param offset First log entry to retrieve. The most recent entries are listed first. (optional, + * default to 0) * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. + * @param indexName Index for which to retrieve log entries. By default, log entries are retrieved + * for all indices. (optional) + * @param type Type of log entries to retrieve. By default, all log entries are retrieved. * (optional, default to all) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2137,20 +2145,18 @@ public GetLogsResponse getLogs(Integer offset, Integer length, String indexName, /** * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) + * @param offset First log entry to retrieve. The most recent entries are listed first. (optional, + * default to 0) * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. + * @param indexName Index for which to retrieve log entries. By default, log entries are retrieved + * for all indices. (optional) + * @param type Type of log entries to retrieve. By default, all log entries are retrieved. * (optional, default to all) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2160,13 +2166,11 @@ public GetLogsResponse getLogs(Integer offset, Integer length, String indexName, /** * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2178,13 +2182,11 @@ public GetLogsResponse getLogs(RequestOptions requestOptions) throws AlgoliaRunt /** * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2194,20 +2196,18 @@ public GetLogsResponse getLogs() throws AlgoliaRuntimeException { /** * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) + * @param offset First log entry to retrieve. The most recent entries are listed first. (optional, + * default to 0) * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. + * @param indexName Index for which to retrieve log entries. By default, log entries are retrieved + * for all indices. (optional) + * @param type Type of log entries to retrieve. By default, all log entries are retrieved. * (optional, default to all) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2234,20 +2234,18 @@ public CompletableFuture getLogsAsync( /** * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) + * @param offset First log entry to retrieve. The most recent entries are listed first. (optional, + * default to 0) * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. + * @param indexName Index for which to retrieve log entries. By default, log entries are retrieved + * for all indices. (optional) + * @param type Type of log entries to retrieve. By default, all log entries are retrieved. * (optional, default to all) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2258,13 +2256,11 @@ public CompletableFuture getLogsAsync(Integer offset, Integer l /** * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2276,13 +2272,11 @@ public CompletableFuture getLogsAsync(RequestOptions requestOpt /** * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are + * held for the last seven days. - Up to 1,000 API requests per server are logged. - This request + * counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2291,14 +2285,14 @@ public CompletableFuture getLogsAsync() throws AlgoliaRuntimeEx } /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` + * operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param attributesToRetrieve Attributes to include with the records in the response. This is * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) + * returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` * won't be retrieved unless the request is authenticated with the admin API key. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2314,14 +2308,14 @@ public Map getObject( } /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` + * operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param attributesToRetrieve Attributes to include with the records in the response. This is * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) + * returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` * won't be retrieved unless the request is authenticated with the admin API key. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2331,10 +2325,11 @@ public Map getObject(@Nonnull String indexName, @Nonnull String } /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` + * operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2345,10 +2340,11 @@ public Map getObject(@Nonnull String indexName, @Nonnull String } /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` + * operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public Map getObject(@Nonnull String indexName, @Nonnull String objectID) throws AlgoliaRuntimeException { @@ -2356,15 +2352,14 @@ public Map getObject(@Nonnull String indexName, @Nonnull String } /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). + * (asynchronously) Retrieves one record by its object ID. To retrieve more than one record, use + * the [`objects` operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param attributesToRetrieve Attributes to include with the records in the response. This is * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) + * returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` * won't be retrieved unless the request is authenticated with the admin API key. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2390,15 +2385,14 @@ public CompletableFuture> getObjectAsync( } /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). + * (asynchronously) Retrieves one record by its object ID. To retrieve more than one record, use + * the [`objects` operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param attributesToRetrieve Attributes to include with the records in the response. This is * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) + * returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` * won't be retrieved unless the request is authenticated with the admin API key. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2411,11 +2405,11 @@ public CompletableFuture> getObjectAsync( } /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). + * (asynchronously) Retrieves one record by its object ID. To retrieve more than one record, use + * the [`objects` operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2429,11 +2423,11 @@ public CompletableFuture> getObjectAsync( } /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). + * (asynchronously) Retrieves one record by its object ID. To retrieve more than one record, use + * the [`objects` operation](#tag/Records/operation/getObjects). * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture> getObjectAsync(@Nonnull String indexName, @Nonnull String objectID) @@ -2442,8 +2436,8 @@ public CompletableFuture> getObjectAsync(@Nonnull String ind } /** - * Retrieve one or more records, potentially from different indices, in a single API operation. - * Results will be received in the same order as the requests. + * Retrieves one or more records, potentially from different indices. Records are returned in the + * same order as the requests. * * @param getObjectsParams Request object. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. @@ -2460,8 +2454,8 @@ public GetObjectsResponse getObjects( } /** - * Retrieve one or more records, potentially from different indices, in a single API operation. - * Results will be received in the same order as the requests. + * Retrieves one or more records, potentially from different indices. Records are returned in the + * same order as the requests. * * @param getObjectsParams Request object. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. @@ -2473,8 +2467,8 @@ public GetObjectsResponse getObjects(@Nonnull GetObjectsParams getObjects } /** - * (asynchronously) Retrieve one or more records, potentially from different indices, in a single - * API operation. Results will be received in the same order as the requests. + * (asynchronously) Retrieves one or more records, potentially from different indices. Records are + * returned in the same order as the requests. * * @param getObjectsParams Request object. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. @@ -2500,8 +2494,8 @@ public CompletableFuture> getObjectsAsync( } /** - * (asynchronously) Retrieve one or more records, potentially from different indices, in a single - * API operation. Results will be received in the same order as the requests. + * (asynchronously) Retrieves one or more records, potentially from different indices. Records are + * returned in the same order as the requests. * * @param getObjectsParams Request object. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. @@ -2513,10 +2507,10 @@ public CompletableFuture> getObjectsAsync(@Nonnull Get } /** - * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2527,10 +2521,10 @@ public Rule getRule(@Nonnull String indexName, @Nonnull String objectID, Request } /** - * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2539,10 +2533,10 @@ public Rule getRule(@Nonnull String indexName, @Nonnull String objectID) throws } /** - * (asynchronously) Get a rule by its `objectID`. To find the `objectID` for rules, use the - * [`search` operation](#tag/Rules/operation/searchRules). + * (asynchronously) Retrieves a rule by its ID. To find the object ID of rules, use the [`search` + * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2563,10 +2557,10 @@ public CompletableFuture getRuleAsync(@Nonnull String indexName, @Nonnull } /** - * (asynchronously) Get a rule by its `objectID`. To find the `objectID` for rules, use the - * [`search` operation](#tag/Rules/operation/searchRules). + * (asynchronously) Retrieves a rule by its ID. To find the object ID of rules, use the [`search` + * operation](#tag/Rules/operation/searchRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2575,10 +2569,9 @@ public CompletableFuture getRuleAsync(@Nonnull String indexName, @Nonnull } /** - * Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + * Retrieves an object with non-null index settings. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2588,10 +2581,9 @@ public IndexSettings getSettings(@Nonnull String indexName, RequestOptions reque } /** - * Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + * Retrieves an object with non-null index settings. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public IndexSettings getSettings(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -2599,10 +2591,9 @@ public IndexSettings getSettings(@Nonnull String indexName) throws AlgoliaRuntim } /** - * (asynchronously) Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + * (asynchronously) Retrieves an object with non-null index settings. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2616,10 +2607,9 @@ public CompletableFuture getSettingsAsync(@Nonnull String indexNa } /** - * (asynchronously) Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + * (asynchronously) Retrieves an object with non-null index settings. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getSettingsAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -2627,7 +2617,7 @@ public CompletableFuture getSettingsAsync(@Nonnull String indexNa } /** - * Get all allowed sources (IP addresses). + * Retrieves all allowed IP addresses with access to your application. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2638,7 +2628,7 @@ public List getSources(RequestOptions requestOptions) throws AlgoliaRunt } /** - * Get all allowed sources (IP addresses). + * Retrieves all allowed IP addresses with access to your application. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2647,7 +2637,7 @@ public List getSources() throws AlgoliaRuntimeException { } /** - * (asynchronously) Get all allowed sources (IP addresses). + * (asynchronously) Retrieves all allowed IP addresses with access to your application. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2660,7 +2650,7 @@ public CompletableFuture> getSourcesAsync(RequestOptions requestOpt } /** - * (asynchronously) Get all allowed sources (IP addresses). + * (asynchronously) Retrieves all allowed IP addresses with access to your application. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2669,10 +2659,10 @@ public CompletableFuture> getSourcesAsync() throws AlgoliaRuntimeEx } /** - * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` + * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2684,10 +2674,10 @@ public SynonymHit getSynonym(@Nonnull String indexName, @Nonnull String objectID } /** - * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` + * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2696,10 +2686,10 @@ public SynonymHit getSynonym(@Nonnull String indexName, @Nonnull String objectID } /** - * (asynchronously) Get a syonym by its `objectID`. To find the object IDs for your synonyms, use + * (asynchronously) Retrieves a syonym by its ID. To find the object IDs for your synonyms, use * the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2720,10 +2710,10 @@ public CompletableFuture getSynonymAsync(@Nonnull String indexName, } /** - * (asynchronously) Get a syonym by its `objectID`. To find the object IDs for your synonyms, use + * (asynchronously) Retrieves a syonym by its ID. To find the object IDs for your synonyms, use * the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2732,10 +2722,12 @@ public CompletableFuture getSynonymAsync(@Nonnull String indexName, } /** - * Some operations, such as copying an index, will respond with a `taskID` value. Use this value - * here to check the status of that task. + * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or + * delete records or indices, a task is created on a queue and completed depending on the load on + * the server. The indexing tasks' responses include a task ID that you can use to check the + * status. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param taskID Unique task identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2747,10 +2739,12 @@ public GetTaskResponse getTask(@Nonnull String indexName, @Nonnull Long taskID, } /** - * Some operations, such as copying an index, will respond with a `taskID` value. Use this value - * here to check the status of that task. + * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or + * delete records or indices, a task is created on a queue and completed depending on the load on + * the server. The indexing tasks' responses include a task ID that you can use to check the + * status. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param taskID Unique task identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2759,10 +2753,12 @@ public GetTaskResponse getTask(@Nonnull String indexName, @Nonnull Long taskID) } /** - * (asynchronously) Some operations, such as copying an index, will respond with a `taskID` value. - * Use this value here to check the status of that task. + * (asynchronously) Checks the status of a given task. Indexing tasks are asynchronous. When you + * add, update, or delete records or indices, a task is created on a queue and completed depending + * on the load on the server. The indexing tasks' responses include a task ID that you can use to + * check the status. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param taskID Unique task identifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2779,10 +2775,12 @@ public CompletableFuture getTaskAsync(@Nonnull String indexName } /** - * (asynchronously) Some operations, such as copying an index, will respond with a `taskID` value. - * Use this value here to check the status of that task. + * (asynchronously) Checks the status of a given task. Indexing tasks are asynchronous. When you + * add, update, or delete records or indices, a task is created on a queue and completed depending + * on the load on the server. The indexing tasks' responses include a task ID that you can use to + * check the status. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param taskID Unique task identifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2791,8 +2789,8 @@ public CompletableFuture getTaskAsync(@Nonnull String indexName } /** - * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take - * up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a + * few seconds to get the data from the different clusters, the response isn't real-time. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2803,8 +2801,8 @@ public GetTopUserIdsResponse getTopUserIds(RequestOptions requestOptions) throws } /** - * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take - * up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a + * few seconds to get the data from the different clusters, the response isn't real-time. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2814,8 +2812,8 @@ public GetTopUserIdsResponse getTopUserIds() throws AlgoliaRuntimeException { /** * (asynchronously) Get the IDs of the 10 users with the highest number of records per cluster. - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. + * Since it can take a few seconds to get the data from the different clusters, the response isn't + * real-time. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -2829,8 +2827,8 @@ public CompletableFuture getTopUserIdsAsync(RequestOption /** * (asynchronously) Get the IDs of the 10 users with the highest number of records per cluster. - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. + * Since it can take a few seconds to get the data from the different clusters, the response isn't + * real-time. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -2839,10 +2837,10 @@ public CompletableFuture getTopUserIdsAsync() throws Algo } /** - * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the - * data from the different clusters, the response isn't real-time. + * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data + * from the different clusters, the response isn't real-time. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2852,10 +2850,10 @@ public UserId getUserId(@Nonnull String userID, RequestOptions requestOptions) t } /** - * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the - * data from the different clusters, the response isn't real-time. + * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data + * from the different clusters, the response isn't real-time. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UserId getUserId(@Nonnull String userID) throws AlgoliaRuntimeException { @@ -2863,10 +2861,10 @@ public UserId getUserId(@Nonnull String userID) throws AlgoliaRuntimeException { } /** - * (asynchronously) Returns the userID data stored in the mapping. Since it can take up to a few + * (asynchronously) Returns the user ID data stored in the mapping. Since it can take a few * seconds to get the data from the different clusters, the response isn't real-time. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2879,10 +2877,10 @@ public CompletableFuture getUserIdAsync(@Nonnull String userID, RequestO } /** - * (asynchronously) Returns the userID data stored in the mapping. Since it can take up to a few + * (asynchronously) Returns the user ID data stored in the mapping. Since it can take a few * seconds to get the data from the different clusters, the response isn't real-time. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture getUserIdAsync(@Nonnull String userID) throws AlgoliaRuntimeException { @@ -2894,8 +2892,8 @@ public CompletableFuture getUserIdAsync(@Nonnull String userID) throws A * users from one cluster to another is complete, this operation retrieves the status of the * process. * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) + * @param getClusters Whether to include the cluster's pending mapping state in the response. + * (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2909,8 +2907,8 @@ public HasPendingMappingsResponse hasPendingMappings(Boolean getClusters, Reques * users from one cluster to another is complete, this operation retrieves the status of the * process. * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) + * @param getClusters Whether to include the cluster's pending mapping state in the response. + * (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public HasPendingMappingsResponse hasPendingMappings(Boolean getClusters) throws AlgoliaRuntimeException { @@ -2946,8 +2944,8 @@ public HasPendingMappingsResponse hasPendingMappings() throws AlgoliaRuntimeExce * users or migrating users from one cluster to another is complete, this operation retrieves the * status of the process. * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) + * @param getClusters Whether to include the cluster's pending mapping state in the response. + * (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -2968,8 +2966,8 @@ public CompletableFuture hasPendingMappingsAsync(Boo * users or migrating users from one cluster to another is complete, this operation retrieves the * status of the process. * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) + * @param getClusters Whether to include the cluster's pending mapping state in the response. + * (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture hasPendingMappingsAsync(Boolean getClusters) throws AlgoliaRuntimeException { @@ -3002,7 +3000,7 @@ public CompletableFuture hasPendingMappingsAsync() t } /** - * List all API keys associated with your Algolia application, including their permissions and + * Lists all API keys associated with your Algolia application, including their permissions and * restrictions. * * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3014,7 +3012,7 @@ public ListApiKeysResponse listApiKeys(RequestOptions requestOptions) throws Alg } /** - * List all API keys associated with your Algolia application, including their permissions and + * Lists all API keys associated with your Algolia application, including their permissions and * restrictions. * * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3024,7 +3022,7 @@ public ListApiKeysResponse listApiKeys() throws AlgoliaRuntimeException { } /** - * (asynchronously) List all API keys associated with your Algolia application, including their + * (asynchronously) Lists all API keys associated with your Algolia application, including their * permissions and restrictions. * * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3038,7 +3036,7 @@ public CompletableFuture listApiKeysAsync(RequestOptions re } /** - * (asynchronously) List all API keys associated with your Algolia application, including their + * (asynchronously) Lists all API keys associated with your Algolia application, including their * permissions and restrictions. * * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3048,7 +3046,7 @@ public CompletableFuture listApiKeysAsync() throws AlgoliaR } /** - * List the available clusters in a multi-cluster setup. + * Lists the available clusters in a multi-cluster setup. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3059,7 +3057,7 @@ public ListClustersResponse listClusters(RequestOptions requestOptions) throws A } /** - * List the available clusters in a multi-cluster setup. + * Lists the available clusters in a multi-cluster setup. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3068,7 +3066,7 @@ public ListClustersResponse listClusters() throws AlgoliaRuntimeException { } /** - * (asynchronously) List the available clusters in a multi-cluster setup. + * (asynchronously) Lists the available clusters in a multi-cluster setup. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3081,7 +3079,7 @@ public CompletableFuture listClustersAsync(RequestOptions } /** - * (asynchronously) List the available clusters in a multi-cluster setup. + * (asynchronously) Lists the available clusters in a multi-cluster setup. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3090,12 +3088,12 @@ public CompletableFuture listClustersAsync() throws Algoli } /** - * List indices in an Algolia application. + * Lists all indices in the current Algolia application. The request follows any index + * restrictions of the API key you use to make the request. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3105,12 +3103,12 @@ public ListIndicesResponse listIndices(Integer page, Integer hitsPerPage, Reques } /** - * List indices in an Algolia application. + * Lists all indices in the current Algolia application. The request follows any index + * restrictions of the API key you use to make the request. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @throws AlgoliaRuntimeException If it fails to process the API call */ public ListIndicesResponse listIndices(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { @@ -3118,7 +3116,8 @@ public ListIndicesResponse listIndices(Integer page, Integer hitsPerPage) throws } /** - * List indices in an Algolia application. + * Lists all indices in the current Algolia application. The request follows any index + * restrictions of the API key you use to make the request. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3129,7 +3128,8 @@ public ListIndicesResponse listIndices(RequestOptions requestOptions) throws Alg } /** - * List indices in an Algolia application. + * Lists all indices in the current Algolia application. The request follows any index + * restrictions of the API key you use to make the request. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3138,12 +3138,12 @@ public ListIndicesResponse listIndices() throws AlgoliaRuntimeException { } /** - * (asynchronously) List indices in an Algolia application. + * (asynchronously) Lists all indices in the current Algolia application. The request follows any + * index restrictions of the API key you use to make the request. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3161,12 +3161,12 @@ public CompletableFuture listIndicesAsync(Integer page, Int } /** - * (asynchronously) List indices in an Algolia application. + * (asynchronously) Lists all indices in the current Algolia application. The request follows any + * index restrictions of the API key you use to make the request. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture listIndicesAsync(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { @@ -3174,7 +3174,8 @@ public CompletableFuture listIndicesAsync(Integer page, Int } /** - * (asynchronously) List indices in an Algolia application. + * (asynchronously) Lists all indices in the current Algolia application. The request follows any + * index restrictions of the API key you use to make the request. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3185,7 +3186,8 @@ public CompletableFuture listIndicesAsync(RequestOptions re } /** - * (asynchronously) List indices in an Algolia application. + * (asynchronously) Lists all indices in the current Algolia application. The request follows any + * index restrictions of the API key you use to make the request. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3194,13 +3196,12 @@ public CompletableFuture listIndicesAsync() throws AlgoliaR } /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. + * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to + * get the data from the different clusters, the response isn't real-time. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3210,13 +3211,12 @@ public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage, Reques } /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. + * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to + * get the data from the different clusters, the response isn't real-time. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @throws AlgoliaRuntimeException If it fails to process the API call */ public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { @@ -3224,8 +3224,8 @@ public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage) throws } /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. + * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to + * get the data from the different clusters, the response isn't real-time. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3236,8 +3236,8 @@ public ListUserIdsResponse listUserIds(RequestOptions requestOptions) throws Alg } /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. + * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to + * get the data from the different clusters, the response isn't real-time. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3246,13 +3246,12 @@ public ListUserIdsResponse listUserIds() throws AlgoliaRuntimeException { } /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. + * (asynchronously) Lists the userIDs assigned to a multi-cluster application. Since it can take a + * few seconds to get the data from the different clusters, the response isn't real-time. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3270,13 +3269,12 @@ public CompletableFuture listUserIdsAsync(Integer page, Int } /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. + * (asynchronously) Lists the userIDs assigned to a multi-cluster application. Since it can take a + * few seconds to get the data from the different clusters, the response isn't real-time. * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * (optional) + * @param hitsPerPage Number of hits per page. (optional, default to 100) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture listUserIdsAsync(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { @@ -3284,8 +3282,8 @@ public CompletableFuture listUserIdsAsync(Integer page, Int } /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. + * (asynchronously) Lists the userIDs assigned to a multi-cluster application. Since it can take a + * few seconds to get the data from the different clusters, the response isn't real-time. * * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3296,8 +3294,8 @@ public CompletableFuture listUserIdsAsync(RequestOptions re } /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. + * (asynchronously) Lists the userIDs assigned to a multi-cluster application. Since it can take a + * few seconds to get the data from the different clusters, the response isn't real-time. * * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3306,10 +3304,9 @@ public CompletableFuture listUserIdsAsync() throws AlgoliaR } /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are + * applied in the order they are specified. - Actions are equivalent to the individual API + * requests of the same name. * * @param batchParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3322,10 +3319,9 @@ public MultipleBatchResponse multipleBatch(@Nonnull BatchParams batchParams, Req } /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are + * applied in the order they are specified. - Actions are equivalent to the individual API + * requests of the same name. * * @param batchParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3335,10 +3331,9 @@ public MultipleBatchResponse multipleBatch(@Nonnull BatchParams batchParams) thr } /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. + * (asynchronously) Adds, updates, or deletes records in multiple indices with a single API + * request. - Actions are applied in the order they are specified. - Actions are equivalent to the + * individual API requests of the same name. * * @param batchParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3354,10 +3349,9 @@ public CompletableFuture multipleBatchAsync(@Nonnull Batc } /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. + * (asynchronously) Adds, updates, or deletes records in multiple indices with a single API + * request. - Actions are applied in the order they are specified. - Actions are equivalent to the + * individual API requests of the same name. * * @param batchParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3367,18 +3361,24 @@ public CompletableFuture multipleBatchAsync(@Nonnull Batc } /** - * This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, - * settings, synonyms, and rules to a `destination` index. If the destination index exists, it - * will be replaced, except for index-specific API keys and analytics data. If the destination - * index doesn't exist, it will be created. The choice between moving or copying an index depends - * on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the - * same records and configuration as an existing one. > **Note**: When considering copying or - * moving, be aware of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) + * Copies or moves (renames) an index within the same Algolia application. - Existing destination + * indices are overwritten, except for index-specific API keys and analytics data. - If the + * destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that + * doesn't exist creates a new index with 0 records and default settings. - The API keys of the + * source index are merged with the existing keys in the destination index. - You can't copy the + * `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index + * that already has replicas. - Be aware of the [size + * limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). + * - Related guide: [Copy + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) + * **Move** - Moving a source index that doesn't exist is ignored without returning an error. - + * When moving an index, the analytics data keep their original name and a new set of analytics + * data is started for the new name. To access the original analytics in the dashboard, create an + * index with the original name. - If the destination index has replicas, moving will overwrite + * the existing index and copy the data to the replica indices. - Related guide: [Move + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). + * + * @param indexName Name of the index on which to perform the operation. (required) * @param operationIndexParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3393,18 +3393,24 @@ public UpdatedAtResponse operationIndex( } /** - * This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, - * settings, synonyms, and rules to a `destination` index. If the destination index exists, it - * will be replaced, except for index-specific API keys and analytics data. If the destination - * index doesn't exist, it will be created. The choice between moving or copying an index depends - * on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the - * same records and configuration as an existing one. > **Note**: When considering copying or - * moving, be aware of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) + * Copies or moves (renames) an index within the same Algolia application. - Existing destination + * indices are overwritten, except for index-specific API keys and analytics data. - If the + * destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that + * doesn't exist creates a new index with 0 records and default settings. - The API keys of the + * source index are merged with the existing keys in the destination index. - You can't copy the + * `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index + * that already has replicas. - Be aware of the [size + * limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). + * - Related guide: [Copy + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) + * **Move** - Moving a source index that doesn't exist is ignored without returning an error. - + * When moving an index, the analytics data keep their original name and a new set of analytics + * data is started for the new name. To access the original analytics in the dashboard, create an + * index with the original name. - If the destination index has replicas, moving will overwrite + * the existing index and copy the data to the replica indices. - Related guide: [Move + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). + * + * @param indexName Name of the index on which to perform the operation. (required) * @param operationIndexParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3414,18 +3420,24 @@ public UpdatedAtResponse operationIndex(@Nonnull String indexName, @Nonnull Oper } /** - * (asynchronously) This `operation`, _copy_ or _move_, will copy or move a source index's - * (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the - * destination index exists, it will be replaced, except for index-specific API keys and analytics - * data. If the destination index doesn't exist, it will be created. The choice between moving or - * copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to - * create a new index with the same records and configuration as an existing one. > **Note**: When - * considering copying or moving, be aware of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) + * (asynchronously) Copies or moves (renames) an index within the same Algolia application. - + * Existing destination indices are overwritten, except for index-specific API keys and analytics + * data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a + * source index that doesn't exist creates a new index with 0 records and default settings. - The + * API keys of the source index are merged with the existing keys in the destination index. - You + * can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a + * destination index that already has replicas. - Be aware of the [size + * limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). + * - Related guide: [Copy + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) + * **Move** - Moving a source index that doesn't exist is ignored without returning an error. - + * When moving an index, the analytics data keep their original name and a new set of analytics + * data is started for the new name. To access the original analytics in the dashboard, create an + * index with the original name. - If the destination index has replicas, moving will overwrite + * the existing index and copy the data to the replica indices. - Related guide: [Move + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). + * + * @param indexName Name of the index on which to perform the operation. (required) * @param operationIndexParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -3450,18 +3462,24 @@ public CompletableFuture operationIndexAsync( } /** - * (asynchronously) This `operation`, _copy_ or _move_, will copy or move a source index's - * (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the - * destination index exists, it will be replaced, except for index-specific API keys and analytics - * data. If the destination index doesn't exist, it will be created. The choice between moving or - * copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to - * create a new index with the same records and configuration as an existing one. > **Note**: When - * considering copying or moving, be aware of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) + * (asynchronously) Copies or moves (renames) an index within the same Algolia application. - + * Existing destination indices are overwritten, except for index-specific API keys and analytics + * data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a + * source index that doesn't exist creates a new index with 0 records and default settings. - The + * API keys of the source index are merged with the existing keys in the destination index. - You + * can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a + * destination index that already has replicas. - Be aware of the [size + * limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). + * - Related guide: [Copy + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) + * **Move** - Moving a source index that doesn't exist is ignored without returning an error. - + * When moving an index, the analytics data keep their original name and a new set of analytics + * data is started for the new name. To access the original analytics in the dashboard, create an + * index with the original name. - If the destination index has replicas, moving will overwrite + * the existing index and copy the data to the replica indices. - Related guide: [Move + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). + * + * @param indexName Name of the index on which to perform the operation. (required) * @param operationIndexParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -3473,16 +3491,17 @@ public CompletableFuture operationIndexAsync( } /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * Adds new attributes to a record, or update existing ones. - If a record with the specified + * object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. + * - If the index doesn't exist yet, this method creates a new index. - You can use any + * first-level attribute but not nested attributes. If you specify a nested attribute, the engine + * treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) + * @param createIfNotExists Whether to create a new record if it doesn't exist. (optional, default + * to true) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3498,16 +3517,17 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( } /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * Adds new attributes to a record, or update existing ones. - If a record with the specified + * object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. + * - If the index doesn't exist yet, this method creates a new index. - You can use any + * first-level attribute but not nested attributes. If you specify a nested attribute, the engine + * treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) + * @param createIfNotExists Whether to create a new record if it doesn't exist. (optional, default + * to true) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtWithObjectIdResponse partialUpdateObject( @@ -3520,14 +3540,15 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( } /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * Adds new attributes to a record, or update existing ones. - If a record with the specified + * object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. + * - If the index doesn't exist yet, this method creates a new index. - You can use any + * first-level attribute but not nested attributes. If you specify a nested attribute, the engine + * treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3542,14 +3563,15 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( } /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * Adds new attributes to a record, or update existing ones. - If a record with the specified + * object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. + * - If the index doesn't exist yet, this method creates a new index. - You can use any + * first-level attribute but not nested attributes. If you specify a nested attribute, the engine + * treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtWithObjectIdResponse partialUpdateObject( @@ -3561,16 +3583,17 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( } /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * (asynchronously) Adds new attributes to a record, or update existing ones. - If a record with + * the specified object ID doesn't exist, a new record is added to the index **if** + * `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. + * - You can use any first-level attribute but not nested attributes. If you specify a nested + * attribute, the engine treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) + * @param createIfNotExists Whether to create a new record if it doesn't exist. (optional, default + * to true) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3599,16 +3622,17 @@ public CompletableFuture partialUpdateObjectAsync } /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * (asynchronously) Adds new attributes to a record, or update existing ones. - If a record with + * the specified object ID doesn't exist, a new record is added to the index **if** + * `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. + * - You can use any first-level attribute but not nested attributes. If you specify a nested + * attribute, the engine treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) + * @param createIfNotExists Whether to create a new record if it doesn't exist. (optional, default + * to true) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture partialUpdateObjectAsync( @@ -3621,14 +3645,15 @@ public CompletableFuture partialUpdateObjectAsync } /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * (asynchronously) Adds new attributes to a record, or update existing ones. - If a record with + * the specified object ID doesn't exist, a new record is added to the index **if** + * `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. + * - You can use any first-level attribute but not nested attributes. If you specify a nested + * attribute, the engine treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3643,14 +3668,15 @@ public CompletableFuture partialUpdateObjectAsync } /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + * (asynchronously) Adds new attributes to a record, or update existing ones. - If a record with + * the specified object ID doesn't exist, a new record is added to the index **if** + * `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. + * - You can use any first-level attribute but not nested attributes. If you specify a nested + * attribute, the engine treats it as a replacement for its first-level ancestor. * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param objectID Unique record identifier. (required) + * @param attributesToUpdate Attributes with their values. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture partialUpdateObjectAsync( @@ -3662,9 +3688,9 @@ public CompletableFuture partialUpdateObjectAsync } /** - * Remove a userID and its associated data from the multi-clusters. + * Deletes a user ID and its associated data from the clusters. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3674,9 +3700,9 @@ public RemoveUserIdResponse removeUserId(@Nonnull String userID, RequestOptions } /** - * Remove a userID and its associated data from the multi-clusters. + * Deletes a user ID and its associated data from the clusters. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public RemoveUserIdResponse removeUserId(@Nonnull String userID) throws AlgoliaRuntimeException { @@ -3684,9 +3710,9 @@ public RemoveUserIdResponse removeUserId(@Nonnull String userID) throws AlgoliaR } /** - * (asynchronously) Remove a userID and its associated data from the multi-clusters. + * (asynchronously) Deletes a user ID and its associated data from the clusters. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3700,9 +3726,9 @@ public CompletableFuture removeUserIdAsync(@Nonnull String } /** - * (asynchronously) Remove a userID and its associated data from the multi-clusters. + * (asynchronously) Deletes a user ID and its associated data from the clusters. * - * @param userID userID to assign. (required) + * @param userID User ID to assign. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture removeUserIdAsync(@Nonnull String userID) throws AlgoliaRuntimeException { @@ -3710,7 +3736,7 @@ public CompletableFuture removeUserIdAsync(@Nonnull String } /** - * Replace all allowed sources. + * Replaces the list of allowed sources. * * @param source Allowed sources. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3722,7 +3748,7 @@ public ReplaceSourceResponse replaceSources(@Nonnull List source, Reques } /** - * Replace all allowed sources. + * Replaces the list of allowed sources. * * @param source Allowed sources. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3732,7 +3758,7 @@ public ReplaceSourceResponse replaceSources(@Nonnull List source) throws } /** - * (asynchronously) Replace all allowed sources. + * (asynchronously) Replaces the list of allowed sources. * * @param source Allowed sources. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3748,7 +3774,7 @@ public CompletableFuture replaceSourcesAsync(@Nonnull Lis } /** - * (asynchronously) Replace all allowed sources. + * (asynchronously) Replaces the list of allowed sources. * * @param source Allowed sources. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3758,8 +3784,9 @@ public CompletableFuture replaceSourcesAsync(@Nonnull Lis } /** - * Restore a deleted API key, along with its associated permissions. The request must be - * authenticated with the admin API key. + * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up + * to 1,000 API keys per application. If you create more, the oldest API keys are deleted and + * can't be restored. * * @param key API key. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3771,8 +3798,9 @@ public AddApiKeyResponse restoreApiKey(@Nonnull String key, RequestOptions reque } /** - * Restore a deleted API key, along with its associated permissions. The request must be - * authenticated with the admin API key. + * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up + * to 1,000 API keys per application. If you create more, the oldest API keys are deleted and + * can't be restored. * * @param key API key. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3782,8 +3810,9 @@ public AddApiKeyResponse restoreApiKey(@Nonnull String key) throws AlgoliaRuntim } /** - * (asynchronously) Restore a deleted API key, along with its associated permissions. The request - * must be authenticated with the admin API key. + * (asynchronously) Restores a deleted API key. Restoring resets the `validity` attribute to `0`. + * Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys + * are deleted and can't be restored. * * @param key API key. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3800,8 +3829,9 @@ public CompletableFuture restoreApiKeyAsync(@Nonnull String k } /** - * (asynchronously) Restore a deleted API key, along with its associated permissions. The request - * must be authenticated with the admin API key. + * (asynchronously) Restores a deleted API key. Restoring resets the `validity` attribute to `0`. + * Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys + * are deleted and can't be restored. * * @param key API key. (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3811,13 +3841,17 @@ public CompletableFuture restoreApiKeyAsync(@Nonnull String k } /** - * Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, - * Algolia automatically adds it. If you use an existing `objectID`, the existing record is - * replaced with the new one. To add multiple records to your index in a single API request, use - * the [`batch` operation](#tag/Records/operation/batch). + * Adds a record to an index or replace it. - If the record doesn't have an object ID, a new + * record with an auto-generated object ID is added to your index. - If a record with the + * specified object ID exists, the existing record is replaced. - If a record with the specified + * object ID doesn't exist, a new record is added to your index. - If you add a record to an index + * that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use + * the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple + * records, use the [`batch` operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3828,13 +3862,17 @@ public SaveObjectResponse saveObject(@Nonnull String indexName, @Nonnull Object } /** - * Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, - * Algolia automatically adds it. If you use an existing `objectID`, the existing record is - * replaced with the new one. To add multiple records to your index in a single API request, use - * the [`batch` operation](#tag/Records/operation/batch). + * Adds a record to an index or replace it. - If the record doesn't have an object ID, a new + * record with an auto-generated object ID is added to your index. - If a record with the + * specified object ID exists, the existing record is replaced. - If a record with the specified + * object ID doesn't exist, a new record is added to your index. - If you add a record to an index + * that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use + * the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple + * records, use the [`batch` operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public SaveObjectResponse saveObject(@Nonnull String indexName, @Nonnull Object body) throws AlgoliaRuntimeException { @@ -3842,13 +3880,17 @@ public SaveObjectResponse saveObject(@Nonnull String indexName, @Nonnull Object } /** - * (asynchronously) Add a record (object) to an index or replace it. If the record doesn't contain - * an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing - * record is replaced with the new one. To add multiple records to your index in a single API - * request, use the [`batch` operation](#tag/Records/operation/batch). + * (asynchronously) Adds a record to an index or replace it. - If the record doesn't have an + * object ID, a new record with an auto-generated object ID is added to your index. - If a record + * with the specified object ID exists, the existing record is replaced. - If a record with the + * specified object ID doesn't exist, a new record is added to your index. - If you add a record + * to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a + * record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or + * replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3867,13 +3909,17 @@ public CompletableFuture saveObjectAsync( } /** - * (asynchronously) Add a record (object) to an index or replace it. If the record doesn't contain - * an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing - * record is replaced with the new one. To add multiple records to your index in a single API - * request, use the [`batch` operation](#tag/Records/operation/batch). + * (asynchronously) Adds a record to an index or replace it. - If the record doesn't have an + * object ID, a new record with an auto-generated object ID is added to your index. - If a record + * with the specified object ID exists, the existing record is replaced. - If a record with the + * specified object ID doesn't exist, a new record is added to your index. - If you add a record + * to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a + * record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or + * replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param body The record, a schemaless object with attributes that are useful in the context of + * search and discovery. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture saveObjectAsync(@Nonnull String indexName, @Nonnull Object body) @@ -3882,14 +3928,14 @@ public CompletableFuture saveObjectAsync(@Nonnull String ind } /** - * To create or update more than one rule, use the [`batch` + * If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing + * rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3905,14 +3951,14 @@ public UpdatedRuleResponse saveRule( } /** - * To create or update more than one rule, use the [`batch` + * If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing + * rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedRuleResponse saveRule(@Nonnull String indexName, @Nonnull String objectID, @Nonnull Rule rule, Boolean forwardToReplicas) @@ -3921,10 +3967,11 @@ public UpdatedRuleResponse saveRule(@Nonnull String indexName, @Nonnull String o } /** - * To create or update more than one rule, use the [`batch` + * If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing + * rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -3941,10 +3988,11 @@ public UpdatedRuleResponse saveRule( } /** - * To create or update more than one rule, use the [`batch` + * If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing + * rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3955,14 +4003,14 @@ public UpdatedRuleResponse saveRule(@Nonnull String indexName, @Nonnull String o } /** - * (asynchronously) To create or update more than one rule, use the [`batch` + * (asynchronously) If a rule with the specified object ID doesn't exist, it's created. Otherwise, + * the existing rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -3991,14 +4039,14 @@ public CompletableFuture saveRuleAsync( } /** - * (asynchronously) To create or update more than one rule, use the [`batch` + * (asynchronously) If a rule with the specified object ID doesn't exist, it's created. Otherwise, + * the existing rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture saveRuleAsync( @@ -4011,10 +4059,11 @@ public CompletableFuture saveRuleAsync( } /** - * (asynchronously) To create or update more than one rule, use the [`batch` + * (asynchronously) If a rule with the specified object ID doesn't exist, it's created. Otherwise, + * the existing rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -4031,10 +4080,11 @@ public CompletableFuture saveRuleAsync( } /** - * (asynchronously) To create or update more than one rule, use the [`batch` + * (asynchronously) If a rule with the specified object ID doesn't exist, it's created. Otherwise, + * the existing rule is replaced. To create or update more than one rule, use the [`batch` * operation](#tag/Rules/operation/saveRules). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a rule object. (required) * @param rule (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4045,14 +4095,14 @@ public CompletableFuture saveRuleAsync(@Nonnull String inde } /** - * Create or update multiple rules. + * Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia + * creates a new one. Otherwise, existing rules are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param rules (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this - * batch. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param clearExistingRules Whether existing rules should be deleted before adding this batch. + * (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4068,14 +4118,14 @@ public UpdatedAtResponse saveRules( } /** - * Create or update multiple rules. + * Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia + * creates a new one. Otherwise, existing rules are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param rules (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this - * batch. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param clearExistingRules Whether existing rules should be deleted before adding this batch. + * (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse saveRules( @@ -4088,9 +4138,10 @@ public UpdatedAtResponse saveRules( } /** - * Create or update multiple rules. + * Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia + * creates a new one. Otherwise, existing rules are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param rules (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4102,9 +4153,10 @@ public UpdatedAtResponse saveRules(@Nonnull String indexName, @Nonnull List saveRulesAsync( } /** - * (asynchronously) Create or update multiple rules. + * (asynchronously) Create or update multiple rules. If a rule with the specified object ID + * doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param rules (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this - * batch. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param clearExistingRules Whether existing rules should be deleted before adding this batch. + * (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture saveRulesAsync( @@ -4168,9 +4220,10 @@ public CompletableFuture saveRulesAsync( } /** - * (asynchronously) Create or update multiple rules. + * (asynchronously) Create or update multiple rules. If a rule with the specified object ID + * doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param rules (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4185,9 +4238,10 @@ public CompletableFuture saveRulesAsync( } /** - * (asynchronously) Create or update multiple rules. + * (asynchronously) Create or update multiple rules. If a rule with the specified object ID + * doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param rules (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4197,18 +4251,14 @@ public CompletableFuture saveRulesAsync(@Nonnull String index } /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the + * existing synonym is replaced. To add multiple synonyms in a single API request, use the + * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4224,18 +4274,14 @@ public SaveSynonymResponse saveSynonym( } /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the + * existing synonym is replaced. To add multiple synonyms in a single API request, use the + * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public SaveSynonymResponse saveSynonym( @@ -4248,14 +4294,11 @@ public SaveSynonymResponse saveSynonym( } /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the + * existing synonym is replaced. To add multiple synonyms in a single API request, use the + * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -4272,14 +4315,11 @@ public SaveSynonymResponse saveSynonym( } /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the + * existing synonym is replaced. To add multiple synonyms in a single API request, use the + * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4290,18 +4330,14 @@ public SaveSynonymResponse saveSynonym(@Nonnull String indexName, @Nonnull Strin } /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * (asynchronously) If a synonym with the specified object ID doesn't exist, Algolia adds a new + * one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API + * request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4330,18 +4366,14 @@ public CompletableFuture saveSynonymAsync( } /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * (asynchronously) If a synonym with the specified object ID doesn't exist, Algolia adds a new + * one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API + * request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture saveSynonymAsync( @@ -4354,14 +4386,11 @@ public CompletableFuture saveSynonymAsync( } /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * (asynchronously) If a synonym with the specified object ID doesn't exist, Algolia adds a new + * one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API + * request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -4378,14 +4407,11 @@ public CompletableFuture saveSynonymAsync( } /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). + * (asynchronously) If a synonym with the specified object ID doesn't exist, Algolia adds a new + * one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API + * request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param objectID Unique identifier of a synonym object. (required) * @param synonymHit (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4399,14 +4425,14 @@ public CompletableFuture saveSynonymAsync( } /** - * Create or update multiple synonyms. + * If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing + * synonyms are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the - * ones sent with this request. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param replaceExistingSynonyms Whether to replace all synonyms in the index with the ones sent + * with this request. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4422,14 +4448,14 @@ public UpdatedAtResponse saveSynonyms( } /** - * Create or update multiple synonyms. + * If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing + * synonyms are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the - * ones sent with this request. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param replaceExistingSynonyms Whether to replace all synonyms in the index with the ones sent + * with this request. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse saveSynonyms( @@ -4442,9 +4468,10 @@ public UpdatedAtResponse saveSynonyms( } /** - * Create or update multiple synonyms. + * If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing + * synonyms are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param synonymHit (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4456,9 +4483,10 @@ public UpdatedAtResponse saveSynonyms(@Nonnull String indexName, @Nonnull List saveSynonymsAsync( } /** - * (asynchronously) Create or update multiple synonyms. + * (asynchronously) If a synonym with the `objectID` doesn't exist, Algolia adds a new one. + * Otherwise, existing synonyms are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the - * ones sent with this request. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param replaceExistingSynonyms Whether to replace all synonyms in the index with the ones sent + * with this request. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture saveSynonymsAsync( @@ -4522,9 +4550,10 @@ public CompletableFuture saveSynonymsAsync( } /** - * (asynchronously) Create or update multiple synonyms. + * (asynchronously) If a synonym with the `objectID` doesn't exist, Algolia adds a new one. + * Otherwise, existing synonyms are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param synonymHit (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4539,9 +4568,10 @@ public CompletableFuture saveSynonymsAsync( } /** - * (asynchronously) Create or update multiple synonyms. + * (asynchronously) If a synonym with the `objectID` doesn't exist, Algolia adds a new one. + * Otherwise, existing synonyms are replaced. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param synonymHit (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4551,10 +4581,12 @@ public CompletableFuture saveSynonymsAsync(@Nonnull String in } /** - * Send multiple search queries to one or more indices. + * Sends multiple search request to one or more indices. This can be useful in these cases: - + * Different indices for different purposes, such as, one index for products, another one for + * marketing content. - Multiple searches to the same index—for example, with different filters. * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) + * @param searchMethodParams Muli-search request body. Results are returned in the same order as + * the requests. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4566,10 +4598,12 @@ public SearchResponses search(@Nonnull SearchMethodParams searchMethodPar } /** - * Send multiple search queries to one or more indices. + * Sends multiple search request to one or more indices. This can be useful in these cases: - + * Different indices for different purposes, such as, one index for products, another one for + * marketing content. - Multiple searches to the same index—for example, with different filters. * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) + * @param searchMethodParams Muli-search request body. Results are returned in the same order as + * the requests. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4578,10 +4612,13 @@ public SearchResponses search(@Nonnull SearchMethodParams searchMethodPar } /** - * (asynchronously) Send multiple search queries to one or more indices. + * (asynchronously) Sends multiple search request to one or more indices. This can be useful in + * these cases: - Different indices for different purposes, such as, one index for products, + * another one for marketing content. - Multiple searches to the same index—for example, with + * different filters. * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) + * @param searchMethodParams Muli-search request body. Results are returned in the same order as + * the requests. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4605,10 +4642,13 @@ public CompletableFuture> searchAsync( } /** - * (asynchronously) Send multiple search queries to one or more indices. + * (asynchronously) Sends multiple search request to one or more indices. This can be useful in + * these cases: - Different indices for different purposes, such as, one index for products, + * another one for marketing content. - Multiple searches to the same index—for example, with + * different filters. * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) + * @param searchMethodParams Muli-search request body. Results are returned in the same order as + * the requests. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4618,22 +4658,15 @@ public CompletableFuture> searchAsync(@Nonnull SearchMeth } /** - * Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. + * Searches for standard and custom dictionary entries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param searchDictionaryEntriesParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public UpdatedAtResponse searchDictionaryEntries( + public SearchDictionaryEntriesResponse searchDictionaryEntries( @Nonnull DictionaryType dictionaryName, @Nonnull SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions requestOptions @@ -4642,20 +4675,13 @@ public UpdatedAtResponse searchDictionaryEntries( } /** - * Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. + * Searches for standard and custom dictionary entries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param searchDictionaryEntriesParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public UpdatedAtResponse searchDictionaryEntries( + public SearchDictionaryEntriesResponse searchDictionaryEntries( @Nonnull DictionaryType dictionaryName, @Nonnull SearchDictionaryEntriesParams searchDictionaryEntriesParams ) throws AlgoliaRuntimeException { @@ -4663,22 +4689,15 @@ public UpdatedAtResponse searchDictionaryEntries( } /** - * (asynchronously) Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. + * (asynchronously) Searches for standard and custom dictionary entries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param searchDictionaryEntriesParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture searchDictionaryEntriesAsync( + public CompletableFuture searchDictionaryEntriesAsync( @Nonnull DictionaryType dictionaryName, @Nonnull SearchDictionaryEntriesParams searchDictionaryEntriesParams, RequestOptions requestOptions @@ -4697,24 +4716,17 @@ public CompletableFuture searchDictionaryEntriesAsync( .setBody(searchDictionaryEntriesParams) .setRead(true) .build(); - return executeAsync(request, requestOptions, new TypeReference() {}); + return executeAsync(request, requestOptions, new TypeReference() {}); } /** - * (asynchronously) Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. + * (asynchronously) Searches for standard and custom dictionary entries. * - * @param dictionaryName Dictionary to search in. (required) + * @param dictionaryName Dictionary type in which to search. (required) * @param searchDictionaryEntriesParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture searchDictionaryEntriesAsync( + public CompletableFuture searchDictionaryEntriesAsync( @Nonnull DictionaryType dictionaryName, @Nonnull SearchDictionaryEntriesParams searchDictionaryEntriesParams ) throws AlgoliaRuntimeException { @@ -4722,14 +4734,14 @@ public CompletableFuture searchDictionaryEntriesAsync( } /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * Searches for values of a specified facet attribute. - By default, facet values are sorted by + * decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for + * facet values doesn't work if you have **more than 65 searchable facets and searchable + * attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @param searchForFacetValuesRequest (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4745,14 +4757,14 @@ public SearchForFacetValuesResponse searchForFacetValues( } /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * Searches for values of a specified facet attribute. - By default, facet values are sorted by + * decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for + * facet values doesn't work if you have **more than 65 searchable facets and searchable + * attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @param searchForFacetValuesRequest (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4765,14 +4777,14 @@ public SearchForFacetValuesResponse searchForFacetValues( } /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * Searches for values of a specified facet attribute. - By default, facet values are sorted by + * decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for + * facet values doesn't work if you have **more than 65 searchable facets and searchable + * attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4786,14 +4798,14 @@ public SearchForFacetValuesResponse searchForFacetValues( } /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * Searches for values of a specified facet attribute. - By default, facet values are sorted by + * decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for + * facet values doesn't work if you have **more than 65 searchable facets and searchable + * attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public SearchForFacetValuesResponse searchForFacetValues(@Nonnull String indexName, @Nonnull String facetName) @@ -4802,14 +4814,14 @@ public SearchForFacetValuesResponse searchForFacetValues(@Nonnull String indexNa } /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * (asynchronously) Searches for values of a specified facet attribute. - By default, facet values + * are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - + * Searching for facet values doesn't work if you have **more than 65 searchable facets and + * searchable attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @param searchForFacetValuesRequest (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4836,14 +4848,14 @@ public CompletableFuture searchForFacetValuesAsync } /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * (asynchronously) Searches for values of a specified facet attribute. - By default, facet values + * are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - + * Searching for facet values doesn't work if you have **more than 65 searchable facets and + * searchable attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @param searchForFacetValuesRequest (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4856,14 +4868,14 @@ public CompletableFuture searchForFacetValuesAsync } /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * (asynchronously) Searches for values of a specified facet attribute. - By default, facet values + * are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - + * Searching for facet values doesn't work if you have **more than 65 searchable facets and + * searchable attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4877,14 +4889,14 @@ public CompletableFuture searchForFacetValuesAsync } /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * (asynchronously) Searches for values of a specified facet attribute. - By default, facet values + * are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - + * Searching for facet values doesn't work if you have **more than 65 searchable facets and + * searchable attributes combined**. * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) + * @param indexName Name of the index on which to perform the operation. (required) + * @param facetName Facet attribute in which to search for values. This attribute must be included + * in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture searchForFacetValuesAsync(@Nonnull String indexName, @Nonnull String facetName) @@ -4893,10 +4905,9 @@ public CompletableFuture searchForFacetValuesAsync } /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. + * Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchRulesParams (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4908,10 +4919,9 @@ public SearchRulesResponse searchRules(@Nonnull String indexName, SearchRulesPar } /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. + * Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchRulesParams (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4920,10 +4930,9 @@ public SearchRulesResponse searchRules(@Nonnull String indexName, SearchRulesPar } /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. + * Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4933,10 +4942,9 @@ public SearchRulesResponse searchRules(@Nonnull String indexName, RequestOptions } /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. + * Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public SearchRulesResponse searchRules(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -4944,10 +4952,9 @@ public SearchRulesResponse searchRules(@Nonnull String indexName) throws Algolia } /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. + * (asynchronously) Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchRulesParams (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -4971,10 +4978,9 @@ public CompletableFuture searchRulesAsync( } /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. + * (asynchronously) Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchRulesParams (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -4984,10 +4990,9 @@ public CompletableFuture searchRulesAsync(@Nonnull String i } /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. + * (asynchronously) Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -4998,10 +5003,9 @@ public CompletableFuture searchRulesAsync(@Nonnull String i } /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. + * (asynchronously) Searches for rules in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture searchRulesAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -5009,9 +5013,11 @@ public CompletableFuture searchRulesAsync(@Nonnull String i } /** - * Return records that match the query. + * Searches a single index and return matching search results (_hits_). This method lets you + * retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -5028,9 +5034,11 @@ public SearchResponse searchSingleIndex( } /** - * Return records that match the query. + * Searches a single index and return matching search results (_hits_). This method lets you + * retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5041,9 +5049,11 @@ public SearchResponse searchSingleIndex(@Nonnull String indexName, Search } /** - * Return records that match the query. + * Searches a single index and return matching search results (_hits_). This method lets you + * retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -5055,9 +5065,11 @@ public SearchResponse searchSingleIndex(@Nonnull String indexName, Class< } /** - * Return records that match the query. + * Searches a single index and return matching search results (_hits_). This method lets you + * retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -5066,9 +5078,11 @@ public SearchResponse searchSingleIndex(@Nonnull String indexName, Class< } /** - * (asynchronously) Return records that match the query. + * (asynchronously) Searches a single index and return matching search results (_hits_). This + * method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -5094,9 +5108,11 @@ public CompletableFuture> searchSingleIndexAsync( } /** - * (asynchronously) Return records that match the query. + * (asynchronously) Searches a single index and return matching search results (_hits_). This + * method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchParams (optional) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5110,9 +5126,11 @@ public CompletableFuture> searchSingleIndexAsync( } /** - * (asynchronously) Return records that match the query. + * (asynchronously) Searches a single index and return matching search results (_hits_). This + * method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -5127,9 +5145,11 @@ public CompletableFuture> searchSingleIndexAsync( } /** - * (asynchronously) Return records that match the query. + * (asynchronously) Searches a single index and return matching search results (_hits_). This + * method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` + * operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param innerType The class held by the index, could be your custom class or {@link Object}. * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -5139,10 +5159,9 @@ public CompletableFuture> searchSingleIndexAsync(@Nonnull } /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. + * Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -5157,10 +5176,9 @@ public SearchSynonymsResponse searchSynonyms( } /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. + * Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -5170,10 +5188,9 @@ public SearchSynonymsResponse searchSynonyms(@Nonnull String indexName, SearchSy } /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. + * Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5183,10 +5200,9 @@ public SearchSynonymsResponse searchSynonyms(@Nonnull String indexName, RequestO } /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. + * Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public SearchSynonymsResponse searchSynonyms(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -5194,10 +5210,9 @@ public SearchSynonymsResponse searchSynonyms(@Nonnull String indexName) throws A } /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. + * (asynchronously) Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -5221,10 +5236,9 @@ public CompletableFuture searchSynonymsAsync( } /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. + * (asynchronously) Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -5236,10 +5250,9 @@ public CompletableFuture searchSynonymsAsync( } /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. + * (asynchronously) Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5250,10 +5263,9 @@ public CompletableFuture searchSynonymsAsync(@Nonnull St } /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. + * (asynchronously) Searches for synonyms in your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture searchSynonymsAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { @@ -5261,11 +5273,11 @@ public CompletableFuture searchSynonymsAsync(@Nonnull St } /** - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as - * the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID - * usage. For example, if you add or move a user ID, the search will show an old value until the - * next time the mapping is rebuilt (every 12 hours). + * Since it can take a few seconds to get the data from the different clusters, the response isn't + * real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the + * mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. + * For example, if you add or move a user ID, the search will show an old value until the next + * time the mapping is rebuilt (every 12 hours). * * @param searchUserIdsParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -5278,11 +5290,11 @@ public SearchUserIdsResponse searchUserIds(@Nonnull SearchUserIdsParams searchUs } /** - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as - * the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID - * usage. For example, if you add or move a user ID, the search will show an old value until the - * next time the mapping is rebuilt (every 12 hours). + * Since it can take a few seconds to get the data from the different clusters, the response isn't + * real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the + * mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. + * For example, if you add or move a user ID, the search will show an old value until the next + * time the mapping is rebuilt (every 12 hours). * * @param searchUserIdsParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5292,11 +5304,11 @@ public SearchUserIdsResponse searchUserIds(@Nonnull SearchUserIdsParams searchUs } /** - * (asynchronously) Since it can take up to a few seconds to get the data from the different - * clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built - * at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the - * update of user ID usage. For example, if you add or move a user ID, the search will show an old - * value until the next time the mapping is rebuilt (every 12 hours). + * (asynchronously) Since it can take a few seconds to get the data from the different clusters, + * the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the + * same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of + * user ID usage. For example, if you add or move a user ID, the search will show an old value + * until the next time the mapping is rebuilt (every 12 hours). * * @param searchUserIdsParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -5320,11 +5332,11 @@ public CompletableFuture searchUserIdsAsync( } /** - * (asynchronously) Since it can take up to a few seconds to get the data from the different - * clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built - * at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the - * update of user ID usage. For example, if you add or move a user ID, the search will show an old - * value until the next time the mapping is rebuilt (every 12 hours). + * (asynchronously) Since it can take a few seconds to get the data from the different clusters, + * the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the + * same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of + * user ID usage. For example, if you add or move a user ID, the search will show an old value + * until the next time the mapping is rebuilt (every 12 hours). * * @param searchUserIdsParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5335,7 +5347,7 @@ public CompletableFuture searchUserIdsAsync(@Nonnull Sear } /** - * Set stop word settings for a specific language. + * Turns standard stop word dictionary entries on or off for a given language. * * @param dictionarySettingsParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -5348,7 +5360,7 @@ public UpdatedAtResponse setDictionarySettings(@Nonnull DictionarySettingsParams } /** - * Set stop word settings for a specific language. + * Turns standard stop word dictionary entries on or off for a given language. * * @param dictionarySettingsParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5359,7 +5371,7 @@ public UpdatedAtResponse setDictionarySettings(@Nonnull DictionarySettingsParams } /** - * (asynchronously) Set stop word settings for a specific language. + * (asynchronously) Turns standard stop word dictionary entries on or off for a given language. * * @param dictionarySettingsParams (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with @@ -5385,7 +5397,7 @@ public CompletableFuture setDictionarySettingsAsync( } /** - * (asynchronously) Set stop word settings for a specific language. + * (asynchronously) Turns standard stop word dictionary entries on or off for a given language. * * @param dictionarySettingsParams (required) * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5396,14 +5408,13 @@ public CompletableFuture setDictionarySettingsAsync(@Nonnull } /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * Update the specified index settings. Index settings that you don't specify are left unchanged. + * Specify `null` to reset a setting to its default value. For best performance, update the index + * settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5418,14 +5429,13 @@ public UpdatedAtResponse setSettings( } /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * Update the specified index settings. Index settings that you don't specify are left unchanged. + * Specify `null` to reset a setting to its default value. For best performance, update the index + * settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public UpdatedAtResponse setSettings(@Nonnull String indexName, @Nonnull IndexSettings indexSettings, Boolean forwardToReplicas) @@ -5434,11 +5444,11 @@ public UpdatedAtResponse setSettings(@Nonnull String indexName, @Nonnull IndexSe } /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * Update the specified index settings. Index settings that you don't specify are left unchanged. + * Specify `null` to reset a setting to its default value. For best performance, update the index + * settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -5450,11 +5460,11 @@ public UpdatedAtResponse setSettings(@Nonnull String indexName, @Nonnull IndexSe } /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * Update the specified index settings. Index settings that you don't specify are left unchanged. + * Specify `null` to reset a setting to its default value. For best performance, update the index + * settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -5463,14 +5473,13 @@ public UpdatedAtResponse setSettings(@Nonnull String indexName, @Nonnull IndexSe } /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * (asynchronously) Update the specified index settings. Index settings that you don't specify are + * left unchanged. Specify `null` to reset a setting to its default value. For best performance, + * update the index settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call @@ -5496,14 +5505,13 @@ public CompletableFuture setSettingsAsync( } /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * (asynchronously) Update the specified index settings. Index settings that you don't specify are + * left unchanged. Specify `null` to reset a setting to its default value. For best performance, + * update the index settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) + * @param forwardToReplicas Whether changes are applied to replica indices. (optional) * @throws AlgoliaRuntimeException If it fails to process the API call */ public CompletableFuture setSettingsAsync( @@ -5515,11 +5523,11 @@ public CompletableFuture setSettingsAsync( } /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * (asynchronously) Update the specified index settings. Index settings that you don't specify are + * left unchanged. Specify `null` to reset a setting to its default value. For best performance, + * update the index settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) * @param requestOptions The requestOptions to send along with the query, they will be merged with * the transporter requestOptions. @@ -5534,11 +5542,11 @@ public CompletableFuture setSettingsAsync( } /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. + * (asynchronously) Update the specified index settings. Index settings that you don't specify are + * left unchanged. Specify `null` to reset a setting to its default value. For best performance, + * update the index settings before you add new records to your index. * - * @param indexName Index on which to perform the request. (required) + * @param indexName Name of the index on which to perform the operation. (required) * @param indexSettings (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ @@ -5548,8 +5556,8 @@ public CompletableFuture setSettingsAsync(@Nonnull String ind } /** - * Replace the permissions of an existing API key. Any unspecified parameter resets that - * permission to its default value. The request must be authenticated with the admin API key. + * Replaces the permissions of an existing API key. Any unspecified attribute resets that + * attribute to its default value. * * @param key API key. (required) * @param apiKey (required) @@ -5563,8 +5571,8 @@ public UpdateApiKeyResponse updateApiKey(@Nonnull String key, @Nonnull ApiKey ap } /** - * Replace the permissions of an existing API key. Any unspecified parameter resets that - * permission to its default value. The request must be authenticated with the admin API key. + * Replaces the permissions of an existing API key. Any unspecified attribute resets that + * attribute to its default value. * * @param key API key. (required) * @param apiKey (required) @@ -5575,9 +5583,8 @@ public UpdateApiKeyResponse updateApiKey(@Nonnull String key, @Nonnull ApiKey ap } /** - * (asynchronously) Replace the permissions of an existing API key. Any unspecified parameter - * resets that permission to its default value. The request must be authenticated with the admin - * API key. + * (asynchronously) Replaces the permissions of an existing API key. Any unspecified attribute + * resets that attribute to its default value. * * @param key API key. (required) * @param apiKey (required) @@ -5599,9 +5606,8 @@ public CompletableFuture updateApiKeyAsync( } /** - * (asynchronously) Replace the permissions of an existing API key. Any unspecified parameter - * resets that permission to its default value. The request must be authenticated with the admin - * API key. + * (asynchronously) Replaces the permissions of an existing API key. Any unspecified attribute + * resets that attribute to its default value. * * @param key API key. (required) * @param apiKey (required) diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/ABTestResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/ABTestResponse.java index d3006adc23..4328cfde02 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/ABTestResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/ABTestResponse.java @@ -48,8 +48,8 @@ public ABTestResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java index 4a2550a930..40ff1b814e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java @@ -46,7 +46,7 @@ public SearchNoResultEvent setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearch.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearch.java index 966f317177..57ec97e5e5 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearch.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearch.java @@ -48,7 +48,7 @@ public TopSearch setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java index 249af3df53..bc80f97b72 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java @@ -146,7 +146,7 @@ public TopSearchWithAnalytics setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Anchoring.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Anchoring.java index 4817933d92..9145163f18 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Anchoring.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Anchoring.java @@ -7,8 +7,10 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the - * query string, is an exact match (`is`), or a partial match (`contains`). + * Which part of the search query the pattern should match: - `startsWith`. The pattern must match + * the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. + * The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the + * query. Empty queries are only allowed as pattern with `anchoring: is`. */ public enum Anchoring { IS("is"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java index c3e45e4499..16a56f3e2e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java @@ -14,9 +14,8 @@ import java.util.logging.Logger; /** - * Precision of a geographical search (in meters), to [group results that are more or less the same - * distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * Precision of a coordinate-based search in meters to group results with similar distances. The Geo + * ranking criterion considers all matches within the same range of distances to be equal. */ @JsonDeserialize(using = AroundPrecision.Deserializer.class) public interface AroundPrecision { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java index dff33370f2..280aca7e22 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** AroundPrecisionFromValueInner */ +/** Range object with lower and upper values in meters to define custom ranges. */ public class AroundPrecisionFromValueInner { @JsonProperty("from") @@ -21,7 +21,10 @@ public AroundPrecisionFromValueInner setFrom(Integer from) { return this; } - /** Get from */ + /** + * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the + * range to be equal. + */ @javax.annotation.Nullable public Integer getFrom() { return from; @@ -32,7 +35,10 @@ public AroundPrecisionFromValueInner setValue(Integer value) { return this; } - /** Get value */ + /** + * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the + * range to be equal. + */ @javax.annotation.Nullable public Integer getValue() { return value; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadius.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadius.java index 7ba8096746..4def95185c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadius.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadius.java @@ -12,9 +12,10 @@ import java.util.logging.Logger; /** - * [Maximum - * radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - * for a geographical search (in meters). + * Maximum radius for a search around a central location. This parameter works in combination with + * the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is + * determined automatically from the density of hits around the central location. The search radius + * is small if there are many hits close to the central coordinates. */ @JsonDeserialize(using = AroundRadius.Deserializer.class) public interface AroundRadius { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java index 8104e35f11..6f34a3cf45 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Gets or Sets aroundRadiusAll */ +/** Return all records with a valid `_geoloc` attribute. Don't filter by distance. */ @JsonDeserialize(as = AroundRadiusAll.class) public enum AroundRadiusAll implements AroundRadius { ALL("all"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java index e73f45ef56..645cb63016 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Automatic facet Filter. */ +/** Filter or optional filter to be applied to the search. */ public class AutomaticFacetFilter { @JsonProperty("facet") @@ -24,7 +24,10 @@ public AutomaticFacetFilter setFacet(String facet) { return this; } - /** Attribute to filter on. This must match a facet placeholder in the Rule's pattern. */ + /** + * Facet name to be applied as filter. The name must match placeholders in the `pattern` + * parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. + */ @javax.annotation.Nonnull public String getFacet() { return facet; @@ -35,7 +38,7 @@ public AutomaticFacetFilter setScore(Integer score) { return this; } - /** Score for the filter. Typically used for optional or disjunctive filters. */ + /** Filter scores to give different weights to individual filters. */ @javax.annotation.Nullable public Integer getScore() { return score; @@ -46,7 +49,11 @@ public AutomaticFacetFilter setDisjunctive(Boolean disjunctive) { return this; } - /** Whether the filter is disjunctive (true) or conjunctive (false). */ + /** + * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, + * multiple occurences are combined with the logical `OR` operation. If false, multiple occurences + * are combined with the logical `AND` operation. + */ @javax.annotation.Nullable public Boolean getDisjunctive() { return disjunctive; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java index ec4c0bf952..8425f3b14a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java @@ -14,8 +14,9 @@ import java.util.logging.Logger; /** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a - * facet value placeholder in the query pattern. + * Filter to be applied to the search. You can use this to respond to search queries that match a + * facet value. For example, if users search for \"comedy\", which matches a facet value of the + * \"genre\" facet, you can filter the results to show the top-ranked comedy movies. */ @JsonDeserialize(using = AutomaticFacetFilters.Deserializer.class) public interface AutomaticFacetFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java index 7a7e23569c..5d2ab52fbf 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java @@ -24,7 +24,7 @@ public BaseRecommendRequest setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendationsQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendationsQuery.java index f9dacea826..04159ef1ef 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendationsQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendationsQuery.java @@ -38,7 +38,7 @@ public BaseRecommendationsQuery setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendedForYouQueryParameters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendedForYouQueryParameters.java index 400ebaf7f6..1ae108c1f8 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendedForYouQueryParameters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseRecommendedForYouQueryParameters.java @@ -19,9 +19,9 @@ public BaseRecommendedForYouQueryParameters setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nonnull public String getUserToken() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParams.java index 14f8d8ff8b..5b82fd4cd5 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParams.java @@ -90,9 +90,6 @@ public class BaseSearchParams { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -116,7 +113,7 @@ public BaseSearchParams setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -127,7 +124,14 @@ public BaseSearchParams setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -139,8 +143,21 @@ public BaseSearchParams setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -197,9 +214,9 @@ public BaseSearchParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -219,10 +236,7 @@ public BaseSearchParams addRestrictSearchableAttributes(String restrictSearchabl return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -242,9 +256,10 @@ public BaseSearchParams addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -257,11 +272,11 @@ public BaseSearchParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -273,7 +288,7 @@ public BaseSearchParams setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -284,13 +299,7 @@ public BaseSearchParams setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -301,14 +310,7 @@ public BaseSearchParams setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -320,9 +322,10 @@ public BaseSearchParams setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -334,10 +337,7 @@ public BaseSearchParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -371,7 +371,7 @@ public BaseSearchParams setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -393,9 +393,11 @@ public BaseSearchParams addInsideBoundingBox(List insideBoundingBoxItem) } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -416,9 +418,11 @@ public BaseSearchParams addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -439,10 +443,10 @@ public BaseSearchParams addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -463,9 +467,9 @@ public BaseSearchParams addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -478,8 +482,11 @@ public BaseSearchParams setPersonalizationImpact(Integer personalizationImpact) } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -492,9 +499,9 @@ public BaseSearchParams setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -506,40 +513,18 @@ public BaseSearchParams setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public BaseSearchParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public BaseSearchParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public BaseSearchParams setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -551,9 +536,9 @@ public BaseSearchParams setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -565,10 +550,7 @@ public BaseSearchParams setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -601,7 +583,7 @@ public BaseSearchParams setPercentileComputation(Boolean percentileComputation) return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -612,7 +594,7 @@ public BaseSearchParams setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; @@ -654,7 +636,6 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, baseSearchParams.personalizationImpact) && Objects.equals(this.userToken, baseSearchParams.userToken) && Objects.equals(this.getRankingInfo, baseSearchParams.getRankingInfo) && - Objects.equals(this.explain, baseSearchParams.explain) && Objects.equals(this.synonyms, baseSearchParams.synonyms) && Objects.equals(this.clickAnalytics, baseSearchParams.clickAnalytics) && Objects.equals(this.analytics, baseSearchParams.analytics) && @@ -693,7 +674,6 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, @@ -733,7 +713,6 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java index f1fa4e7efd..905b91fb27 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java @@ -87,9 +87,6 @@ public class BaseSearchParamsWithoutQuery { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -113,7 +110,14 @@ public BaseSearchParamsWithoutQuery setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -125,8 +129,21 @@ public BaseSearchParamsWithoutQuery setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -183,9 +200,9 @@ public BaseSearchParamsWithoutQuery setSumOrFiltersScores(Boolean sumOrFiltersSc } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -205,10 +222,7 @@ public BaseSearchParamsWithoutQuery addRestrictSearchableAttributes(String restr return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -228,9 +242,10 @@ public BaseSearchParamsWithoutQuery addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -243,11 +258,11 @@ public BaseSearchParamsWithoutQuery setFacetingAfterDistinct(Boolean facetingAft } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -259,7 +274,7 @@ public BaseSearchParamsWithoutQuery setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -270,13 +285,7 @@ public BaseSearchParamsWithoutQuery setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -287,14 +296,7 @@ public BaseSearchParamsWithoutQuery setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -306,9 +308,10 @@ public BaseSearchParamsWithoutQuery setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -320,10 +323,7 @@ public BaseSearchParamsWithoutQuery setAroundLatLngViaIP(Boolean aroundLatLngVia return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -357,7 +357,7 @@ public BaseSearchParamsWithoutQuery setMinimumAroundRadius(Integer minimumAround } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -379,9 +379,11 @@ public BaseSearchParamsWithoutQuery addInsideBoundingBox(List insideBoun } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -402,9 +404,11 @@ public BaseSearchParamsWithoutQuery addInsidePolygon(List insidePolygonI } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -425,10 +429,10 @@ public BaseSearchParamsWithoutQuery addNaturalLanguages(String naturalLanguagesI } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -449,9 +453,9 @@ public BaseSearchParamsWithoutQuery addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -464,8 +468,11 @@ public BaseSearchParamsWithoutQuery setPersonalizationImpact(Integer personaliza } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -478,9 +485,9 @@ public BaseSearchParamsWithoutQuery setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -492,40 +499,18 @@ public BaseSearchParamsWithoutQuery setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public BaseSearchParamsWithoutQuery setExplain(List explain) { - this.explain = explain; - return this; - } - - public BaseSearchParamsWithoutQuery addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public BaseSearchParamsWithoutQuery setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -537,9 +522,9 @@ public BaseSearchParamsWithoutQuery setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -551,10 +536,7 @@ public BaseSearchParamsWithoutQuery setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -587,7 +569,7 @@ public BaseSearchParamsWithoutQuery setPercentileComputation(Boolean percentileC return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -598,7 +580,7 @@ public BaseSearchParamsWithoutQuery setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; @@ -639,7 +621,6 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, baseSearchParamsWithoutQuery.personalizationImpact) && Objects.equals(this.userToken, baseSearchParamsWithoutQuery.userToken) && Objects.equals(this.getRankingInfo, baseSearchParamsWithoutQuery.getRankingInfo) && - Objects.equals(this.explain, baseSearchParamsWithoutQuery.explain) && Objects.equals(this.synonyms, baseSearchParamsWithoutQuery.synonyms) && Objects.equals(this.clickAnalytics, baseSearchParamsWithoutQuery.clickAnalytics) && Objects.equals(this.analytics, baseSearchParamsWithoutQuery.analytics) && @@ -677,7 +658,6 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, @@ -716,7 +696,6 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java index 4e28624b31..843379f083 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java @@ -152,7 +152,7 @@ public BaseSearchResponse setAutomaticRadius(String automaticRadius) { return this; } - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ @javax.annotation.Nullable public String getAutomaticRadius() { return automaticRadius; @@ -230,7 +230,7 @@ public BaseSearchResponse putFacets(String key, Map facetsItem) return this; } - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ @javax.annotation.Nullable public Map> getFacets() { return facets; @@ -307,7 +307,7 @@ public BaseSearchResponse setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; @@ -318,7 +318,7 @@ public BaseSearchResponse setNbPages(Integer nbPages) { return this; } - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @javax.annotation.Nonnull public Integer getNbPages() { return nbPages; @@ -340,7 +340,7 @@ public BaseSearchResponse setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nonnull public Integer getPage() { return page; @@ -448,7 +448,7 @@ public BaseSearchResponse setUserData(Object userData) { return this; } - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @javax.annotation.Nullable public Object getUserData() { return userData; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Condition.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Condition.java index 65a3124507..f526f97786 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Condition.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Condition.java @@ -22,12 +22,20 @@ public class Condition { @JsonProperty("context") private String context; + @JsonProperty("filters") + private String filters; + public Condition setPattern(String pattern) { this.pattern = pattern; return this; } - /** Query pattern syntax. */ + /** + * Query pattern that triggers the rule. You can use either a literal string, or a special pattern + * `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query + * matches the literal string or a value of the specified facet. For example, with `pattern: + * {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". + */ @javax.annotation.Nullable public String getPattern() { return pattern; @@ -49,7 +57,7 @@ public Condition setAlternatives(Boolean alternatives) { return this; } - /** Whether the pattern matches on plurals, synonyms, and typos. */ + /** Whether the pattern should match plurals, synonyms, and typos. */ @javax.annotation.Nullable public Boolean getAlternatives() { return alternatives; @@ -60,12 +68,32 @@ public Condition setContext(String context) { return this; } - /** Rule context format: [A-Za-z0-9_-]+). */ + /** + * An additional restriction that only triggers the rule, when the search has the same value as + * `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when + * the search request has a matching `ruleContexts: mobile`. A rule context must only contain + * alphanumeric characters. + */ @javax.annotation.Nullable public String getContext() { return context; } + public Condition setFilters(String filters) { + this.filters = filters; + return this; + } + + /** + * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that + * the rule is triggered, when the specific filter is selected. You can use `filters` on its own + * or combine it with the `pattern` parameter. + */ + @javax.annotation.Nullable + public String getFilters() { + return filters; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +107,14 @@ public boolean equals(Object o) { Objects.equals(this.pattern, condition.pattern) && Objects.equals(this.anchoring, condition.anchoring) && Objects.equals(this.alternatives, condition.alternatives) && - Objects.equals(this.context, condition.context) + Objects.equals(this.context, condition.context) && + Objects.equals(this.filters, condition.filters) ); } @Override public int hashCode() { - return Objects.hash(pattern, anchoring, alternatives, context); + return Objects.hash(pattern, anchoring, alternatives, context, filters); } @Override @@ -96,6 +125,7 @@ public String toString() { sb.append(" anchoring: ").append(toIndentedString(anchoring)).append("\n"); sb.append(" alternatives: ").append(toIndentedString(alternatives)).append("\n"); sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Consequence.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Consequence.java index be488ab1f7..797a2e720b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Consequence.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Consequence.java @@ -10,8 +10,8 @@ import java.util.Objects; /** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - * of a rule. + * Effect of the rule. For more information, see + * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). */ public class Consequence { @@ -54,7 +54,10 @@ public Consequence addPromote(Promote promoteItem) { return this; } - /** Records to promote. */ + /** + * Records you want to pin to a specific position in the search results. You can promote up to 300 + * records, either individually, or as groups of up to 100 records each. + */ @javax.annotation.Nullable public List getPromote() { return promote; @@ -66,9 +69,10 @@ public Consequence setFilterPromotes(Boolean filterPromotes) { } /** - * Only use in combination with the `promote` consequence. When `true`, promoted results will be - * restricted to match the filters of the current search. When `false`, the promoted results will - * show up regardless of the filters. + * Whether promoted records must match an active filter for the consequence to be applied. This + * ensures that user actions (filtering the search) are given a higher precendence. For example, + * if you promote a record with the `color: red` attribute, and the user filters the search for + * `color: blue`, the \"red\" record won't be shown. */ @javax.annotation.Nullable public Boolean getFilterPromotes() { @@ -88,7 +92,7 @@ public Consequence addHide(ConsequenceHide hideItem) { return this; } - /** Records to hide. By default, you can hide up to 50 records per rule. */ + /** Records you want to hide from the search results. */ @javax.annotation.Nullable public List getHide() { return hide; @@ -100,8 +104,8 @@ public Consequence setUserData(Object userData) { } /** - * Custom JSON object that will be appended to the userData array in the response. This object - * isn't interpreted by the API. It's limited to 1kB of minified JSON. + * A JSON object with custom data that will be appended to the `userData` array in the response. + * This object isn't interpreted by the API and is limited to 1 kB of minified JSON. */ @javax.annotation.Nullable public Object getUserData() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceHide.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceHide.java index 93a0bd2a72..ba3a80c534 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceHide.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceHide.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Unique identifier of the record to hide. */ +/** Object ID of the record to hide. */ public class ConsequenceHide { @JsonProperty("objectID") @@ -18,7 +18,7 @@ public ConsequenceHide setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceParams.java index 9bf7a50c22..f4eb2397d1 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceParams.java @@ -87,9 +87,6 @@ public class ConsequenceParams { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -108,9 +105,6 @@ public class ConsequenceParams { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -257,7 +251,14 @@ public ConsequenceParams setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -269,8 +270,21 @@ public ConsequenceParams setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -327,9 +341,9 @@ public ConsequenceParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -349,10 +363,7 @@ public ConsequenceParams addRestrictSearchableAttributes(String restrictSearchab return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -372,9 +383,10 @@ public ConsequenceParams addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -387,11 +399,11 @@ public ConsequenceParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -403,7 +415,7 @@ public ConsequenceParams setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -414,13 +426,7 @@ public ConsequenceParams setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -431,14 +437,7 @@ public ConsequenceParams setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -450,9 +449,10 @@ public ConsequenceParams setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -464,10 +464,7 @@ public ConsequenceParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -501,7 +498,7 @@ public ConsequenceParams setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -523,9 +520,11 @@ public ConsequenceParams addInsideBoundingBox(List insideBoundingBoxItem } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -546,9 +545,11 @@ public ConsequenceParams addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -569,10 +570,10 @@ public ConsequenceParams addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -593,9 +594,9 @@ public ConsequenceParams addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -608,8 +609,11 @@ public ConsequenceParams setPersonalizationImpact(Integer personalizationImpact) } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -622,9 +626,9 @@ public ConsequenceParams setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -636,40 +640,18 @@ public ConsequenceParams setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public ConsequenceParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public ConsequenceParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public ConsequenceParams setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -681,9 +663,9 @@ public ConsequenceParams setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -695,10 +677,7 @@ public ConsequenceParams setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -731,7 +710,7 @@ public ConsequenceParams setPercentileComputation(Boolean percentileComputation) return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -742,37 +721,12 @@ public ConsequenceParams setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public ConsequenceParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public ConsequenceParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public ConsequenceParams setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -788,7 +742,10 @@ public ConsequenceParams addAttributesToRetrieve(String attributesToRetrieveItem /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -809,8 +766,23 @@ public ConsequenceParams addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -831,9 +803,22 @@ public ConsequenceParams addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -845,7 +830,12 @@ public ConsequenceParams setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -865,8 +855,12 @@ public ConsequenceParams addAttributesToHighlight(String attributesToHighlightIt } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -887,9 +881,10 @@ public ConsequenceParams addAttributesToSnippet(String attributesToSnippetItem) } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -901,7 +896,7 @@ public ConsequenceParams setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -912,7 +907,7 @@ public ConsequenceParams setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -934,7 +929,10 @@ public ConsequenceParams setRestrictHighlightAndSnippetArrays(Boolean restrictHi return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -957,7 +955,7 @@ public ConsequenceParams setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -972,7 +970,7 @@ public ConsequenceParams setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -997,7 +995,10 @@ public ConsequenceParams setAllowTyposOnNumericTokens(Boolean allowTyposOnNumeri return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1019,6 +1020,12 @@ public ConsequenceParams addDisableTypoToleranceOnAttributes(String disableTypoT /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1053,8 +1060,9 @@ public ConsequenceParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCh } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1075,10 +1083,18 @@ public ConsequenceParams addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1091,9 +1107,10 @@ public ConsequenceParams setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1105,10 +1122,7 @@ public ConsequenceParams setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1119,11 +1133,7 @@ public ConsequenceParams setEnablePersonalization(Boolean enablePersonalization) return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1179,8 +1189,8 @@ public ConsequenceParams setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1201,9 +1211,21 @@ public ConsequenceParams addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1224,8 +1246,12 @@ public ConsequenceParams addDisableExactOnAttributes(String disableExactOnAttrib } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1257,8 +1283,20 @@ public ConsequenceParams addAlternativesAsExact(AlternativesAsExact alternatives } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1279,8 +1317,18 @@ public ConsequenceParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advanc } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1304,8 +1352,12 @@ public ConsequenceParams setReplaceSynonymsInHighlight(Boolean replaceSynonymsIn } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1318,9 +1370,11 @@ public ConsequenceParams setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1340,7 +1394,13 @@ public ConsequenceParams addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1352,7 +1412,7 @@ public ConsequenceParams setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1366,7 +1426,7 @@ public ConsequenceParams setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1377,7 +1437,21 @@ public ConsequenceParams setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1389,10 +1463,11 @@ public ConsequenceParams setAttributeCriteriaComputedByMinProximity(Boolean attr } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1416,8 +1491,9 @@ public ConsequenceParams setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1503,14 +1579,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, consequenceParams.personalizationImpact) && Objects.equals(this.userToken, consequenceParams.userToken) && Objects.equals(this.getRankingInfo, consequenceParams.getRankingInfo) && - Objects.equals(this.explain, consequenceParams.explain) && Objects.equals(this.synonyms, consequenceParams.synonyms) && Objects.equals(this.clickAnalytics, consequenceParams.clickAnalytics) && Objects.equals(this.analytics, consequenceParams.analytics) && Objects.equals(this.analyticsTags, consequenceParams.analyticsTags) && Objects.equals(this.percentileComputation, consequenceParams.percentileComputation) && Objects.equals(this.enableABTest, consequenceParams.enableABTest) && - Objects.equals(this.attributesForFaceting, consequenceParams.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, consequenceParams.attributesToRetrieve) && Objects.equals(this.ranking, consequenceParams.ranking) && Objects.equals(this.customRanking, consequenceParams.customRanking) && @@ -1589,14 +1663,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1676,14 +1748,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java index 5065469459..2a0a11fd12 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java @@ -12,8 +12,9 @@ import java.util.logging.Logger; /** - * When providing a string, it replaces the entire query string. When providing an object, it - * describes incremental edits to be made to the query string (but you can't do both). + * Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is + * replaced with that string. If `consequenceQuery` is an object, it describes incremental edits + * made to the query. */ @JsonDeserialize(using = ConsequenceQuery.Deserializer.class) public interface ConsequenceQuery { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java index e16abeadc7..96209cee5c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java @@ -32,7 +32,7 @@ public ConsequenceQueryObject addRemove(String removeItem) { return this; } - /** Words to remove. */ + /** Words to remove from the search query. */ @javax.annotation.Nullable public List getRemove() { return remove; @@ -51,7 +51,7 @@ public ConsequenceQueryObject addEdits(Edit editsItem) { return this; } - /** Edits to apply. */ + /** Changes to make to the search query. */ @javax.annotation.Nullable public List getEdits() { return edits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java index 29c177b91e..00b8ca25ca 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java @@ -23,8 +23,8 @@ public DeletedAtResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Distinct.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Distinct.java index 636f50cf30..678ab3b48d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Distinct.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Distinct.java @@ -12,8 +12,11 @@ import java.util.logging.Logger; /** - * Enables [deduplication or grouping of results (Algolia's _distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * Determines how many records of a group are included in the search results. Records with the same + * value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting + * controls how many members of the group are returned. This is useful for [deduplication and + * grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * The `distinct` setting is ignored if `attributeForDistinct` is not set. */ @JsonDeserialize(using = Distinct.Deserializer.class) public interface Distinct { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Edit.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Edit.java index 31153b5daa..0151d937c1 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Edit.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Edit.java @@ -46,7 +46,7 @@ public Edit setInsert(String insert) { return this; } - /** Text that should be inserted in place of the removed text inside the query string. */ + /** Text to be added in place of the deleted text inside the query string. */ @javax.annotation.Nullable public String getInsert() { return insert; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java index 8e82ae479c..7453799cd7 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java @@ -9,7 +9,21 @@ /** * Determines how the [Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - * is computed when the query contains only one word. + * is computed when the search query has only one word. + * + *
+ *
attribute + *
The Exact ranking criterion is 1 if the query word and attribute value are the same. For + * example, a search for \"road\" will match the value \"road\", but not \"road trip\". + *
none + *
The Exact ranking criterion is ignored on single-word searches. + *
word + *
The Exact ranking criterion is 1 if the query word is found in the attribute value. The + * query word must have at least 3 characters and must not be a stop word. + *
+ * + * If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix + * matches won't. */ public enum ExactOnSingleWordQuery { ATTRIBUTE("attribute"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetFilters.java index 651c1949ca..3dfddd4983 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetFilters.java @@ -14,8 +14,12 @@ import java.util.logging.Logger; /** - * [Filter hits by facet - * value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * Filter the search by facet values, so that only records with the same facet values are retrieved. + * **Prefer using the `filters` parameter, which supports all filter types and combinations with + * boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - + * `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - + * `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that + * start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ @JsonDeserialize(using = FacetFilters.Deserializer.class) public interface FacetFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetOrdering.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetOrdering.java index 32699b541c..aba09f64c8 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetOrdering.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FacetOrdering.java @@ -9,7 +9,7 @@ import java.util.Map; import java.util.Objects; -/** Defines the ordering of facets (widgets). */ +/** Order of facet names and facet values in your UI. */ public class FacetOrdering { @JsonProperty("facets") @@ -42,7 +42,7 @@ public FacetOrdering putValues(String key, Value valuesItem) { return this; } - /** Ordering of facet values within an individual facet. */ + /** Order of facet values. One object for each facet. */ @javax.annotation.Nullable public Map getValues() { return values; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Facets.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Facets.java index 925270bb40..d9cd5c7969 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Facets.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Facets.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.Objects; -/** Ordering of facets (widgets). */ +/** Order of facet names. */ public class Facets { @JsonProperty("order") @@ -28,7 +28,10 @@ public Facets addOrder(String orderItem) { return this; } - /** Pinned order of facet lists. */ + /** + * Explicit order of facets or facet values. This setting lets you always show specific facets or + * facet values at the top of the list. + */ @javax.annotation.Nullable public List getOrder() { return order; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/HighlightResultOption.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/HighlightResultOption.java index 9f7a999b07..eb325efa2c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/HighlightResultOption.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/HighlightResultOption.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.Objects; -/** Show highlighted section and words matched on a query. */ +/** Surround words that match the query with HTML tags for highlighting. */ @JsonDeserialize(as = HighlightResultOption.class) public class HighlightResultOption implements HighlightResult { @@ -30,7 +30,7 @@ public HighlightResultOption setValue(String value) { return this; } - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @javax.annotation.Nonnull public String getValue() { return value; @@ -57,7 +57,7 @@ public HighlightResultOption addMatchedWords(String matchedWordsItem) { return this; } - /** List of words from the query that matched the object. */ + /** List of matched words from the search query. */ @javax.annotation.Nonnull public List getMatchedWords() { return matchedWords; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IgnorePlurals.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IgnorePlurals.java index aa67feeae3..e16e03fac1 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IgnorePlurals.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IgnorePlurals.java @@ -14,15 +14,8 @@ import java.util.logging.Logger; /** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is - * used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which - * ignoring plurals should be enabled. This list will override any values that you may have set in - * `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are - * considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals - * feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find - * \"feet\"). + * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this + * feature for the languages used in your index. */ @JsonDeserialize(using = IgnorePlurals.Deserializer.class) public interface IgnorePlurals { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java index 40629c4aaf..429f44c99e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java @@ -12,9 +12,6 @@ /** IndexSettingsAsSearchParams */ public class IndexSettingsAsSearchParams { - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -147,31 +144,6 @@ public class IndexSettingsAsSearchParams { @JsonProperty("reRankingApplyFilter") private ReRankingApplyFilter reRankingApplyFilter; - public IndexSettingsAsSearchParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public IndexSettingsAsSearchParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public IndexSettingsAsSearchParams setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -187,7 +159,10 @@ public IndexSettingsAsSearchParams addAttributesToRetrieve(String attributesToRe /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -208,8 +183,23 @@ public IndexSettingsAsSearchParams addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -230,9 +220,22 @@ public IndexSettingsAsSearchParams addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -244,7 +247,12 @@ public IndexSettingsAsSearchParams setRelevancyStrictness(Integer relevancyStric return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -264,8 +272,12 @@ public IndexSettingsAsSearchParams addAttributesToHighlight(String attributesToH } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -286,9 +298,10 @@ public IndexSettingsAsSearchParams addAttributesToSnippet(String attributesToSni } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -300,7 +313,7 @@ public IndexSettingsAsSearchParams setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -311,7 +324,7 @@ public IndexSettingsAsSearchParams setHighlightPostTag(String highlightPostTag) return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -333,7 +346,10 @@ public IndexSettingsAsSearchParams setRestrictHighlightAndSnippetArrays(Boolean return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -356,7 +372,7 @@ public IndexSettingsAsSearchParams setMinWordSizefor1Typo(Integer minWordSizefor } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -371,7 +387,7 @@ public IndexSettingsAsSearchParams setMinWordSizefor2Typos(Integer minWordSizefo } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -396,7 +412,10 @@ public IndexSettingsAsSearchParams setAllowTyposOnNumericTokens(Boolean allowTyp return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -418,6 +437,12 @@ public IndexSettingsAsSearchParams addDisableTypoToleranceOnAttributes(String di /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -452,8 +477,9 @@ public IndexSettingsAsSearchParams setKeepDiacriticsOnCharacters(String keepDiac } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -474,10 +500,18 @@ public IndexSettingsAsSearchParams addQueryLanguages(String queryLanguagesItem) } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -490,9 +524,10 @@ public IndexSettingsAsSearchParams setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -504,10 +539,7 @@ public IndexSettingsAsSearchParams setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -518,11 +550,7 @@ public IndexSettingsAsSearchParams setEnablePersonalization(Boolean enablePerson return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -578,8 +606,8 @@ public IndexSettingsAsSearchParams setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -600,9 +628,21 @@ public IndexSettingsAsSearchParams addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -623,8 +663,12 @@ public IndexSettingsAsSearchParams addDisableExactOnAttributes(String disableExa } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -656,8 +700,20 @@ public IndexSettingsAsSearchParams addAlternativesAsExact(AlternativesAsExact al } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -678,8 +734,18 @@ public IndexSettingsAsSearchParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatu } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -703,8 +769,12 @@ public IndexSettingsAsSearchParams setReplaceSynonymsInHighlight(Boolean replace } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -717,9 +787,11 @@ public IndexSettingsAsSearchParams setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -739,7 +811,13 @@ public IndexSettingsAsSearchParams addResponseFields(String responseFieldsItem) return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -751,7 +829,7 @@ public IndexSettingsAsSearchParams setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -765,7 +843,7 @@ public IndexSettingsAsSearchParams setMaxValuesPerFacet(Integer maxValuesPerFace return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -776,7 +854,21 @@ public IndexSettingsAsSearchParams setSortFacetValuesBy(String sortFacetValuesBy return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -788,10 +880,11 @@ public IndexSettingsAsSearchParams setAttributeCriteriaComputedByMinProximity(Bo } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -815,8 +908,9 @@ public IndexSettingsAsSearchParams setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -844,7 +938,6 @@ public boolean equals(Object o) { } IndexSettingsAsSearchParams indexSettingsAsSearchParams = (IndexSettingsAsSearchParams) o; return ( - Objects.equals(this.attributesForFaceting, indexSettingsAsSearchParams.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, indexSettingsAsSearchParams.attributesToRetrieve) && Objects.equals(this.ranking, indexSettingsAsSearchParams.ranking) && Objects.equals(this.customRanking, indexSettingsAsSearchParams.customRanking) && @@ -895,7 +988,6 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -947,7 +1039,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IndexSettingsAsSearchParams {\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/MatchLevel.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/MatchLevel.java index 1507602da5..817f29fa17 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/MatchLevel.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/MatchLevel.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Indicates how well the attribute matched the search query. */ +/** Whether the whole query string matches or only a part. */ public enum MatchLevel { NONE("none"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Mode.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Mode.java index 3594c1cf51..7afe477869 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Mode.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Mode.java @@ -6,7 +6,10 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Search mode the index will use to query for results. */ +/** + * Search mode the index will use to query for results. This setting only applies to indices, for + * which Algolia enabled NeuralSearch for you. + */ public enum Mode { NEURAL_SEARCH("neuralSearch"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/NumericFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/NumericFilters.java index a99b8c7bb9..e786e97269 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/NumericFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/NumericFilters.java @@ -14,8 +14,11 @@ import java.util.logging.Logger; /** - * [Filter on numeric - * attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types + * and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, + * `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: + * `facet: TO `. The range includes the lower and upper boundaries. The same + * combination rules apply as for `facetFilters`. */ @JsonDeserialize(using = NumericFilters.Deserializer.class) public interface NumericFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/OptionalFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/OptionalFilters.java index c087dfa40d..4a45e517f2 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/OptionalFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/OptionalFilters.java @@ -14,10 +14,12 @@ import java.util.logging.Logger; /** - * Create filters to boost or demote records. Records that match the filter are ranked higher for - * positive and lower for negative optional filters. In contrast to regular filters, records that - * don't match the optional filter are still included in the results, only their ranking is - * affected. + * Filters to promote or demote records in the search results. Optional filters work like facet + * filters, but they don't exclude records from the search results. Records that match the optional + * filter rank before records that don't match. If you're using a negative filter `facet:-value`, + * matching records rank after records that don't match. - Optional filters don't work on virtual + * replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't + * work with numeric attributes. */ @JsonDeserialize(using = OptionalFilters.Deserializer.class) public interface OptionalFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Params.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Params.java index 722b5d1ccf..3d62cc2037 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Params.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Params.java @@ -7,7 +7,10 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Additional search parameters. */ +/** + * Parameters to apply to this search. You can use all search parameters, plus special + * `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. + */ public class Params { @JsonProperty("query") diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectID.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectID.java index b5a5af2ee7..ef9f201570 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectID.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectID.java @@ -22,7 +22,7 @@ public PromoteObjectID setObjectID(String objectID) { return this; } - /** Unique identifier of the record to promote. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -33,11 +33,7 @@ public PromoteObjectID setPosition(Integer position) { return this; } - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - */ + /** Position in the search results where you want to show the promoted records. */ @javax.annotation.Nonnull public Integer getPosition() { return position; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java index 27a74a8c1e..d3c358881b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java @@ -29,7 +29,11 @@ public PromoteObjectIDs addObjectIDs(String objectIDsItem) { return this; } - /** Unique identifiers of the records to promote. */ + /** + * Object IDs of the records you want to promote. The records are placed as a group at the + * `position`. For example, if you want to promote four records to position `0`, they will be the + * first four search results. + */ @javax.annotation.Nonnull public List getObjectIDs() { return objectIDs; @@ -40,11 +44,7 @@ public PromoteObjectIDs setPosition(Integer position) { return this; } - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - */ + /** Position in the search results where you want to show the promoted records. */ @javax.annotation.Nonnull public Integer getPosition() { return position; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/QueryType.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/QueryType.java index b5b88046a9..81eca0309a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/QueryType.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/QueryType.java @@ -7,8 +7,11 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * Determines how query words are [interpreted as - * prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * Determines if and how query words are interpreted as prefixes. By default, only the last query + * word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid + * `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive + * results and makes your search slower. For more information, see [Prefix + * searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ public enum QueryType { PREFIX_LAST("prefixLast"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RankingInfo.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RankingInfo.java index 07bfd6ae9c..f0cefcb364 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RankingInfo.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RankingInfo.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** RankingInfo */ +/** Object with detailed information about the record's ranking. */ public class RankingInfo { @JsonProperty("filters") @@ -54,7 +54,7 @@ public RankingInfo setFilters(Integer filters) { return this; } - /** This field is reserved for advanced usage. */ + /** Whether a filter matched the query. minimum: 0 */ @javax.annotation.Nonnull public Integer getFilters() { return filters; @@ -65,7 +65,7 @@ public RankingInfo setFirstMatchedWord(Integer firstMatchedWord) { return this; } - /** Position of the most important matched attribute in the attributes to index list. */ + /** Position of the first matched word in the best matching attribute of the record. minimum: 0 */ @javax.annotation.Nonnull public Integer getFirstMatchedWord() { return firstMatchedWord; @@ -78,7 +78,7 @@ public RankingInfo setGeoDistance(Integer geoDistance) { /** * Distance between the geo location in the search query and the best matching geo location in the - * record, divided by the geo precision (in meters). + * record, divided by the geo precision (in meters). minimum: 0 */ @javax.annotation.Nonnull public Integer getGeoDistance() { @@ -90,7 +90,7 @@ public RankingInfo setGeoPrecision(Integer geoPrecision) { return this; } - /** Precision used when computing the geo distance, in meters. */ + /** Precision used when computing the geo distance, in meters. minimum: 1 */ @javax.annotation.Nullable public Integer getGeoPrecision() { return geoPrecision; @@ -123,7 +123,7 @@ public RankingInfo setNbExactWords(Integer nbExactWords) { return this; } - /** Number of exactly matched words. */ + /** Number of exactly matched words. minimum: 0 */ @javax.annotation.Nonnull public Integer getNbExactWords() { return nbExactWords; @@ -134,7 +134,7 @@ public RankingInfo setNbTypos(Integer nbTypos) { return this; } - /** Number of typos encountered when matching the record. */ + /** Number of typos encountered when matching the record. minimum: 0 */ @javax.annotation.Nonnull public Integer getNbTypos() { return nbTypos; @@ -145,7 +145,7 @@ public RankingInfo setPromoted(Boolean promoted) { return this; } - /** Present and set to true if a Rule promoted the hit. */ + /** Whether the record was promoted by a rule. */ @javax.annotation.Nonnull public Boolean getPromoted() { return promoted; @@ -157,8 +157,8 @@ public RankingInfo setProximityDistance(Integer proximityDistance) { } /** - * When the query contains more than one word, the sum of the distances between matched words (in - * meters). + * Number of words between multiple matches in the query plus 1. For single word queries, + * `proximityDistance` is 0. minimum: 0 */ @javax.annotation.Nullable public Integer getProximityDistance() { @@ -170,7 +170,7 @@ public RankingInfo setUserScore(Integer userScore) { return this; } - /** Custom ranking for the object, expressed as a single integer value. */ + /** Overall ranking of the record, expressed as a single integer. This attribute is internal. */ @javax.annotation.Nonnull public Integer getUserScore() { return userScore; @@ -181,7 +181,7 @@ public RankingInfo setWords(Integer words) { return this; } - /** Number of matched words, including prefixes and typos. */ + /** Number of matched words. minimum: 1 */ @javax.annotation.Nonnull public Integer getWords() { return words; @@ -192,7 +192,7 @@ public RankingInfo setPromotedByReRanking(Boolean promotedByReRanking) { return this; } - /** Wether the record are promoted by the re-ranking strategy. */ + /** Whether the record is re-ranked. */ @javax.annotation.Nullable public Boolean getPromotedByReRanking() { return promotedByReRanking; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java index b341663db8..f929dd4a71 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java @@ -14,8 +14,8 @@ import java.util.logging.Logger; /** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, - * only records that match these filters will be affected by Dynamic Re-Ranking. + * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to + * records that match these filters. */ @JsonDeserialize(using = ReRankingApplyFilter.Deserializer.class) public interface ReRankingApplyFilter { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendHit.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendHit.java index da39603941..c5c17ccd1c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendHit.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendHit.java @@ -49,7 +49,7 @@ public RecommendHit setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -68,7 +68,7 @@ public RecommendHit putHighlightResult(String key, HighlightResult highlightResu return this; } - /** Show highlighted section and words matched on a query. */ + /** Surround words that match the query with HTML tags for highlighting. */ @javax.annotation.Nullable public Map getHighlightResult() { return highlightResult; @@ -87,10 +87,7 @@ public RecommendHit putSnippetResult(String key, SnippetResult snippetResultItem return this; } - /** - * Snippeted attributes show parts of the matched attributes. Only returned when - * attributesToSnippet is non-empty. - */ + /** Snippets that show the context around a matching search query. */ @javax.annotation.Nullable public Map getSnippetResult() { return snippetResult; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsHits.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsHits.java index ffff6a3faf..96baa0d632 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsHits.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsHits.java @@ -42,7 +42,7 @@ public RecommendationsHits setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsQuery.java index 1cae843e94..dba7f85ab0 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsQuery.java @@ -37,7 +37,7 @@ public RecommendationsQuery setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; @@ -85,7 +85,7 @@ public RecommendationsQuery setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsResults.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsResults.java index d069a71df6..126ddc1854 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsResults.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendationsResults.java @@ -150,7 +150,7 @@ public RecommendationsResults setAutomaticRadius(String automaticRadius) { return this; } - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ @javax.annotation.Nullable public String getAutomaticRadius() { return automaticRadius; @@ -228,7 +228,7 @@ public RecommendationsResults putFacets(String key, Map facetsI return this; } - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ @javax.annotation.Nullable public Map> getFacets() { return facets; @@ -305,7 +305,7 @@ public RecommendationsResults setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; @@ -316,7 +316,7 @@ public RecommendationsResults setNbPages(Integer nbPages) { return this; } - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @javax.annotation.Nonnull public Integer getNbPages() { return nbPages; @@ -338,7 +338,7 @@ public RecommendationsResults setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nonnull public Integer getPage() { return page; @@ -446,7 +446,7 @@ public RecommendationsResults setUserData(Object userData) { return this; } - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @javax.annotation.Nullable public Object getUserData() { return userData; @@ -487,7 +487,7 @@ public RecommendationsResults setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQuery.java index 4c701bc245..db4dce4559 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQuery.java @@ -34,7 +34,7 @@ public RecommendedForYouQuery setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQueryParameters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQueryParameters.java index 11b08e3718..1c68d91c99 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQueryParameters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendedForYouQueryParameters.java @@ -90,9 +90,6 @@ public class RecommendedForYouQueryParameters { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -111,9 +108,6 @@ public class RecommendedForYouQueryParameters { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -251,7 +245,7 @@ public RecommendedForYouQueryParameters setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -262,7 +256,14 @@ public RecommendedForYouQueryParameters setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -274,8 +275,21 @@ public RecommendedForYouQueryParameters setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -332,9 +346,9 @@ public RecommendedForYouQueryParameters setSumOrFiltersScores(Boolean sumOrFilte } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -354,10 +368,7 @@ public RecommendedForYouQueryParameters addRestrictSearchableAttributes(String r return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -377,9 +388,10 @@ public RecommendedForYouQueryParameters addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -392,11 +404,11 @@ public RecommendedForYouQueryParameters setFacetingAfterDistinct(Boolean facetin } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -408,7 +420,7 @@ public RecommendedForYouQueryParameters setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -419,13 +431,7 @@ public RecommendedForYouQueryParameters setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -436,14 +442,7 @@ public RecommendedForYouQueryParameters setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -455,9 +454,10 @@ public RecommendedForYouQueryParameters setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -469,10 +469,7 @@ public RecommendedForYouQueryParameters setAroundLatLngViaIP(Boolean aroundLatLn return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -506,7 +503,7 @@ public RecommendedForYouQueryParameters setMinimumAroundRadius(Integer minimumAr } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -528,9 +525,11 @@ public RecommendedForYouQueryParameters addInsideBoundingBox(List inside } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -551,9 +550,11 @@ public RecommendedForYouQueryParameters addInsidePolygon(List insidePoly } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -574,10 +575,10 @@ public RecommendedForYouQueryParameters addNaturalLanguages(String naturalLangua } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -598,9 +599,9 @@ public RecommendedForYouQueryParameters addRuleContexts(String ruleContextsItem) } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -613,8 +614,11 @@ public RecommendedForYouQueryParameters setPersonalizationImpact(Integer persona } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -627,9 +631,9 @@ public RecommendedForYouQueryParameters setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nonnull public String getUserToken() { @@ -641,40 +645,18 @@ public RecommendedForYouQueryParameters setGetRankingInfo(Boolean getRankingInfo return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public RecommendedForYouQueryParameters setExplain(List explain) { - this.explain = explain; - return this; - } - - public RecommendedForYouQueryParameters addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public RecommendedForYouQueryParameters setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -686,9 +668,9 @@ public RecommendedForYouQueryParameters setClickAnalytics(Boolean clickAnalytics } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -700,10 +682,7 @@ public RecommendedForYouQueryParameters setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -736,7 +715,7 @@ public RecommendedForYouQueryParameters setPercentileComputation(Boolean percent return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -747,37 +726,12 @@ public RecommendedForYouQueryParameters setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public RecommendedForYouQueryParameters setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public RecommendedForYouQueryParameters addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public RecommendedForYouQueryParameters setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -793,7 +747,10 @@ public RecommendedForYouQueryParameters addAttributesToRetrieve(String attribute /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -814,8 +771,23 @@ public RecommendedForYouQueryParameters addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -836,9 +808,22 @@ public RecommendedForYouQueryParameters addCustomRanking(String customRankingIte } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -850,7 +835,12 @@ public RecommendedForYouQueryParameters setRelevancyStrictness(Integer relevancy return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -870,8 +860,12 @@ public RecommendedForYouQueryParameters addAttributesToHighlight(String attribut } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -892,9 +886,10 @@ public RecommendedForYouQueryParameters addAttributesToSnippet(String attributes } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -906,7 +901,7 @@ public RecommendedForYouQueryParameters setHighlightPreTag(String highlightPreTa return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -917,7 +912,7 @@ public RecommendedForYouQueryParameters setHighlightPostTag(String highlightPost return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -939,7 +934,10 @@ public RecommendedForYouQueryParameters setRestrictHighlightAndSnippetArrays(Boo return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -962,7 +960,7 @@ public RecommendedForYouQueryParameters setMinWordSizefor1Typo(Integer minWordSi } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -977,7 +975,7 @@ public RecommendedForYouQueryParameters setMinWordSizefor2Typos(Integer minWordS } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -1002,7 +1000,10 @@ public RecommendedForYouQueryParameters setAllowTyposOnNumericTokens(Boolean all return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1024,6 +1025,12 @@ public RecommendedForYouQueryParameters addDisableTypoToleranceOnAttributes(Stri /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1058,8 +1065,9 @@ public RecommendedForYouQueryParameters setKeepDiacriticsOnCharacters(String kee } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1080,10 +1088,18 @@ public RecommendedForYouQueryParameters addQueryLanguages(String queryLanguagesI } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1096,9 +1112,10 @@ public RecommendedForYouQueryParameters setDecompoundQuery(Boolean decompoundQue } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1110,10 +1127,7 @@ public RecommendedForYouQueryParameters setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1124,11 +1138,7 @@ public RecommendedForYouQueryParameters setEnablePersonalization(Boolean enableP return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1184,8 +1194,8 @@ public RecommendedForYouQueryParameters setAdvancedSyntax(Boolean advancedSyntax } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1206,9 +1216,21 @@ public RecommendedForYouQueryParameters addOptionalWords(String optionalWordsIte } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1229,8 +1251,12 @@ public RecommendedForYouQueryParameters addDisableExactOnAttributes(String disab } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1262,8 +1288,20 @@ public RecommendedForYouQueryParameters addAlternativesAsExact(AlternativesAsExa } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1284,8 +1322,18 @@ public RecommendedForYouQueryParameters addAdvancedSyntaxFeatures(AdvancedSyntax } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1309,8 +1357,12 @@ public RecommendedForYouQueryParameters setReplaceSynonymsInHighlight(Boolean re } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1323,9 +1375,11 @@ public RecommendedForYouQueryParameters setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1345,7 +1399,13 @@ public RecommendedForYouQueryParameters addResponseFields(String responseFieldsI return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1357,7 +1417,7 @@ public RecommendedForYouQueryParameters setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1371,7 +1431,7 @@ public RecommendedForYouQueryParameters setMaxValuesPerFacet(Integer maxValuesPe return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1382,7 +1442,21 @@ public RecommendedForYouQueryParameters setSortFacetValuesBy(String sortFacetVal return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1394,10 +1468,11 @@ public RecommendedForYouQueryParameters setAttributeCriteriaComputedByMinProximi } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1421,8 +1496,9 @@ public RecommendedForYouQueryParameters setEnableReRanking(Boolean enableReRanki } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1476,14 +1552,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, recommendedForYouQueryParameters.personalizationImpact) && Objects.equals(this.userToken, recommendedForYouQueryParameters.userToken) && Objects.equals(this.getRankingInfo, recommendedForYouQueryParameters.getRankingInfo) && - Objects.equals(this.explain, recommendedForYouQueryParameters.explain) && Objects.equals(this.synonyms, recommendedForYouQueryParameters.synonyms) && Objects.equals(this.clickAnalytics, recommendedForYouQueryParameters.clickAnalytics) && Objects.equals(this.analytics, recommendedForYouQueryParameters.analytics) && Objects.equals(this.analyticsTags, recommendedForYouQueryParameters.analyticsTags) && Objects.equals(this.percentileComputation, recommendedForYouQueryParameters.percentileComputation) && Objects.equals(this.enableABTest, recommendedForYouQueryParameters.enableABTest) && - Objects.equals(this.attributesForFaceting, recommendedForYouQueryParameters.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, recommendedForYouQueryParameters.attributesToRetrieve) && Objects.equals(this.ranking, recommendedForYouQueryParameters.ranking) && Objects.equals(this.customRanking, recommendedForYouQueryParameters.customRanking) && @@ -1563,14 +1637,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1648,14 +1720,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveStopWords.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveStopWords.java index 84f7753a90..4de93d2622 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveStopWords.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveStopWords.java @@ -14,14 +14,10 @@ import java.util.logging.Logger; /** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in - * conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words - * should be enabled. This list will override any values that you may have set in `queryLanguages`. - * _true_: enables the stop words feature, ensuring that stop words are removed from consideration - * in a search. The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words - * feature, allowing stop words to be taken into account in a search. + * Removes stop words from the search query. Stop words are common words like articles, + * conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, + * \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages + * used in your index. */ @JsonDeserialize(using = RemoveStopWords.Deserializer.class) public interface RemoveStopWords { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java index b9c5440124..934adba195 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java @@ -7,9 +7,24 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * Strategy to [remove - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - * from the query when it doesn't match any hits. + * Strategy for removing words from the query when it doesn't return any results. This helps to + * avoid returning empty search results. + * + *
+ *
none + *
No words are removed when a query doesn't return results. + *
lastWords + *
Treat the last (then second to last, then third to last) word as optional, until there are + * results or at most 5 words have been removed. + *
firstWords + *
Treat the first (then second, then third) word as optional, until there are results or at + * most 5 words have been removed. + *
allOptional + *
Treat all words as optional. + *
+ * + * For more information, see [Remove words to improve + * results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ public enum RemoveWordsIfNoResults { NONE("none"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RenderingContent.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RenderingContent.java index 3462fc528a..3397664e1a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RenderingContent.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RenderingContent.java @@ -8,10 +8,8 @@ import java.util.Objects; /** - * Extra content for the search UI, for example, to control the [ordering and display of - * facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - * You can set a default value and dynamically override it with - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * Extra data that can be used in the search UI. You can use this to control aspects of your search + * UI, such as, the order of facet names and values without changing your frontend code. */ public class RenderingContent { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsObject.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsObject.java index d4c991c5b5..8ea8a9e7c9 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsObject.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsObject.java @@ -90,9 +90,6 @@ public class SearchParamsObject { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -111,9 +108,6 @@ public class SearchParamsObject { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -251,7 +245,7 @@ public SearchParamsObject setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -262,7 +256,14 @@ public SearchParamsObject setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -274,8 +275,21 @@ public SearchParamsObject setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -332,9 +346,9 @@ public SearchParamsObject setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -354,10 +368,7 @@ public SearchParamsObject addRestrictSearchableAttributes(String restrictSearcha return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -377,9 +388,10 @@ public SearchParamsObject addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -392,11 +404,11 @@ public SearchParamsObject setFacetingAfterDistinct(Boolean facetingAfterDistinct } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -408,7 +420,7 @@ public SearchParamsObject setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -419,13 +431,7 @@ public SearchParamsObject setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -436,14 +442,7 @@ public SearchParamsObject setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -455,9 +454,10 @@ public SearchParamsObject setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -469,10 +469,7 @@ public SearchParamsObject setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -506,7 +503,7 @@ public SearchParamsObject setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -528,9 +525,11 @@ public SearchParamsObject addInsideBoundingBox(List insideBoundingBoxIte } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -551,9 +550,11 @@ public SearchParamsObject addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -574,10 +575,10 @@ public SearchParamsObject addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -598,9 +599,9 @@ public SearchParamsObject addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -613,8 +614,11 @@ public SearchParamsObject setPersonalizationImpact(Integer personalizationImpact } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -627,9 +631,9 @@ public SearchParamsObject setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -641,40 +645,18 @@ public SearchParamsObject setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public SearchParamsObject setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchParamsObject addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public SearchParamsObject setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -686,9 +668,9 @@ public SearchParamsObject setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -700,10 +682,7 @@ public SearchParamsObject setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -736,7 +715,7 @@ public SearchParamsObject setPercentileComputation(Boolean percentileComputation return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -747,37 +726,12 @@ public SearchParamsObject setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public SearchParamsObject setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchParamsObject addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public SearchParamsObject setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -793,7 +747,10 @@ public SearchParamsObject addAttributesToRetrieve(String attributesToRetrieveIte /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -814,8 +771,23 @@ public SearchParamsObject addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -836,9 +808,22 @@ public SearchParamsObject addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -850,7 +835,12 @@ public SearchParamsObject setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -870,8 +860,12 @@ public SearchParamsObject addAttributesToHighlight(String attributesToHighlightI } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -892,9 +886,10 @@ public SearchParamsObject addAttributesToSnippet(String attributesToSnippetItem) } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -906,7 +901,7 @@ public SearchParamsObject setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -917,7 +912,7 @@ public SearchParamsObject setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -939,7 +934,10 @@ public SearchParamsObject setRestrictHighlightAndSnippetArrays(Boolean restrictH return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -962,7 +960,7 @@ public SearchParamsObject setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -977,7 +975,7 @@ public SearchParamsObject setMinWordSizefor2Typos(Integer minWordSizefor2Typos) } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -1002,7 +1000,10 @@ public SearchParamsObject setAllowTyposOnNumericTokens(Boolean allowTyposOnNumer return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1024,6 +1025,12 @@ public SearchParamsObject addDisableTypoToleranceOnAttributes(String disableTypo /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1058,8 +1065,9 @@ public SearchParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnC } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1080,10 +1088,18 @@ public SearchParamsObject addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1096,9 +1112,10 @@ public SearchParamsObject setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1110,10 +1127,7 @@ public SearchParamsObject setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1124,11 +1138,7 @@ public SearchParamsObject setEnablePersonalization(Boolean enablePersonalization return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1184,8 +1194,8 @@ public SearchParamsObject setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1206,9 +1216,21 @@ public SearchParamsObject addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1229,8 +1251,12 @@ public SearchParamsObject addDisableExactOnAttributes(String disableExactOnAttri } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1262,8 +1288,20 @@ public SearchParamsObject addAlternativesAsExact(AlternativesAsExact alternative } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1284,8 +1322,18 @@ public SearchParamsObject addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advan } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1309,8 +1357,12 @@ public SearchParamsObject setReplaceSynonymsInHighlight(Boolean replaceSynonymsI } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1323,9 +1375,11 @@ public SearchParamsObject setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1345,7 +1399,13 @@ public SearchParamsObject addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1357,7 +1417,7 @@ public SearchParamsObject setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1371,7 +1431,7 @@ public SearchParamsObject setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1382,7 +1442,21 @@ public SearchParamsObject setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1394,10 +1468,11 @@ public SearchParamsObject setAttributeCriteriaComputedByMinProximity(Boolean att } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1421,8 +1496,9 @@ public SearchParamsObject setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1476,14 +1552,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, searchParamsObject.personalizationImpact) && Objects.equals(this.userToken, searchParamsObject.userToken) && Objects.equals(this.getRankingInfo, searchParamsObject.getRankingInfo) && - Objects.equals(this.explain, searchParamsObject.explain) && Objects.equals(this.synonyms, searchParamsObject.synonyms) && Objects.equals(this.clickAnalytics, searchParamsObject.clickAnalytics) && Objects.equals(this.analytics, searchParamsObject.analytics) && Objects.equals(this.analyticsTags, searchParamsObject.analyticsTags) && Objects.equals(this.percentileComputation, searchParamsObject.percentileComputation) && Objects.equals(this.enableABTest, searchParamsObject.enableABTest) && - Objects.equals(this.attributesForFaceting, searchParamsObject.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, searchParamsObject.attributesToRetrieve) && Objects.equals(this.ranking, searchParamsObject.ranking) && Objects.equals(this.customRanking, searchParamsObject.customRanking) && @@ -1560,14 +1634,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1645,14 +1717,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java index bc30837c3c..eed5efa8f6 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java @@ -18,7 +18,7 @@ public SearchParamsQuery setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java index d97263fd04..922348c789 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java @@ -30,7 +30,7 @@ public SearchRecommendRulesParams setQuery(String query) { return this; } - /** Full-text query. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -55,7 +55,7 @@ public SearchRecommendRulesParams setPage(Integer page) { return this; } - /** Requested page (the first page is page 0). minimum: 0 */ + /** Requested page of the API response. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java index 9a6ef587a7..4b69877b13 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java @@ -45,7 +45,7 @@ public SearchRecommendRulesResponse setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; @@ -56,7 +56,7 @@ public SearchRecommendRulesResponse setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nonnull public Integer getPage() { return page; @@ -67,7 +67,7 @@ public SearchRecommendRulesResponse setNbPages(Integer nbPages) { return this; } - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @javax.annotation.Nonnull public Integer getNbPages() { return nbPages; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SemanticSearch.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SemanticSearch.java index bc59fead90..61ed95fec1 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SemanticSearch.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SemanticSearch.java @@ -10,7 +10,7 @@ import java.util.Objects; /** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. */ public class SemanticSearch { @@ -31,8 +31,8 @@ public SemanticSearch addEventSources(String eventSourcesItem) { } /** - * Indices from which to collect click and conversion events. If null, the current index and - * replica group will be used as the event source. + * Indices from which to collect click and conversion events. If null, the current index and all + * its replicas are used. */ @javax.annotation.Nullable public List getEventSources() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SnippetResultOption.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SnippetResultOption.java index 2f455a02c7..cfe032d552 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SnippetResultOption.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SnippetResultOption.java @@ -7,10 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet - * is non-empty. - */ +/** Snippets that show the context around a matching search query. */ @JsonDeserialize(as = SnippetResultOption.class) public class SnippetResultOption implements SnippetResult { @@ -25,7 +22,7 @@ public SnippetResultOption setValue(String value) { return this; } - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @javax.annotation.Nonnull public String getValue() { return value; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SortRemainingBy.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SortRemainingBy.java index 201df4d30a..5c84a3bb15 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SortRemainingBy.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/SortRemainingBy.java @@ -7,8 +7,19 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical - * (ascending). - `hidden`: show only pinned values. + * Order of facet values that aren't explicitly positioned with the `order` setting. + * + *
+ *
count + *
Order remaining facet values by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Sort facet values alphabetically. + *
hidden + *
Don't show facet values that aren't explicitly positioned. + *
+ * + * . */ public enum SortRemainingBy { COUNT("count"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TagFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TagFilters.java index 3bef3457ef..d46e22ab4f 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TagFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TagFilters.java @@ -13,7 +13,12 @@ import java.util.List; import java.util.logging.Logger; -/** [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). */ +/** + * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` + * parameter, which supports all filter types and combinations with boolean operators.** Different + * from regular facets, `_tags` can only be used for filtering (including or excluding records). You + * won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. + */ @JsonDeserialize(using = TagFilters.Deserializer.class) public interface TagFilters { // TagFilters as List wrapper. diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TaskStatus.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TaskStatus.java index cde34583f3..b62229ba05 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TaskStatus.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TaskStatus.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** _published_ if the task has been processed, _notPublished_ otherwise. */ +/** Task status, `published` if the task is completed, `notPublished` otherwise. */ public enum TaskStatus { PUBLISHED("published"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingFacetsQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingFacetsQuery.java index 9601af7b86..7aec4a164c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingFacetsQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingFacetsQuery.java @@ -31,7 +31,7 @@ public TrendingFacetsQuery setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingItemsQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingItemsQuery.java index d45d184f40..9e6ca6fb2a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingItemsQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TrendingItemsQuery.java @@ -40,7 +40,7 @@ public TrendingItemsQuery setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoTolerance.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoTolerance.java index 691ed8382b..622bfbbccc 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoTolerance.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoTolerance.java @@ -12,9 +12,12 @@ import java.util.logging.Logger; /** - * Controls whether [typo + * Whether [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) - * is enabled and how it is applied. + * is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting + * and + * concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * is also active. */ @JsonDeserialize(using = TypoTolerance.Deserializer.class) public interface TypoTolerance { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java index ca843127bf..4a9535463a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java @@ -6,7 +6,12 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Gets or Sets typoToleranceEnum */ +/** + * - `min`. Return matches with the lowest number of typos. For example, if you have matches without + * typos, only include those. But if there are no matches without typos (with 1 typo), include + * matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. + * With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. + */ @JsonDeserialize(as = TypoToleranceEnum.class) public enum TypoToleranceEnum implements TypoTolerance { MIN("min"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Value.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Value.java index 7cd57b97fc..85f2b6881b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Value.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Value.java @@ -31,7 +31,10 @@ public Value addOrder(String orderItem) { return this; } - /** Pinned order of facet lists. */ + /** + * Explicit order of facets or facet values. This setting lets you always show specific facets or + * facet values at the top of the list. + */ @javax.annotation.Nullable public List getOrder() { return order; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Acl.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Acl.java index 3165919d51..fe2c1adabc 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Acl.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Acl.java @@ -6,17 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** - * API key permissions: `addObject`: required to add or update records, copy or move an index. - * `analytics`: required to access the Analytics API. `browse`: required to view records - * `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. - * `editSettings`: required to change index settings. `inference`: required to access the Inference - * API. `listIndexes`: required to list indices. `logs`: required to access logs of search and - * indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. - * `search`: required to search records `seeUnretrievableAttributes`: required to retrieve - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - * for all operations that return records. `settings`: required to examine index settings. - */ +/** Access control list permissions. */ public enum Acl { ADD_OBJECT("addObject"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Action.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Action.java index 8b038f224d..0863f40444 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Action.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Action.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Type of batch operation. */ +/** Type of indexing operation. */ public enum Action { ADD_OBJECT("addObject"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AddApiKeyResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AddApiKeyResponse.java index 64cda0770c..423fefc68c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AddApiKeyResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AddApiKeyResponse.java @@ -32,7 +32,7 @@ public AddApiKeyResponse setCreatedAt(String createdAt) { return this; } - /** Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. */ + /** Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @javax.annotation.Nonnull public String getCreatedAt() { return createdAt; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Anchoring.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Anchoring.java index f269594e10..4f7b078c83 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Anchoring.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Anchoring.java @@ -7,8 +7,10 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the - * query string, is an exact match (`is`), or a partial match (`contains`). + * Which part of the search query the pattern should match: - `startsWith`. The pattern must match + * the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. + * The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the + * query. Empty queries are only allowed as pattern with `anchoring: is`. */ public enum Anchoring { IS("is"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ApiKey.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ApiKey.java index b0c2e3684b..420c896507 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ApiKey.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ApiKey.java @@ -47,8 +47,9 @@ public ApiKey addAcl(Acl aclItem) { } /** - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) - * associated with the key. + * Permissions that determine the type of API requests this key can make. The required ACL is + * listed in each endpoint's reference. For more information, see [access control + * list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). */ @javax.annotation.Nonnull public List getAcl() { @@ -60,7 +61,7 @@ public ApiKey setDescription(String description) { return this; } - /** Description of an API key for you and your team members. */ + /** Description of an API key to help you identify this API key. */ @javax.annotation.Nullable public String getDescription() { return description; @@ -80,11 +81,10 @@ public ApiKey addIndexes(String indexesItem) { } /** - * Restricts this API key to a list of indices or index patterns. If the list is empty, all - * indices are allowed. Specify either an exact index name or a pattern with a leading or trailing - * wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - * - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices - * containing \"_products_\". + * Index names or patterns that this API key can access. By default, an API key can access all + * indices in the same application. You can use leading and trailing wildcard characters (`*`): - + * `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with + * \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ @javax.annotation.Nullable public List getIndexes() { @@ -97,9 +97,7 @@ public ApiKey setMaxHitsPerQuery(Integer maxHitsPerQuery) { } /** - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > - * **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire - * content by massively querying the index. + * Maximum number of results this API key can retrieve in one query. By default, there's no limit. */ @javax.annotation.Nullable public Integer getMaxHitsPerQuery() { @@ -112,12 +110,10 @@ public ApiKey setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { } /** - * Maximum number of API calls per hour allowed from a given IP address or [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API - * call is performed with this key, a check is performed. If there were more than the specified - * number of calls within the last hour, the API returns an error with the status code `429` (Too - * Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to - * retrieve your entire content by massively querying the index. + * Maximum number of API requests allowed per IP address or [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this + * limit is reached, the API returns an error with status code `429`. By default, there's no + * limit. */ @javax.annotation.Nullable public Integer getMaxQueriesPerIPPerHour() { @@ -130,8 +126,10 @@ public ApiKey setQueryParameters(String queryParameters) { } /** - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be - * applied for each query made with this API key. It's a URL-encoded query string. + * Query parameters to add when making API requests with this API key. To restrict this API key to + * specific IP addresses, add the `restrictSources` parameter. You can only add a single source, + * but you can provide a range of IP addresses. Creating an API key fails if the request is made + * from an IP address that's outside the restricted range. */ @javax.annotation.Nullable public String getQueryParameters() { @@ -152,11 +150,13 @@ public ApiKey addReferers(String referersItem) { } /** - * Restrict this API key to specific - * [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - * If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all - * referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending - * with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + * Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use + * leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers + * starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with + * \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all + * HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more + * information, see [HTTP referrer + * restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). */ @javax.annotation.Nullable public List getReferers() { @@ -168,15 +168,7 @@ public ApiKey setValidity(Integer validity) { return this; } - /** - * Validity duration of a key (in seconds). The key will automatically be removed after this time - * has expired. The default value of 0 never expires. Short-lived API keys are useful to grant - * temporary access to your data. For example, in mobile apps, you can't [control when users - * update your - * app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - * So instead of encoding keys into your app as you would for a web app, you should dynamically - * fetch them from your mobile app's backend. - */ + /** Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ @javax.annotation.Nullable public Integer getValidity() { return validity; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java index e998053c2e..a426bb487f 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java @@ -14,9 +14,8 @@ import java.util.logging.Logger; /** - * Precision of a geographical search (in meters), to [group results that are more or less the same - * distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * Precision of a coordinate-based search in meters to group results with similar distances. The Geo + * ranking criterion considers all matches within the same range of distances to be equal. */ @JsonDeserialize(using = AroundPrecision.Deserializer.class) public interface AroundPrecision { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java index de264ee8ef..d08ee2efbe 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** AroundPrecisionFromValueInner */ +/** Range object with lower and upper values in meters to define custom ranges. */ public class AroundPrecisionFromValueInner { @JsonProperty("from") @@ -21,7 +21,10 @@ public AroundPrecisionFromValueInner setFrom(Integer from) { return this; } - /** Get from */ + /** + * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the + * range to be equal. + */ @javax.annotation.Nullable public Integer getFrom() { return from; @@ -32,7 +35,10 @@ public AroundPrecisionFromValueInner setValue(Integer value) { return this; } - /** Get value */ + /** + * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the + * range to be equal. + */ @javax.annotation.Nullable public Integer getValue() { return value; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadius.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadius.java index 1bc8acb3e9..afadefd475 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadius.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadius.java @@ -12,9 +12,10 @@ import java.util.logging.Logger; /** - * [Maximum - * radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - * for a geographical search (in meters). + * Maximum radius for a search around a central location. This parameter works in combination with + * the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is + * determined automatically from the density of hits around the central location. The search radius + * is small if there are many hits close to the central coordinates. */ @JsonDeserialize(using = AroundRadius.Deserializer.class) public interface AroundRadius { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadiusAll.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadiusAll.java index 2704466102..a7846f3c2a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadiusAll.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundRadiusAll.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Gets or Sets aroundRadiusAll */ +/** Return all records with a valid `_geoloc` attribute. Don't filter by distance. */ @JsonDeserialize(as = AroundRadiusAll.class) public enum AroundRadiusAll implements AroundRadius { ALL("all"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java index ec2b48ab77..c87cfea106 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Automatic facet Filter. */ +/** Filter or optional filter to be applied to the search. */ public class AutomaticFacetFilter { @JsonProperty("facet") @@ -24,7 +24,10 @@ public AutomaticFacetFilter setFacet(String facet) { return this; } - /** Attribute to filter on. This must match a facet placeholder in the Rule's pattern. */ + /** + * Facet name to be applied as filter. The name must match placeholders in the `pattern` + * parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. + */ @javax.annotation.Nonnull public String getFacet() { return facet; @@ -35,7 +38,7 @@ public AutomaticFacetFilter setScore(Integer score) { return this; } - /** Score for the filter. Typically used for optional or disjunctive filters. */ + /** Filter scores to give different weights to individual filters. */ @javax.annotation.Nullable public Integer getScore() { return score; @@ -46,7 +49,11 @@ public AutomaticFacetFilter setDisjunctive(Boolean disjunctive) { return this; } - /** Whether the filter is disjunctive (true) or conjunctive (false). */ + /** + * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, + * multiple occurences are combined with the logical `OR` operation. If false, multiple occurences + * are combined with the logical `AND` operation. + */ @javax.annotation.Nullable public Boolean getDisjunctive() { return disjunctive; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java index 4295ebdfa3..98c7c87ac1 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java @@ -14,8 +14,9 @@ import java.util.logging.Logger; /** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a - * facet value placeholder in the query pattern. + * Filter to be applied to the search. You can use this to respond to search queries that match a + * facet value. For example, if users search for \"comedy\", which matches a facet value of the + * \"genre\" facet, you can filter the results to show the top-ranked comedy movies. */ @JsonDeserialize(using = AutomaticFacetFilters.Deserializer.class) public interface AutomaticFacetFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseIndexSettings.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseIndexSettings.java index add0de4a88..82b134cdaa 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseIndexSettings.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseIndexSettings.java @@ -14,6 +14,9 @@ /** BaseIndexSettings */ public class BaseIndexSettings { + @JsonProperty("attributesForFaceting") + private List attributesForFaceting; + @JsonProperty("replicas") private List replicas; @@ -62,6 +65,43 @@ public class BaseIndexSettings { @JsonProperty("attributeForDistinct") private String attributeForDistinct; + public BaseIndexSettings setAttributesForFaceting(List attributesForFaceting) { + this.attributesForFaceting = attributesForFaceting; + return this; + } + + public BaseIndexSettings addAttributesForFaceting(String attributesForFacetingItem) { + if (this.attributesForFaceting == null) { + this.attributesForFaceting = new ArrayList<>(); + } + this.attributesForFaceting.add(attributesForFacetingItem); + return this; + } + + /** + * Attributes used for + * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + * Facets are ways to categorize search results based on attributes. Facets can be used to let + * user filter search results. By default, no attribute is used for faceting. **Modifiers** + * + *
+ *
filterOnly(\"ATTRIBUTE\") + *
Allows using this attribute as a filter, but doesn't evalue the facet values. + *
searchable(\"ATTRIBUTE\") + *
Allows searching for facet values. + *
afterDistinct(\"ATTRIBUTE\") + *
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate + * facet counts. You can apply this modifier to searchable facets: + * `afterDistinct(searchable(ATTRIBUTE))`. + *
+ * + * Without modifiers, the attribute is used as a regular facet. + */ + @javax.annotation.Nullable + public List getAttributesForFaceting() { + return attributesForFaceting; + } + public BaseIndexSettings setReplicas(List replicas) { this.replicas = replicas; return this; @@ -76,9 +116,25 @@ public BaseIndexSettings addReplicas(String replicasItem) { } /** - * Creates - * [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - * which are copies of a primary index with the same records but different settings. + * Creates [replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + * Replicas are copies of a primary index with the same records but different settings, synonyms, + * or rules. If you want to offer a different ranking or sorting of your search results, you'll + * use replica indices. All index operations on a primary index are automatically forwarded to its + * replicas. To add a replica index, you must provide the complete set of replicas to this + * parameter. If you omit a replica from this list, the replica turns into a regular, standalone + * index that will no longer by synced with the primary index. **Modifier** + * + *
+ *
virtual(\"REPLICA\") + *
Create a virtual replica, Virtual replicas don't increase the number of records and are + * optimized for [Relevant + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + *
+ * + * Without modifier, a standard replica is created, which duplicates your record count and is used + * for strict, or [exhaustive + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). */ @javax.annotation.Nullable public List getReplicas() { @@ -90,7 +146,11 @@ public BaseIndexSettings setPaginationLimitedTo(Integer paginationLimitedTo) { return this; } - /** Maximum number of hits accessible through pagination. */ + /** + * Maximum number of search results that can be obtained through pagination. Higher pagination + * limits might slow down your search. For pagination limits above 1,000, the sorting of results + * beyond the 1,000th hit can't be guaranteed. maximum: 20000 + */ @javax.annotation.Nullable public Integer getPaginationLimitedTo() { return paginationLimitedTo; @@ -109,7 +169,12 @@ public BaseIndexSettings addUnretrievableAttributes(String unretrievableAttribut return this; } - /** Attributes that can't be retrieved at query time. */ + /** + * Attributes that can't be retrieved at query time. This can be useful if you want to use an + * attribute for ranking or to [restrict + * access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), + * but don't want to include it in the search results. + */ @javax.annotation.Nullable public List getUnretrievableAttributes() { return unretrievableAttributes; @@ -131,6 +196,9 @@ public BaseIndexSettings addDisableTypoToleranceOnWords(String disableTypoTolera /** * Words for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * This also turns off [word splitting and + * concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * for the specified words. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnWords() { @@ -151,10 +219,10 @@ public BaseIndexSettings addAttributesToTransliterate(String attributesToTransli } /** - * Attributes in your index to which [Japanese - * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - * applies. This will ensure that words indexed in Katakana or Kanji can also be searched in - * Hiragana. + * Attributes, for which you want to support [Japanese + * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + * Transliteration supports searching in any of the Japanese writing systems. To support + * transliteration, you must set the indexing language to Japanese. */ @javax.annotation.Nullable public List getAttributesToTransliterate() { @@ -174,7 +242,7 @@ public BaseIndexSettings addCamelCaseAttributes(String camelCaseAttributesItem) return this; } - /** Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ + /** Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ @javax.annotation.Nullable public List getCamelCaseAttributes() { return camelCaseAttributes; @@ -186,9 +254,13 @@ public BaseIndexSettings setDecompoundedAttributes(Object decompoundedAttributes } /** - * Attributes in your index to which [word + * Searchable attributes to which Algolia should apply [word * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * (decompounding) applies. + * (decompounding). Compound words are formed by combining two or more individual words, and are + * particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, + * the individual components are indexed separately. You can specify different lists for different + * languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish + * (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). */ @javax.annotation.Nullable public Object getDecompoundedAttributes() { @@ -209,10 +281,14 @@ public BaseIndexSettings addIndexLanguages(String indexLanguagesItem) { } /** - * Set the languages of your index, for language-specific processing steps such as - * [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - * and - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for + * language-specific processing steps, such as word detection and dictionary settings. **You + * should always specify an indexing language.** If you don't specify an indexing language, the + * search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getIndexLanguages() { @@ -233,7 +309,7 @@ public BaseIndexSettings addDisablePrefixOnAttributes(String disablePrefixOnAttr } /** - * Attributes for which you want to turn off [prefix + * Searchable attributes for which you want to turn off [prefix * matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ @javax.annotation.Nullable @@ -247,8 +323,8 @@ public BaseIndexSettings setAllowCompressionOfIntegerArray(Boolean allowCompress } /** - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When - * enabled, the compressed arrays may be reordered. + * Whether arrays with exclusively non-negative integers should be compressed for better + * performance. If true, the compressed arrays may be reordered. */ @javax.annotation.Nullable public Boolean getAllowCompressionOfIntegerArray() { @@ -271,6 +347,17 @@ public BaseIndexSettings addNumericAttributesForFiltering(String numericAttribut /** * Numeric attributes that can be used as [numerical * filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * By default, all numeric attributes are available as numerical filters. For faster indexing, + * reduce the number of numeric attributes. If you want to turn off filtering for all numeric + * attributes, specifiy an attribute that doesn't exist in your index, such as + * `NO_NUMERIC_FILTERING`. **Modifier** + * + *
+ *
equalOnly(\"ATTRIBUTE\") + *
Support only filtering based on equality comparisons `=` and `!=`. + *
+ * + * Without modifier, all numeric comparisons are supported. */ @javax.annotation.Nullable public List getNumericAttributesForFiltering() { @@ -283,9 +370,10 @@ public BaseIndexSettings setSeparatorsToIndex(String separatorsToIndex) { } /** - * Controls which separators are added to an Algolia index as part of - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - * Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * Controls which separators are indexed. Separators are all non-letter characters except spaces + * and currency characters, such as $€£¥. By default, separator characters aren't indexed. With + * `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a + * search for `C#` would report two matches. */ @javax.annotation.Nullable public String getSeparatorsToIndex() { @@ -306,10 +394,23 @@ public BaseIndexSettings addSearchableAttributes(String searchableAttributesItem } /** - * [Attributes used for - * searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), - * including determining [if matches at the beginning of a word are important (ordered) or not - * (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * Attributes used for searching. By default, all attributes are searchable and the + * [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + * ranking criterion is turned off. With a non-empty list, Algolia only returns results with + * matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: + * matches in attributes that are higher in the list of `searchableAttributes` rank first. To make + * matches in two attributes rank equally, include them in a comma-separated string, such as + * `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more + * information, see [Searchable + * attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + * **Modifier** + * + *
+ *
unordered(\"ATTRIBUTE\") + *
Ignore the position of a match within the attribute. + *
+ * + * Without modifier, matches at the beginning of an attribute rank higer than matches at the end. */ @javax.annotation.Nullable public List getSearchableAttributes() { @@ -321,7 +422,7 @@ public BaseIndexSettings setUserData(Object userData) { return this; } - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @javax.annotation.Nullable public Object getUserData() { return userData; @@ -341,7 +442,7 @@ public BaseIndexSettings putCustomNormalization(String key, Map } /** - * A list of characters and their normalized replacements to override Algolia's default + * Characters and their normalized replacements. This overrides Algolia's default * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ @javax.annotation.Nullable @@ -355,8 +456,12 @@ public BaseIndexSettings setAttributeForDistinct(String attributeForDistinct) { } /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * Attribute that should be used to establish groups of results. All records with the same value + * for this attribute are considered a group. You can combine `attributeForDistinct` with the + * `distinct` search parameter to control how many items per group are included in the search + * results. If you want to use the same attribute also for faceting, use the `afterDistinct` + * modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, + * which will result in accurate facet counts. */ @javax.annotation.Nullable public String getAttributeForDistinct() { @@ -373,6 +478,7 @@ public boolean equals(Object o) { } BaseIndexSettings baseIndexSettings = (BaseIndexSettings) o; return ( + Objects.equals(this.attributesForFaceting, baseIndexSettings.attributesForFaceting) && Objects.equals(this.replicas, baseIndexSettings.replicas) && Objects.equals(this.paginationLimitedTo, baseIndexSettings.paginationLimitedTo) && Objects.equals(this.unretrievableAttributes, baseIndexSettings.unretrievableAttributes) && @@ -395,6 +501,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + attributesForFaceting, replicas, paginationLimitedTo, unretrievableAttributes, @@ -418,6 +525,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BaseIndexSettings {\n"); + sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" replicas: ").append(toIndentedString(replicas)).append("\n"); sb.append(" paginationLimitedTo: ").append(toIndentedString(paginationLimitedTo)).append("\n"); sb.append(" unretrievableAttributes: ").append(toIndentedString(unretrievableAttributes)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParams.java index f3aa78ea1f..efda708ced 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParams.java @@ -90,9 +90,6 @@ public class BaseSearchParams { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -116,7 +113,7 @@ public BaseSearchParams setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -127,7 +124,14 @@ public BaseSearchParams setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -139,8 +143,21 @@ public BaseSearchParams setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -197,9 +214,9 @@ public BaseSearchParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -219,10 +236,7 @@ public BaseSearchParams addRestrictSearchableAttributes(String restrictSearchabl return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -242,9 +256,10 @@ public BaseSearchParams addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -257,11 +272,11 @@ public BaseSearchParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -273,7 +288,7 @@ public BaseSearchParams setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -284,13 +299,7 @@ public BaseSearchParams setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -301,14 +310,7 @@ public BaseSearchParams setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -320,9 +322,10 @@ public BaseSearchParams setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -334,10 +337,7 @@ public BaseSearchParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -371,7 +371,7 @@ public BaseSearchParams setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -393,9 +393,11 @@ public BaseSearchParams addInsideBoundingBox(List insideBoundingBoxItem) } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -416,9 +418,11 @@ public BaseSearchParams addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -439,10 +443,10 @@ public BaseSearchParams addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -463,9 +467,9 @@ public BaseSearchParams addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -478,8 +482,11 @@ public BaseSearchParams setPersonalizationImpact(Integer personalizationImpact) } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -492,9 +499,9 @@ public BaseSearchParams setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -506,40 +513,18 @@ public BaseSearchParams setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public BaseSearchParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public BaseSearchParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public BaseSearchParams setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -551,9 +536,9 @@ public BaseSearchParams setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -565,10 +550,7 @@ public BaseSearchParams setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -601,7 +583,7 @@ public BaseSearchParams setPercentileComputation(Boolean percentileComputation) return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -612,7 +594,7 @@ public BaseSearchParams setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; @@ -654,7 +636,6 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, baseSearchParams.personalizationImpact) && Objects.equals(this.userToken, baseSearchParams.userToken) && Objects.equals(this.getRankingInfo, baseSearchParams.getRankingInfo) && - Objects.equals(this.explain, baseSearchParams.explain) && Objects.equals(this.synonyms, baseSearchParams.synonyms) && Objects.equals(this.clickAnalytics, baseSearchParams.clickAnalytics) && Objects.equals(this.analytics, baseSearchParams.analytics) && @@ -693,7 +674,6 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, @@ -733,7 +713,6 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java index 9c55b000c9..32d03c9fc7 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java @@ -87,9 +87,6 @@ public class BaseSearchParamsWithoutQuery { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -113,7 +110,14 @@ public BaseSearchParamsWithoutQuery setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -125,8 +129,21 @@ public BaseSearchParamsWithoutQuery setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -183,9 +200,9 @@ public BaseSearchParamsWithoutQuery setSumOrFiltersScores(Boolean sumOrFiltersSc } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -205,10 +222,7 @@ public BaseSearchParamsWithoutQuery addRestrictSearchableAttributes(String restr return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -228,9 +242,10 @@ public BaseSearchParamsWithoutQuery addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -243,11 +258,11 @@ public BaseSearchParamsWithoutQuery setFacetingAfterDistinct(Boolean facetingAft } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -259,7 +274,7 @@ public BaseSearchParamsWithoutQuery setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -270,13 +285,7 @@ public BaseSearchParamsWithoutQuery setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -287,14 +296,7 @@ public BaseSearchParamsWithoutQuery setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -306,9 +308,10 @@ public BaseSearchParamsWithoutQuery setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -320,10 +323,7 @@ public BaseSearchParamsWithoutQuery setAroundLatLngViaIP(Boolean aroundLatLngVia return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -357,7 +357,7 @@ public BaseSearchParamsWithoutQuery setMinimumAroundRadius(Integer minimumAround } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -379,9 +379,11 @@ public BaseSearchParamsWithoutQuery addInsideBoundingBox(List insideBoun } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -402,9 +404,11 @@ public BaseSearchParamsWithoutQuery addInsidePolygon(List insidePolygonI } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -425,10 +429,10 @@ public BaseSearchParamsWithoutQuery addNaturalLanguages(String naturalLanguagesI } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -449,9 +453,9 @@ public BaseSearchParamsWithoutQuery addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -464,8 +468,11 @@ public BaseSearchParamsWithoutQuery setPersonalizationImpact(Integer personaliza } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -478,9 +485,9 @@ public BaseSearchParamsWithoutQuery setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -492,40 +499,18 @@ public BaseSearchParamsWithoutQuery setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public BaseSearchParamsWithoutQuery setExplain(List explain) { - this.explain = explain; - return this; - } - - public BaseSearchParamsWithoutQuery addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public BaseSearchParamsWithoutQuery setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -537,9 +522,9 @@ public BaseSearchParamsWithoutQuery setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -551,10 +536,7 @@ public BaseSearchParamsWithoutQuery setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -587,7 +569,7 @@ public BaseSearchParamsWithoutQuery setPercentileComputation(Boolean percentileC return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -598,7 +580,7 @@ public BaseSearchParamsWithoutQuery setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; @@ -639,7 +621,6 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, baseSearchParamsWithoutQuery.personalizationImpact) && Objects.equals(this.userToken, baseSearchParamsWithoutQuery.userToken) && Objects.equals(this.getRankingInfo, baseSearchParamsWithoutQuery.getRankingInfo) && - Objects.equals(this.explain, baseSearchParamsWithoutQuery.explain) && Objects.equals(this.synonyms, baseSearchParamsWithoutQuery.synonyms) && Objects.equals(this.clickAnalytics, baseSearchParamsWithoutQuery.clickAnalytics) && Objects.equals(this.analytics, baseSearchParamsWithoutQuery.analytics) && @@ -677,7 +658,6 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, @@ -716,7 +696,6 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchResponse.java index 45dced7205..5f5b0b3f6e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BaseSearchResponse.java @@ -152,7 +152,7 @@ public BaseSearchResponse setAutomaticRadius(String automaticRadius) { return this; } - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ @javax.annotation.Nullable public String getAutomaticRadius() { return automaticRadius; @@ -230,7 +230,7 @@ public BaseSearchResponse putFacets(String key, Map facetsItem) return this; } - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ @javax.annotation.Nullable public Map> getFacets() { return facets; @@ -307,7 +307,7 @@ public BaseSearchResponse setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; @@ -318,7 +318,7 @@ public BaseSearchResponse setNbPages(Integer nbPages) { return this; } - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @javax.annotation.Nonnull public Integer getNbPages() { return nbPages; @@ -340,7 +340,7 @@ public BaseSearchResponse setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nonnull public Integer getPage() { return page; @@ -448,7 +448,7 @@ public BaseSearchResponse setUserData(Object userData) { return this; } - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @javax.annotation.Nullable public Object getUserData() { return userData; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java index c0a5354a9d..14e699296c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.Objects; -/** `batchDictionaryEntries` parameters. */ +/** Request body for updating dictionary entries. */ public class BatchDictionaryEntriesParams { @JsonProperty("clearExistingDictionaryEntries") @@ -24,8 +24,7 @@ public BatchDictionaryEntriesParams setClearExistingDictionaryEntries(Boolean cl } /** - * Incidates whether to replace all custom entries in the dictionary with the ones sent with this - * request. + * Whether to replace all custom entries in the dictionary with the ones sent with this request. */ @javax.annotation.Nullable public Boolean getClearExistingDictionaryEntries() { @@ -42,7 +41,7 @@ public BatchDictionaryEntriesParams addRequests(BatchDictionaryEntriesRequest re return this; } - /** Operations to batch. */ + /** List of additions and deletions to your dictionaries. */ @javax.annotation.Nonnull public List getRequests() { return requests; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchResponse.java index 8cd4f05f94..09fd8cad31 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BatchResponse.java @@ -25,8 +25,8 @@ public BatchResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { @@ -43,7 +43,7 @@ public BatchResponse addObjectIDs(String objectIDsItem) { return this; } - /** Unique object (record) identifiers. */ + /** Unique record identifiers. */ @javax.annotation.Nonnull public List getObjectIDs() { return objectIDs; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java index 3f0620162e..4020e68837 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java @@ -91,9 +91,6 @@ public class BrowseParamsObject implements BrowseParams { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -112,9 +109,6 @@ public class BrowseParamsObject implements BrowseParams { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -255,7 +249,7 @@ public BrowseParamsObject setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -266,7 +260,14 @@ public BrowseParamsObject setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -278,8 +279,21 @@ public BrowseParamsObject setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -336,9 +350,9 @@ public BrowseParamsObject setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -358,10 +372,7 @@ public BrowseParamsObject addRestrictSearchableAttributes(String restrictSearcha return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -381,9 +392,10 @@ public BrowseParamsObject addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -396,11 +408,11 @@ public BrowseParamsObject setFacetingAfterDistinct(Boolean facetingAfterDistinct } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -412,7 +424,7 @@ public BrowseParamsObject setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -423,13 +435,7 @@ public BrowseParamsObject setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -440,14 +446,7 @@ public BrowseParamsObject setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -459,9 +458,10 @@ public BrowseParamsObject setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -473,10 +473,7 @@ public BrowseParamsObject setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -510,7 +507,7 @@ public BrowseParamsObject setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -532,9 +529,11 @@ public BrowseParamsObject addInsideBoundingBox(List insideBoundingBoxIte } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -555,9 +554,11 @@ public BrowseParamsObject addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -578,10 +579,10 @@ public BrowseParamsObject addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -602,9 +603,9 @@ public BrowseParamsObject addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -617,8 +618,11 @@ public BrowseParamsObject setPersonalizationImpact(Integer personalizationImpact } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -631,9 +635,9 @@ public BrowseParamsObject setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -645,40 +649,18 @@ public BrowseParamsObject setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public BrowseParamsObject setExplain(List explain) { - this.explain = explain; - return this; - } - - public BrowseParamsObject addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public BrowseParamsObject setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -690,9 +672,9 @@ public BrowseParamsObject setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -704,10 +686,7 @@ public BrowseParamsObject setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -740,7 +719,7 @@ public BrowseParamsObject setPercentileComputation(Boolean percentileComputation return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -751,37 +730,12 @@ public BrowseParamsObject setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public BrowseParamsObject setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public BrowseParamsObject addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public BrowseParamsObject setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -797,7 +751,10 @@ public BrowseParamsObject addAttributesToRetrieve(String attributesToRetrieveIte /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -818,8 +775,23 @@ public BrowseParamsObject addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -840,9 +812,22 @@ public BrowseParamsObject addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -854,7 +839,12 @@ public BrowseParamsObject setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -874,8 +864,12 @@ public BrowseParamsObject addAttributesToHighlight(String attributesToHighlightI } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -896,9 +890,10 @@ public BrowseParamsObject addAttributesToSnippet(String attributesToSnippetItem) } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -910,7 +905,7 @@ public BrowseParamsObject setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -921,7 +916,7 @@ public BrowseParamsObject setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -943,7 +938,10 @@ public BrowseParamsObject setRestrictHighlightAndSnippetArrays(Boolean restrictH return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -966,7 +964,7 @@ public BrowseParamsObject setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -981,7 +979,7 @@ public BrowseParamsObject setMinWordSizefor2Typos(Integer minWordSizefor2Typos) } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -1006,7 +1004,10 @@ public BrowseParamsObject setAllowTyposOnNumericTokens(Boolean allowTyposOnNumer return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1028,6 +1029,12 @@ public BrowseParamsObject addDisableTypoToleranceOnAttributes(String disableTypo /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1062,8 +1069,9 @@ public BrowseParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnC } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1084,10 +1092,18 @@ public BrowseParamsObject addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1100,9 +1116,10 @@ public BrowseParamsObject setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1114,10 +1131,7 @@ public BrowseParamsObject setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1128,11 +1142,7 @@ public BrowseParamsObject setEnablePersonalization(Boolean enablePersonalization return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1188,8 +1198,8 @@ public BrowseParamsObject setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1210,9 +1220,21 @@ public BrowseParamsObject addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1233,8 +1255,12 @@ public BrowseParamsObject addDisableExactOnAttributes(String disableExactOnAttri } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1266,8 +1292,20 @@ public BrowseParamsObject addAlternativesAsExact(AlternativesAsExact alternative } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1288,8 +1326,18 @@ public BrowseParamsObject addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advan } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1313,8 +1361,12 @@ public BrowseParamsObject setReplaceSynonymsInHighlight(Boolean replaceSynonymsI } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1327,9 +1379,11 @@ public BrowseParamsObject setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1349,7 +1403,13 @@ public BrowseParamsObject addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1361,7 +1421,7 @@ public BrowseParamsObject setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1375,7 +1435,7 @@ public BrowseParamsObject setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1386,7 +1446,21 @@ public BrowseParamsObject setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1398,10 +1472,11 @@ public BrowseParamsObject setAttributeCriteriaComputedByMinProximity(Boolean att } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1425,8 +1500,9 @@ public BrowseParamsObject setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1450,9 +1526,9 @@ public BrowseParamsObject setCursor(String cursor) { } /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the - * previous call. Pass this value to the subsequent browse call to get the next page of results. - * When the end of the index has been reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the + * response of a previous request. The last page of the response does not return a `cursor` + * attribute. */ @javax.annotation.Nullable public String getCursor() { @@ -1495,14 +1571,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, browseParamsObject.personalizationImpact) && Objects.equals(this.userToken, browseParamsObject.userToken) && Objects.equals(this.getRankingInfo, browseParamsObject.getRankingInfo) && - Objects.equals(this.explain, browseParamsObject.explain) && Objects.equals(this.synonyms, browseParamsObject.synonyms) && Objects.equals(this.clickAnalytics, browseParamsObject.clickAnalytics) && Objects.equals(this.analytics, browseParamsObject.analytics) && Objects.equals(this.analyticsTags, browseParamsObject.analyticsTags) && Objects.equals(this.percentileComputation, browseParamsObject.percentileComputation) && Objects.equals(this.enableABTest, browseParamsObject.enableABTest) && - Objects.equals(this.attributesForFaceting, browseParamsObject.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, browseParamsObject.attributesToRetrieve) && Objects.equals(this.ranking, browseParamsObject.ranking) && Objects.equals(this.customRanking, browseParamsObject.customRanking) && @@ -1580,14 +1654,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1666,14 +1738,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseResponse.java index aeb4f769f5..6a35f6b64f 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseResponse.java @@ -153,7 +153,7 @@ public BrowseResponse setAutomaticRadius(String automaticRadius) { return this; } - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ @javax.annotation.Nullable public String getAutomaticRadius() { return automaticRadius; @@ -231,7 +231,7 @@ public BrowseResponse putFacets(String key, Map facetsItem) return this; } - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ @javax.annotation.Nullable public Map> getFacets() { return facets; @@ -308,7 +308,7 @@ public BrowseResponse setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; @@ -319,7 +319,7 @@ public BrowseResponse setNbPages(Integer nbPages) { return this; } - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @javax.annotation.Nonnull public Integer getNbPages() { return nbPages; @@ -341,7 +341,7 @@ public BrowseResponse setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nonnull public Integer getPage() { return page; @@ -449,7 +449,7 @@ public BrowseResponse setUserData(Object userData) { return this; } - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @javax.annotation.Nullable public Object getUserData() { return userData; @@ -479,7 +479,10 @@ public BrowseResponse addHits(T hitsItem) { return this; } - /** Get hits */ + /** + * Search results (hits). Hits are records from your index that match the search criteria, + * augmented with additional attributes, such as, for highlighting. + */ @javax.annotation.Nonnull public List getHits() { return hits; @@ -490,7 +493,7 @@ public BrowseResponse setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nonnull public String getQuery() { return query; @@ -513,9 +516,9 @@ public BrowseResponse setCursor(String cursor) { } /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the - * previous call. Pass this value to the subsequent browse call to get the next page of results. - * When the end of the index has been reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the + * response of a previous request. The last page of the response does not return a `cursor` + * attribute. */ @javax.annotation.Nullable public String getCursor() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperation.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperation.java index 059305f092..f259266878 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperation.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperation.java @@ -7,9 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** - * To update an attribute without pushing the entire record, you can use these built-in operations. - */ +/** Update to perform on the attribute. */ @JsonDeserialize(as = BuiltInOperation.class) public class BuiltInOperation implements AttributeToUpdate { @@ -36,8 +34,8 @@ public BuiltInOperation setValue(String value) { } /** - * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` - * or `Remove` value. + * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an + * `Add` or `Remove` value. */ @javax.annotation.Nonnull public String getValue() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperationType.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperationType.java index e3c24d2138..4cabd2dee6 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperationType.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BuiltInOperationType.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Operation to apply to the attribute. */ +/** How to change the attribute. */ public enum BuiltInOperationType { INCREMENT("Increment"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Condition.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Condition.java index 4ec1ad7a3a..c77697a154 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Condition.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Condition.java @@ -22,12 +22,20 @@ public class Condition { @JsonProperty("context") private String context; + @JsonProperty("filters") + private String filters; + public Condition setPattern(String pattern) { this.pattern = pattern; return this; } - /** Query pattern syntax. */ + /** + * Query pattern that triggers the rule. You can use either a literal string, or a special pattern + * `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query + * matches the literal string or a value of the specified facet. For example, with `pattern: + * {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". + */ @javax.annotation.Nullable public String getPattern() { return pattern; @@ -49,7 +57,7 @@ public Condition setAlternatives(Boolean alternatives) { return this; } - /** Whether the pattern matches on plurals, synonyms, and typos. */ + /** Whether the pattern should match plurals, synonyms, and typos. */ @javax.annotation.Nullable public Boolean getAlternatives() { return alternatives; @@ -60,12 +68,32 @@ public Condition setContext(String context) { return this; } - /** Rule context format: [A-Za-z0-9_-]+). */ + /** + * An additional restriction that only triggers the rule, when the search has the same value as + * `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when + * the search request has a matching `ruleContexts: mobile`. A rule context must only contain + * alphanumeric characters. + */ @javax.annotation.Nullable public String getContext() { return context; } + public Condition setFilters(String filters) { + this.filters = filters; + return this; + } + + /** + * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that + * the rule is triggered, when the specific filter is selected. You can use `filters` on its own + * or combine it with the `pattern` parameter. + */ + @javax.annotation.Nullable + public String getFilters() { + return filters; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +107,14 @@ public boolean equals(Object o) { Objects.equals(this.pattern, condition.pattern) && Objects.equals(this.anchoring, condition.anchoring) && Objects.equals(this.alternatives, condition.alternatives) && - Objects.equals(this.context, condition.context) + Objects.equals(this.context, condition.context) && + Objects.equals(this.filters, condition.filters) ); } @Override public int hashCode() { - return Objects.hash(pattern, anchoring, alternatives, context); + return Objects.hash(pattern, anchoring, alternatives, context, filters); } @Override @@ -96,6 +125,7 @@ public String toString() { sb.append(" anchoring: ").append(toIndentedString(anchoring)).append("\n"); sb.append(" alternatives: ").append(toIndentedString(alternatives)).append("\n"); sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Consequence.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Consequence.java index ad757a1045..44fae70149 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Consequence.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Consequence.java @@ -10,8 +10,8 @@ import java.util.Objects; /** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - * of a rule. + * Effect of the rule. For more information, see + * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). */ public class Consequence { @@ -54,7 +54,10 @@ public Consequence addPromote(Promote promoteItem) { return this; } - /** Records to promote. */ + /** + * Records you want to pin to a specific position in the search results. You can promote up to 300 + * records, either individually, or as groups of up to 100 records each. + */ @javax.annotation.Nullable public List getPromote() { return promote; @@ -66,9 +69,10 @@ public Consequence setFilterPromotes(Boolean filterPromotes) { } /** - * Only use in combination with the `promote` consequence. When `true`, promoted results will be - * restricted to match the filters of the current search. When `false`, the promoted results will - * show up regardless of the filters. + * Whether promoted records must match an active filter for the consequence to be applied. This + * ensures that user actions (filtering the search) are given a higher precendence. For example, + * if you promote a record with the `color: red` attribute, and the user filters the search for + * `color: blue`, the \"red\" record won't be shown. */ @javax.annotation.Nullable public Boolean getFilterPromotes() { @@ -88,7 +92,7 @@ public Consequence addHide(ConsequenceHide hideItem) { return this; } - /** Records to hide. By default, you can hide up to 50 records per rule. */ + /** Records you want to hide from the search results. */ @javax.annotation.Nullable public List getHide() { return hide; @@ -100,8 +104,8 @@ public Consequence setUserData(Object userData) { } /** - * Custom JSON object that will be appended to the userData array in the response. This object - * isn't interpreted by the API. It's limited to 1kB of minified JSON. + * A JSON object with custom data that will be appended to the `userData` array in the response. + * This object isn't interpreted by the API and is limited to 1 kB of minified JSON. */ @javax.annotation.Nullable public Object getUserData() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceHide.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceHide.java index cba0103303..2e3967f246 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceHide.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceHide.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Unique identifier of the record to hide. */ +/** Object ID of the record to hide. */ public class ConsequenceHide { @JsonProperty("objectID") @@ -18,7 +18,7 @@ public ConsequenceHide setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java index 14390d355e..180e0f840c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java @@ -87,9 +87,6 @@ public class ConsequenceParams { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -108,9 +105,6 @@ public class ConsequenceParams { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -257,7 +251,14 @@ public ConsequenceParams setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -269,8 +270,21 @@ public ConsequenceParams setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -327,9 +341,9 @@ public ConsequenceParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -349,10 +363,7 @@ public ConsequenceParams addRestrictSearchableAttributes(String restrictSearchab return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -372,9 +383,10 @@ public ConsequenceParams addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -387,11 +399,11 @@ public ConsequenceParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -403,7 +415,7 @@ public ConsequenceParams setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -414,13 +426,7 @@ public ConsequenceParams setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -431,14 +437,7 @@ public ConsequenceParams setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -450,9 +449,10 @@ public ConsequenceParams setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -464,10 +464,7 @@ public ConsequenceParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -501,7 +498,7 @@ public ConsequenceParams setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -523,9 +520,11 @@ public ConsequenceParams addInsideBoundingBox(List insideBoundingBoxItem } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -546,9 +545,11 @@ public ConsequenceParams addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -569,10 +570,10 @@ public ConsequenceParams addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -593,9 +594,9 @@ public ConsequenceParams addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -608,8 +609,11 @@ public ConsequenceParams setPersonalizationImpact(Integer personalizationImpact) } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -622,9 +626,9 @@ public ConsequenceParams setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -636,40 +640,18 @@ public ConsequenceParams setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public ConsequenceParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public ConsequenceParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public ConsequenceParams setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -681,9 +663,9 @@ public ConsequenceParams setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -695,10 +677,7 @@ public ConsequenceParams setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -731,7 +710,7 @@ public ConsequenceParams setPercentileComputation(Boolean percentileComputation) return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -742,37 +721,12 @@ public ConsequenceParams setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public ConsequenceParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public ConsequenceParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public ConsequenceParams setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -788,7 +742,10 @@ public ConsequenceParams addAttributesToRetrieve(String attributesToRetrieveItem /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -809,8 +766,23 @@ public ConsequenceParams addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -831,9 +803,22 @@ public ConsequenceParams addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -845,7 +830,12 @@ public ConsequenceParams setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -865,8 +855,12 @@ public ConsequenceParams addAttributesToHighlight(String attributesToHighlightIt } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -887,9 +881,10 @@ public ConsequenceParams addAttributesToSnippet(String attributesToSnippetItem) } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -901,7 +896,7 @@ public ConsequenceParams setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -912,7 +907,7 @@ public ConsequenceParams setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -934,7 +929,10 @@ public ConsequenceParams setRestrictHighlightAndSnippetArrays(Boolean restrictHi return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -957,7 +955,7 @@ public ConsequenceParams setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -972,7 +970,7 @@ public ConsequenceParams setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -997,7 +995,10 @@ public ConsequenceParams setAllowTyposOnNumericTokens(Boolean allowTyposOnNumeri return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1019,6 +1020,12 @@ public ConsequenceParams addDisableTypoToleranceOnAttributes(String disableTypoT /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1053,8 +1060,9 @@ public ConsequenceParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCh } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1075,10 +1083,18 @@ public ConsequenceParams addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1091,9 +1107,10 @@ public ConsequenceParams setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1105,10 +1122,7 @@ public ConsequenceParams setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1119,11 +1133,7 @@ public ConsequenceParams setEnablePersonalization(Boolean enablePersonalization) return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1179,8 +1189,8 @@ public ConsequenceParams setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1201,9 +1211,21 @@ public ConsequenceParams addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1224,8 +1246,12 @@ public ConsequenceParams addDisableExactOnAttributes(String disableExactOnAttrib } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1257,8 +1283,20 @@ public ConsequenceParams addAlternativesAsExact(AlternativesAsExact alternatives } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1279,8 +1317,18 @@ public ConsequenceParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advanc } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1304,8 +1352,12 @@ public ConsequenceParams setReplaceSynonymsInHighlight(Boolean replaceSynonymsIn } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1318,9 +1370,11 @@ public ConsequenceParams setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1340,7 +1394,13 @@ public ConsequenceParams addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1352,7 +1412,7 @@ public ConsequenceParams setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1366,7 +1426,7 @@ public ConsequenceParams setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1377,7 +1437,21 @@ public ConsequenceParams setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1389,10 +1463,11 @@ public ConsequenceParams setAttributeCriteriaComputedByMinProximity(Boolean attr } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1416,8 +1491,9 @@ public ConsequenceParams setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1503,14 +1579,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, consequenceParams.personalizationImpact) && Objects.equals(this.userToken, consequenceParams.userToken) && Objects.equals(this.getRankingInfo, consequenceParams.getRankingInfo) && - Objects.equals(this.explain, consequenceParams.explain) && Objects.equals(this.synonyms, consequenceParams.synonyms) && Objects.equals(this.clickAnalytics, consequenceParams.clickAnalytics) && Objects.equals(this.analytics, consequenceParams.analytics) && Objects.equals(this.analyticsTags, consequenceParams.analyticsTags) && Objects.equals(this.percentileComputation, consequenceParams.percentileComputation) && Objects.equals(this.enableABTest, consequenceParams.enableABTest) && - Objects.equals(this.attributesForFaceting, consequenceParams.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, consequenceParams.attributesToRetrieve) && Objects.equals(this.ranking, consequenceParams.ranking) && Objects.equals(this.customRanking, consequenceParams.customRanking) && @@ -1589,14 +1663,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1676,14 +1748,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQuery.java index c07ce4f463..214ef7d108 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQuery.java @@ -12,8 +12,9 @@ import java.util.logging.Logger; /** - * When providing a string, it replaces the entire query string. When providing an object, it - * describes incremental edits to be made to the query string (but you can't do both). + * Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is + * replaced with that string. If `consequenceQuery` is an object, it describes incremental edits + * made to the query. */ @JsonDeserialize(using = ConsequenceQuery.Deserializer.class) public interface ConsequenceQuery { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java index c83125bfb1..b34aacaa5b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java @@ -32,7 +32,7 @@ public ConsequenceQueryObject addRemove(String removeItem) { return this; } - /** Words to remove. */ + /** Words to remove from the search query. */ @javax.annotation.Nullable public List getRemove() { return remove; @@ -51,7 +51,7 @@ public ConsequenceQueryObject addEdits(Edit editsItem) { return this; } - /** Edits to apply. */ + /** Changes to make to the search query. */ @javax.annotation.Nullable public List getEdits() { return edits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/CreatedAtResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/CreatedAtResponse.java index 85b625b737..1dc7f5e516 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/CreatedAtResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/CreatedAtResponse.java @@ -18,7 +18,7 @@ public CreatedAtResponse setCreatedAt(String createdAt) { return this; } - /** Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. */ + /** Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @javax.annotation.Nonnull public String getCreatedAt() { return createdAt; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Cursor.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Cursor.java index c2d0290154..325cfeb746 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Cursor.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Cursor.java @@ -19,9 +19,9 @@ public Cursor setCursor(String cursor) { } /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the - * previous call. Pass this value to the subsequent browse call to get the next page of results. - * When the end of the index has been reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the + * response of a previous request. The last page of the response does not return a `cursor` + * attribute. */ @javax.annotation.Nullable public String getCursor() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeleteByParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeleteByParams.java index a5272ac0a6..e81b268076 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeleteByParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeleteByParams.java @@ -53,8 +53,21 @@ public DeleteByParams setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -89,9 +102,10 @@ public DeleteByParams setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -123,9 +137,11 @@ public DeleteByParams addInsideBoundingBox(List insideBoundingBoxItem) { } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -146,9 +162,11 @@ public DeleteByParams addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeletedAtResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeletedAtResponse.java index d684cc7150..4933a13f93 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeletedAtResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DeletedAtResponse.java @@ -23,8 +23,8 @@ public DeletedAtResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntry.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntry.java index a253ae7feb..6e6f4a38de 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntry.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntry.java @@ -50,7 +50,7 @@ public DictionaryEntry setObjectID(String objectID) { return this; } - /** Unique identifier for a dictionary object. */ + /** Unique identifier for the dictionary entry. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -62,8 +62,8 @@ public DictionaryEntry setLanguage(String language) { } /** - * [Supported language ISO - * code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * ISO code of a [supported + * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ @javax.annotation.Nonnull public String getLanguage() { @@ -75,16 +75,7 @@ public DictionaryEntry setWord(String word) { return this; } - /** - * Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The - * stop word you want to add or update. If the entry already exists in Algolia's standard - * dictionary, you can override its behavior by adding it to the custom dictionary and setting its - * `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a - * compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and - * \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, - * when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes - * into “hund” and “hutte”, discarding the linking \"e\". - */ + /** Matching dictionary word for `stopwords` and `compounds` dictionaries. */ @javax.annotation.Nullable public String getWord() { return word; @@ -103,12 +94,7 @@ public DictionaryEntry addWords(String wordsItem) { return this; } - /** - * Compound dictionary [word - * declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). - * If the entry already exists in Algolia's standard dictionary, you can override its behavior by - * adding it to the custom dictionary and setting its `state` to `disabled`. - */ + /** Matching words in the `plurals` dictionary including declensions. */ @javax.annotation.Nullable public List getWords() { return words; @@ -127,7 +113,7 @@ public DictionaryEntry addDecomposition(String decompositionItem) { return this; } - /** For compound entries, governs the behavior of the `word` parameter. */ + /** Invividual components of a compound word in the `compounds` dictionary. */ @javax.annotation.Nullable public List getDecomposition() { return decomposition; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntryState.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntryState.java index 2be615b72b..15d7b7423b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntryState.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryEntryState.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). */ +/** Whether a dictionary entry is active. */ public enum DictionaryEntryState { ENABLED("enabled"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryLanguage.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryLanguage.java index 6a7a4ad6a1..e5b345f91d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryLanguage.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionaryLanguage.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Custom entries for a dictionary. */ +/** Dictionary type. If `null`, this dictionary type isn't supported for the language. */ public class DictionaryLanguage { @JsonProperty("nbCustomEntries") @@ -18,10 +18,7 @@ public DictionaryLanguage setNbCustomEntries(Integer nbCustomEntries) { return this; } - /** - * If `0`, the dictionary hasn't been customized and only contains standard entries provided by - * Algolia. If `null`, that feature isn't available or isn't supported for that language. - */ + /** Number of custom dictionary entries. */ @javax.annotation.Nullable public Integer getNbCustomEntries() { return nbCustomEntries; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionarySettingsParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionarySettingsParams.java index 44661f4231..49901786cd 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionarySettingsParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/DictionarySettingsParams.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Enable or turn off the built-in Algolia stop words for a specific language. */ +/** Turn on or off the built-in Algolia stop words for a specific language. */ public class DictionarySettingsParams { @JsonProperty("disableStandardEntries") diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Distinct.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Distinct.java index 4b9a5c60af..04dbca8926 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Distinct.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Distinct.java @@ -12,8 +12,11 @@ import java.util.logging.Logger; /** - * Enables [deduplication or grouping of results (Algolia's _distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * Determines how many records of a group are included in the search results. Records with the same + * value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting + * controls how many members of the group are returned. This is useful for [deduplication and + * grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * The `distinct` setting is ignored if `attributeForDistinct` is not set. */ @JsonDeserialize(using = Distinct.Deserializer.class) public interface Distinct { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Edit.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Edit.java index 5773c917aa..a936322de2 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Edit.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Edit.java @@ -46,7 +46,7 @@ public Edit setInsert(String insert) { return this; } - /** Text that should be inserted in place of the removed text inside the query string. */ + /** Text to be added in place of the deleted text inside the query string. */ @javax.annotation.Nullable public String getInsert() { return insert; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java index 7ae300b45c..3281e2375e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java @@ -9,7 +9,21 @@ /** * Determines how the [Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - * is computed when the query contains only one word. + * is computed when the search query has only one word. + * + *
+ *
attribute + *
The Exact ranking criterion is 1 if the query word and attribute value are the same. For + * example, a search for \"road\" will match the value \"road\", but not \"road trip\". + *
none + *
The Exact ranking criterion is ignored on single-word searches. + *
word + *
The Exact ranking criterion is 1 if the query word is found in the attribute value. The + * query word must have at least 3 characters and must not be a stop word. + *
+ * + * If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix + * matches won't. */ public enum ExactOnSingleWordQuery { ATTRIBUTE("attribute"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetFilters.java index 4195b1e834..bdf446a5d9 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetFilters.java @@ -14,8 +14,12 @@ import java.util.logging.Logger; /** - * [Filter hits by facet - * value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * Filter the search by facet values, so that only records with the same facet values are retrieved. + * **Prefer using the `filters` parameter, which supports all filter types and combinations with + * boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - + * `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - + * `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that + * start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ @JsonDeserialize(using = FacetFilters.Deserializer.class) public interface FacetFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetHits.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetHits.java index f02459b393..d948c6edc6 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetHits.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetHits.java @@ -35,7 +35,7 @@ public FacetHits setHighlighted(String highlighted) { return this; } - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @javax.annotation.Nonnull public String getHighlighted() { return highlighted; @@ -47,9 +47,8 @@ public FacetHits setCount(Integer count) { } /** - * Number of records containing this facet value. This takes into account the extra search - * parameters specified in the query. Like for a regular search query, the [counts may not be - * exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + * Number of records with this facet value. [The count may be + * approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). */ @javax.annotation.Nonnull public Integer getCount() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetOrdering.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetOrdering.java index f108360c5f..0970e60adb 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetOrdering.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/FacetOrdering.java @@ -9,7 +9,7 @@ import java.util.Map; import java.util.Objects; -/** Defines the ordering of facets (widgets). */ +/** Order of facet names and facet values in your UI. */ public class FacetOrdering { @JsonProperty("facets") @@ -42,7 +42,7 @@ public FacetOrdering putValues(String key, Value valuesItem) { return this; } - /** Ordering of facet values within an individual facet. */ + /** Order of facet values. One object for each facet. */ @javax.annotation.Nullable public Map getValues() { return values; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Facets.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Facets.java index 78d02e3155..831f9cd519 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Facets.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Facets.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.Objects; -/** Ordering of facets (widgets). */ +/** Order of facet names. */ public class Facets { @JsonProperty("order") @@ -28,7 +28,10 @@ public Facets addOrder(String orderItem) { return this; } - /** Pinned order of facet lists. */ + /** + * Explicit order of facets or facet values. This setting lets you always show specific facets or + * facet values at the top of the list. + */ @javax.annotation.Nullable public List getOrder() { return order; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetApiKeyResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetApiKeyResponse.java index a46fa3ba89..9167c10487 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetApiKeyResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetApiKeyResponse.java @@ -79,8 +79,9 @@ public GetApiKeyResponse addAcl(Acl aclItem) { } /** - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) - * associated with the key. + * Permissions that determine the type of API requests this key can make. The required ACL is + * listed in each endpoint's reference. For more information, see [access control + * list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). */ @javax.annotation.Nonnull public List getAcl() { @@ -92,7 +93,7 @@ public GetApiKeyResponse setDescription(String description) { return this; } - /** Description of an API key for you and your team members. */ + /** Description of an API key to help you identify this API key. */ @javax.annotation.Nullable public String getDescription() { return description; @@ -112,11 +113,10 @@ public GetApiKeyResponse addIndexes(String indexesItem) { } /** - * Restricts this API key to a list of indices or index patterns. If the list is empty, all - * indices are allowed. Specify either an exact index name or a pattern with a leading or trailing - * wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - * - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices - * containing \"_products_\". + * Index names or patterns that this API key can access. By default, an API key can access all + * indices in the same application. You can use leading and trailing wildcard characters (`*`): - + * `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with + * \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ @javax.annotation.Nullable public List getIndexes() { @@ -129,9 +129,7 @@ public GetApiKeyResponse setMaxHitsPerQuery(Integer maxHitsPerQuery) { } /** - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > - * **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire - * content by massively querying the index. + * Maximum number of results this API key can retrieve in one query. By default, there's no limit. */ @javax.annotation.Nullable public Integer getMaxHitsPerQuery() { @@ -144,12 +142,10 @@ public GetApiKeyResponse setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHou } /** - * Maximum number of API calls per hour allowed from a given IP address or [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API - * call is performed with this key, a check is performed. If there were more than the specified - * number of calls within the last hour, the API returns an error with the status code `429` (Too - * Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to - * retrieve your entire content by massively querying the index. + * Maximum number of API requests allowed per IP address or [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this + * limit is reached, the API returns an error with status code `429`. By default, there's no + * limit. */ @javax.annotation.Nullable public Integer getMaxQueriesPerIPPerHour() { @@ -162,8 +158,10 @@ public GetApiKeyResponse setQueryParameters(String queryParameters) { } /** - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be - * applied for each query made with this API key. It's a URL-encoded query string. + * Query parameters to add when making API requests with this API key. To restrict this API key to + * specific IP addresses, add the `restrictSources` parameter. You can only add a single source, + * but you can provide a range of IP addresses. Creating an API key fails if the request is made + * from an IP address that's outside the restricted range. */ @javax.annotation.Nullable public String getQueryParameters() { @@ -184,11 +182,13 @@ public GetApiKeyResponse addReferers(String referersItem) { } /** - * Restrict this API key to specific - * [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - * If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all - * referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending - * with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + * Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use + * leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers + * starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with + * \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all + * HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more + * information, see [HTTP referrer + * restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). */ @javax.annotation.Nullable public List getReferers() { @@ -200,15 +200,7 @@ public GetApiKeyResponse setValidity(Integer validity) { return this; } - /** - * Validity duration of a key (in seconds). The key will automatically be removed after this time - * has expired. The default value of 0 never expires. Short-lived API keys are useful to grant - * temporary access to your data. For example, in mobile apps, you can't [control when users - * update your - * app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - * So instead of encoding keys into your app as you would for a web app, you should dynamically - * fetch them from your mobile app's backend. - */ + /** Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ @javax.annotation.Nullable public Integer getValidity() { return validity; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsRequest.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsRequest.java index a247dc5dac..0f42a9a84d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsRequest.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsRequest.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.Objects; -/** Record retrieval operation. */ +/** Request body for retrieving records. */ public class GetObjectsRequest { @JsonProperty("attributesToRetrieve") @@ -45,7 +45,7 @@ public GetObjectsRequest setObjectID(String objectID) { return this; } - /** Record's objectID. */ + /** Object ID for the record to retrieve. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -56,7 +56,7 @@ public GetObjectsRequest setIndexName(String indexName) { return this; } - /** Name of the index containing the required records. */ + /** Index from which to retrieve the records. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsResponse.java index 11adb4690b..9c7362db65 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/GetObjectsResponse.java @@ -25,7 +25,7 @@ public GetObjectsResponse addResults(T resultsItem) { return this; } - /** Retrieved results. */ + /** Retrieved records. */ @javax.annotation.Nonnull public List getResults() { return results; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java index 8cb364294d..852ba29dbf 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java @@ -24,7 +24,7 @@ public HasPendingMappingsResponse setPending(Boolean pending) { return this; } - /** Indicates whether there are clusters undergoing migration, creation, or deletion. */ + /** Whether there are clusters undergoing migration, creation, or deletion. */ @javax.annotation.Nonnull public Boolean getPending() { return pending; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HighlightResultOption.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HighlightResultOption.java index 14e581308a..2b1e63b88a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HighlightResultOption.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/HighlightResultOption.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.Objects; -/** Show highlighted section and words matched on a query. */ +/** Surround words that match the query with HTML tags for highlighting. */ @JsonDeserialize(as = HighlightResultOption.class) public class HighlightResultOption implements HighlightResult { @@ -30,7 +30,7 @@ public HighlightResultOption setValue(String value) { return this; } - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @javax.annotation.Nonnull public String getValue() { return value; @@ -57,7 +57,7 @@ public HighlightResultOption addMatchedWords(String matchedWordsItem) { return this; } - /** List of words from the query that matched the object. */ + /** List of matched words from the search query. */ @javax.annotation.Nonnull public List getMatchedWords() { return matchedWords; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Hit.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Hit.java index f7dd759f11..671063c7b3 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Hit.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Hit.java @@ -9,7 +9,10 @@ import java.util.Map; import java.util.Objects; -/** A single hit. */ +/** + * Search result. A hit is a record from your index, augmented with special attributes for + * highlighting, snippeting, and ranking. + */ public class Hit { @JsonProperty("objectID") @@ -45,7 +48,7 @@ public Hit setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -64,7 +67,7 @@ public Hit putHighlightResult(String key, HighlightResult highlightResultItem) { return this; } - /** Show highlighted section and words matched on a query. */ + /** Surround words that match the query with HTML tags for highlighting. */ @javax.annotation.Nullable public Map getHighlightResult() { return highlightResult; @@ -83,10 +86,7 @@ public Hit putSnippetResult(String key, SnippetResult snippetResultItem) { return this; } - /** - * Snippeted attributes show parts of the matched attributes. Only returned when - * attributesToSnippet is non-empty. - */ + /** Snippets that show the context around a matching search query. */ @javax.annotation.Nullable public Map getSnippetResult() { return snippetResult; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IgnorePlurals.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IgnorePlurals.java index d691eb8e2e..e37322d057 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IgnorePlurals.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IgnorePlurals.java @@ -14,15 +14,8 @@ import java.util.logging.Logger; /** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is - * used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which - * ignoring plurals should be enabled. This list will override any values that you may have set in - * `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are - * considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals - * feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find - * \"feet\"). + * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this + * feature for the languages used in your index. */ @JsonDeserialize(using = IgnorePlurals.Deserializer.class) public interface IgnorePlurals { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java index 842d19b82b..9a26df6839 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java @@ -11,9 +11,12 @@ import java.util.Map; import java.util.Objects; -/** Algolia index settings. */ +/** Index settings. */ public class IndexSettings { + @JsonProperty("attributesForFaceting") + private List attributesForFaceting; + @JsonProperty("replicas") private List replicas; @@ -62,9 +65,6 @@ public class IndexSettings { @JsonProperty("attributeForDistinct") private String attributeForDistinct; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -197,6 +197,43 @@ public class IndexSettings { @JsonProperty("reRankingApplyFilter") private ReRankingApplyFilter reRankingApplyFilter; + public IndexSettings setAttributesForFaceting(List attributesForFaceting) { + this.attributesForFaceting = attributesForFaceting; + return this; + } + + public IndexSettings addAttributesForFaceting(String attributesForFacetingItem) { + if (this.attributesForFaceting == null) { + this.attributesForFaceting = new ArrayList<>(); + } + this.attributesForFaceting.add(attributesForFacetingItem); + return this; + } + + /** + * Attributes used for + * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + * Facets are ways to categorize search results based on attributes. Facets can be used to let + * user filter search results. By default, no attribute is used for faceting. **Modifiers** + * + *
+ *
filterOnly(\"ATTRIBUTE\") + *
Allows using this attribute as a filter, but doesn't evalue the facet values. + *
searchable(\"ATTRIBUTE\") + *
Allows searching for facet values. + *
afterDistinct(\"ATTRIBUTE\") + *
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate + * facet counts. You can apply this modifier to searchable facets: + * `afterDistinct(searchable(ATTRIBUTE))`. + *
+ * + * Without modifiers, the attribute is used as a regular facet. + */ + @javax.annotation.Nullable + public List getAttributesForFaceting() { + return attributesForFaceting; + } + public IndexSettings setReplicas(List replicas) { this.replicas = replicas; return this; @@ -211,9 +248,25 @@ public IndexSettings addReplicas(String replicasItem) { } /** - * Creates - * [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - * which are copies of a primary index with the same records but different settings. + * Creates [replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + * Replicas are copies of a primary index with the same records but different settings, synonyms, + * or rules. If you want to offer a different ranking or sorting of your search results, you'll + * use replica indices. All index operations on a primary index are automatically forwarded to its + * replicas. To add a replica index, you must provide the complete set of replicas to this + * parameter. If you omit a replica from this list, the replica turns into a regular, standalone + * index that will no longer by synced with the primary index. **Modifier** + * + *
+ *
virtual(\"REPLICA\") + *
Create a virtual replica, Virtual replicas don't increase the number of records and are + * optimized for [Relevant + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + *
+ * + * Without modifier, a standard replica is created, which duplicates your record count and is used + * for strict, or [exhaustive + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). */ @javax.annotation.Nullable public List getReplicas() { @@ -225,7 +278,11 @@ public IndexSettings setPaginationLimitedTo(Integer paginationLimitedTo) { return this; } - /** Maximum number of hits accessible through pagination. */ + /** + * Maximum number of search results that can be obtained through pagination. Higher pagination + * limits might slow down your search. For pagination limits above 1,000, the sorting of results + * beyond the 1,000th hit can't be guaranteed. maximum: 20000 + */ @javax.annotation.Nullable public Integer getPaginationLimitedTo() { return paginationLimitedTo; @@ -244,7 +301,12 @@ public IndexSettings addUnretrievableAttributes(String unretrievableAttributesIt return this; } - /** Attributes that can't be retrieved at query time. */ + /** + * Attributes that can't be retrieved at query time. This can be useful if you want to use an + * attribute for ranking or to [restrict + * access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), + * but don't want to include it in the search results. + */ @javax.annotation.Nullable public List getUnretrievableAttributes() { return unretrievableAttributes; @@ -266,6 +328,9 @@ public IndexSettings addDisableTypoToleranceOnWords(String disableTypoToleranceO /** * Words for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * This also turns off [word splitting and + * concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * for the specified words. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnWords() { @@ -286,10 +351,10 @@ public IndexSettings addAttributesToTransliterate(String attributesToTranslitera } /** - * Attributes in your index to which [Japanese - * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - * applies. This will ensure that words indexed in Katakana or Kanji can also be searched in - * Hiragana. + * Attributes, for which you want to support [Japanese + * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + * Transliteration supports searching in any of the Japanese writing systems. To support + * transliteration, you must set the indexing language to Japanese. */ @javax.annotation.Nullable public List getAttributesToTransliterate() { @@ -309,7 +374,7 @@ public IndexSettings addCamelCaseAttributes(String camelCaseAttributesItem) { return this; } - /** Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ + /** Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ @javax.annotation.Nullable public List getCamelCaseAttributes() { return camelCaseAttributes; @@ -321,9 +386,13 @@ public IndexSettings setDecompoundedAttributes(Object decompoundedAttributes) { } /** - * Attributes in your index to which [word + * Searchable attributes to which Algolia should apply [word * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * (decompounding) applies. + * (decompounding). Compound words are formed by combining two or more individual words, and are + * particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, + * the individual components are indexed separately. You can specify different lists for different + * languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish + * (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). */ @javax.annotation.Nullable public Object getDecompoundedAttributes() { @@ -344,10 +413,14 @@ public IndexSettings addIndexLanguages(String indexLanguagesItem) { } /** - * Set the languages of your index, for language-specific processing steps such as - * [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - * and - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for + * language-specific processing steps, such as word detection and dictionary settings. **You + * should always specify an indexing language.** If you don't specify an indexing language, the + * search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getIndexLanguages() { @@ -368,7 +441,7 @@ public IndexSettings addDisablePrefixOnAttributes(String disablePrefixOnAttribut } /** - * Attributes for which you want to turn off [prefix + * Searchable attributes for which you want to turn off [prefix * matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ @javax.annotation.Nullable @@ -382,8 +455,8 @@ public IndexSettings setAllowCompressionOfIntegerArray(Boolean allowCompressionO } /** - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When - * enabled, the compressed arrays may be reordered. + * Whether arrays with exclusively non-negative integers should be compressed for better + * performance. If true, the compressed arrays may be reordered. */ @javax.annotation.Nullable public Boolean getAllowCompressionOfIntegerArray() { @@ -406,6 +479,17 @@ public IndexSettings addNumericAttributesForFiltering(String numericAttributesFo /** * Numeric attributes that can be used as [numerical * filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * By default, all numeric attributes are available as numerical filters. For faster indexing, + * reduce the number of numeric attributes. If you want to turn off filtering for all numeric + * attributes, specifiy an attribute that doesn't exist in your index, such as + * `NO_NUMERIC_FILTERING`. **Modifier** + * + *
+ *
equalOnly(\"ATTRIBUTE\") + *
Support only filtering based on equality comparisons `=` and `!=`. + *
+ * + * Without modifier, all numeric comparisons are supported. */ @javax.annotation.Nullable public List getNumericAttributesForFiltering() { @@ -418,9 +502,10 @@ public IndexSettings setSeparatorsToIndex(String separatorsToIndex) { } /** - * Controls which separators are added to an Algolia index as part of - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - * Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * Controls which separators are indexed. Separators are all non-letter characters except spaces + * and currency characters, such as $€£¥. By default, separator characters aren't indexed. With + * `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a + * search for `C#` would report two matches. */ @javax.annotation.Nullable public String getSeparatorsToIndex() { @@ -441,10 +526,23 @@ public IndexSettings addSearchableAttributes(String searchableAttributesItem) { } /** - * [Attributes used for - * searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), - * including determining [if matches at the beginning of a word are important (ordered) or not - * (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * Attributes used for searching. By default, all attributes are searchable and the + * [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + * ranking criterion is turned off. With a non-empty list, Algolia only returns results with + * matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: + * matches in attributes that are higher in the list of `searchableAttributes` rank first. To make + * matches in two attributes rank equally, include them in a comma-separated string, such as + * `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more + * information, see [Searchable + * attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + * **Modifier** + * + *
+ *
unordered(\"ATTRIBUTE\") + *
Ignore the position of a match within the attribute. + *
+ * + * Without modifier, matches at the beginning of an attribute rank higer than matches at the end. */ @javax.annotation.Nullable public List getSearchableAttributes() { @@ -456,7 +554,7 @@ public IndexSettings setUserData(Object userData) { return this; } - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @javax.annotation.Nullable public Object getUserData() { return userData; @@ -476,7 +574,7 @@ public IndexSettings putCustomNormalization(String key, Map cust } /** - * A list of characters and their normalized replacements to override Algolia's default + * Characters and their normalized replacements. This overrides Algolia's default * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ @javax.annotation.Nullable @@ -490,39 +588,18 @@ public IndexSettings setAttributeForDistinct(String attributeForDistinct) { } /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * Attribute that should be used to establish groups of results. All records with the same value + * for this attribute are considered a group. You can combine `attributeForDistinct` with the + * `distinct` search parameter to control how many items per group are included in the search + * results. If you want to use the same attribute also for faceting, use the `afterDistinct` + * modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, + * which will result in accurate facet counts. */ @javax.annotation.Nullable public String getAttributeForDistinct() { return attributeForDistinct; } - public IndexSettings setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public IndexSettings addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public IndexSettings setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -538,7 +615,10 @@ public IndexSettings addAttributesToRetrieve(String attributesToRetrieveItem) { /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -559,8 +639,23 @@ public IndexSettings addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -581,9 +676,22 @@ public IndexSettings addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -595,7 +703,12 @@ public IndexSettings setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -615,8 +728,12 @@ public IndexSettings addAttributesToHighlight(String attributesToHighlightItem) } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -637,9 +754,10 @@ public IndexSettings addAttributesToSnippet(String attributesToSnippetItem) { } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -651,7 +769,7 @@ public IndexSettings setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -662,7 +780,7 @@ public IndexSettings setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -684,7 +802,10 @@ public IndexSettings setRestrictHighlightAndSnippetArrays(Boolean restrictHighli return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -707,7 +828,7 @@ public IndexSettings setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -722,7 +843,7 @@ public IndexSettings setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -747,7 +868,10 @@ public IndexSettings setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTok return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -769,6 +893,12 @@ public IndexSettings addDisableTypoToleranceOnAttributes(String disableTypoToler /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -803,8 +933,9 @@ public IndexSettings setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharac } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -825,10 +956,18 @@ public IndexSettings addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -841,9 +980,10 @@ public IndexSettings setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -855,10 +995,7 @@ public IndexSettings setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -869,11 +1006,7 @@ public IndexSettings setEnablePersonalization(Boolean enablePersonalization) { return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -929,8 +1062,8 @@ public IndexSettings setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -951,9 +1084,21 @@ public IndexSettings addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -974,8 +1119,12 @@ public IndexSettings addDisableExactOnAttributes(String disableExactOnAttributes } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1007,8 +1156,20 @@ public IndexSettings addAlternativesAsExact(AlternativesAsExact alternativesAsEx } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1029,8 +1190,18 @@ public IndexSettings addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSy } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1054,8 +1225,12 @@ public IndexSettings setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHigh } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1068,9 +1243,11 @@ public IndexSettings setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1090,7 +1267,13 @@ public IndexSettings addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1102,7 +1285,7 @@ public IndexSettings setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1116,7 +1299,7 @@ public IndexSettings setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1127,7 +1310,21 @@ public IndexSettings setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1139,10 +1336,11 @@ public IndexSettings setAttributeCriteriaComputedByMinProximity(Boolean attribut } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1166,8 +1364,9 @@ public IndexSettings setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1195,6 +1394,7 @@ public boolean equals(Object o) { } IndexSettings indexSettings = (IndexSettings) o; return ( + Objects.equals(this.attributesForFaceting, indexSettings.attributesForFaceting) && Objects.equals(this.replicas, indexSettings.replicas) && Objects.equals(this.paginationLimitedTo, indexSettings.paginationLimitedTo) && Objects.equals(this.unretrievableAttributes, indexSettings.unretrievableAttributes) && @@ -1211,7 +1411,6 @@ public boolean equals(Object o) { Objects.equals(this.userData, indexSettings.userData) && Objects.equals(this.customNormalization, indexSettings.customNormalization) && Objects.equals(this.attributeForDistinct, indexSettings.attributeForDistinct) && - Objects.equals(this.attributesForFaceting, indexSettings.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, indexSettings.attributesToRetrieve) && Objects.equals(this.ranking, indexSettings.ranking) && Objects.equals(this.customRanking, indexSettings.customRanking) && @@ -1262,6 +1461,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + attributesForFaceting, replicas, paginationLimitedTo, unretrievableAttributes, @@ -1278,7 +1478,6 @@ public int hashCode() { userData, customNormalization, attributeForDistinct, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1330,6 +1529,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IndexSettings {\n"); + sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" replicas: ").append(toIndentedString(replicas)).append("\n"); sb.append(" paginationLimitedTo: ").append(toIndentedString(paginationLimitedTo)).append("\n"); sb.append(" unretrievableAttributes: ").append(toIndentedString(unretrievableAttributes)).append("\n"); @@ -1346,7 +1546,6 @@ public String toString() { sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); sb.append(" customNormalization: ").append(toIndentedString(customNormalization)).append("\n"); sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java index 26320a73f0..0fb3c89c27 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java @@ -12,9 +12,6 @@ /** IndexSettingsAsSearchParams */ public class IndexSettingsAsSearchParams { - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -147,31 +144,6 @@ public class IndexSettingsAsSearchParams { @JsonProperty("reRankingApplyFilter") private ReRankingApplyFilter reRankingApplyFilter; - public IndexSettingsAsSearchParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public IndexSettingsAsSearchParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public IndexSettingsAsSearchParams setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -187,7 +159,10 @@ public IndexSettingsAsSearchParams addAttributesToRetrieve(String attributesToRe /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -208,8 +183,23 @@ public IndexSettingsAsSearchParams addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -230,9 +220,22 @@ public IndexSettingsAsSearchParams addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -244,7 +247,12 @@ public IndexSettingsAsSearchParams setRelevancyStrictness(Integer relevancyStric return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -264,8 +272,12 @@ public IndexSettingsAsSearchParams addAttributesToHighlight(String attributesToH } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -286,9 +298,10 @@ public IndexSettingsAsSearchParams addAttributesToSnippet(String attributesToSni } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -300,7 +313,7 @@ public IndexSettingsAsSearchParams setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -311,7 +324,7 @@ public IndexSettingsAsSearchParams setHighlightPostTag(String highlightPostTag) return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -333,7 +346,10 @@ public IndexSettingsAsSearchParams setRestrictHighlightAndSnippetArrays(Boolean return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -356,7 +372,7 @@ public IndexSettingsAsSearchParams setMinWordSizefor1Typo(Integer minWordSizefor } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -371,7 +387,7 @@ public IndexSettingsAsSearchParams setMinWordSizefor2Typos(Integer minWordSizefo } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -396,7 +412,10 @@ public IndexSettingsAsSearchParams setAllowTyposOnNumericTokens(Boolean allowTyp return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -418,6 +437,12 @@ public IndexSettingsAsSearchParams addDisableTypoToleranceOnAttributes(String di /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -452,8 +477,9 @@ public IndexSettingsAsSearchParams setKeepDiacriticsOnCharacters(String keepDiac } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -474,10 +500,18 @@ public IndexSettingsAsSearchParams addQueryLanguages(String queryLanguagesItem) } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -490,9 +524,10 @@ public IndexSettingsAsSearchParams setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -504,10 +539,7 @@ public IndexSettingsAsSearchParams setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -518,11 +550,7 @@ public IndexSettingsAsSearchParams setEnablePersonalization(Boolean enablePerson return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -578,8 +606,8 @@ public IndexSettingsAsSearchParams setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -600,9 +628,21 @@ public IndexSettingsAsSearchParams addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -623,8 +663,12 @@ public IndexSettingsAsSearchParams addDisableExactOnAttributes(String disableExa } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -656,8 +700,20 @@ public IndexSettingsAsSearchParams addAlternativesAsExact(AlternativesAsExact al } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -678,8 +734,18 @@ public IndexSettingsAsSearchParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatu } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -703,8 +769,12 @@ public IndexSettingsAsSearchParams setReplaceSynonymsInHighlight(Boolean replace } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -717,9 +787,11 @@ public IndexSettingsAsSearchParams setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -739,7 +811,13 @@ public IndexSettingsAsSearchParams addResponseFields(String responseFieldsItem) return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -751,7 +829,7 @@ public IndexSettingsAsSearchParams setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -765,7 +843,7 @@ public IndexSettingsAsSearchParams setMaxValuesPerFacet(Integer maxValuesPerFace return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -776,7 +854,21 @@ public IndexSettingsAsSearchParams setSortFacetValuesBy(String sortFacetValuesBy return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -788,10 +880,11 @@ public IndexSettingsAsSearchParams setAttributeCriteriaComputedByMinProximity(Bo } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -815,8 +908,9 @@ public IndexSettingsAsSearchParams setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -844,7 +938,6 @@ public boolean equals(Object o) { } IndexSettingsAsSearchParams indexSettingsAsSearchParams = (IndexSettingsAsSearchParams) o; return ( - Objects.equals(this.attributesForFaceting, indexSettingsAsSearchParams.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, indexSettingsAsSearchParams.attributesToRetrieve) && Objects.equals(this.ranking, indexSettingsAsSearchParams.ranking) && Objects.equals(this.customRanking, indexSettingsAsSearchParams.customRanking) && @@ -895,7 +988,6 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -947,7 +1039,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IndexSettingsAsSearchParams {\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Log.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Log.java index 4fb3c4e975..afa674d779 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Log.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Log.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; +import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -28,7 +29,7 @@ public class Log { private String answer; @JsonProperty("url") - private String url; + private URI url; @JsonProperty("ip") private String ip; @@ -62,7 +63,7 @@ public Log setTimestamp(String timestamp) { return this; } - /** Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ + /** Timestamp of the API request in ISO 8601 format. */ @javax.annotation.Nonnull public String getTimestamp() { return timestamp; @@ -73,7 +74,7 @@ public Log setMethod(String method) { return this; } - /** HTTP method of the performed request. */ + /** HTTP method of the request. */ @javax.annotation.Nonnull public String getMethod() { return method; @@ -84,7 +85,7 @@ public Log setAnswerCode(String answerCode) { return this; } - /** HTTP response code. */ + /** HTTP status code of the response. */ @javax.annotation.Nonnull public String getAnswerCode() { return answerCode; @@ -95,7 +96,7 @@ public Log setQueryBody(String queryBody) { return this; } - /** Request body. Truncated after 1,000 characters. */ + /** Request body. */ @javax.annotation.Nonnull public String getQueryBody() { return queryBody; @@ -106,20 +107,20 @@ public Log setAnswer(String answer) { return this; } - /** Answer body. Truncated after 1,000 characters. */ + /** Response body. */ @javax.annotation.Nonnull public String getAnswer() { return answer; } - public Log setUrl(String url) { + public Log setUrl(URI url) { this.url = url; return this; } - /** Request URL. */ + /** URL of the API endpoint. */ @javax.annotation.Nonnull - public String getUrl() { + public URI getUrl() { return url; } @@ -139,7 +140,7 @@ public Log setQueryHeaders(String queryHeaders) { return this; } - /** Request headers (API key is obfuscated). */ + /** Request headers (API keys are obfuscated). */ @javax.annotation.Nonnull public String getQueryHeaders() { return queryHeaders; @@ -161,7 +162,7 @@ public Log setNbApiCalls(String nbApiCalls) { return this; } - /** Number of API calls. */ + /** Number of API requests. */ @javax.annotation.Nonnull public String getNbApiCalls() { return nbApiCalls; @@ -172,7 +173,9 @@ public Log setProcessingTimeMs(String processingTimeMs) { return this; } - /** Processing time for the query. Doesn't include network time. */ + /** + * Processing time for the query in milliseconds. This doesn't include latency due to the network. + */ @javax.annotation.Nonnull public String getProcessingTimeMs() { return processingTimeMs; @@ -205,7 +208,7 @@ public Log setQueryNbHits(String queryNbHits) { return this; } - /** Number of hits returned for the query. */ + /** Number of search results (hits) returned for the query. */ @javax.annotation.Nullable public String getQueryNbHits() { return queryNbHits; @@ -224,7 +227,7 @@ public Log addInnerQueries(LogQuery innerQueriesItem) { return this; } - /** Performed queries for the given request. */ + /** Queries performed for the given request. */ @javax.annotation.Nullable public List getInnerQueries() { return innerQueries; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/LogQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/LogQuery.java index b0fd0fb8bb..994d7f3800 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/LogQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/LogQuery.java @@ -35,7 +35,7 @@ public LogQuery setUserToken(String userToken) { return this; } - /** User identifier. */ + /** A user identifier. */ @javax.annotation.Nullable public String getUserToken() { return userToken; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MatchLevel.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MatchLevel.java index 3d8090c976..354a929249 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MatchLevel.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MatchLevel.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Indicates how well the attribute matched the search query. */ +/** Whether the whole query string matches or only a part. */ public enum MatchLevel { NONE("none"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Mode.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Mode.java index e3b7e1a4ed..8fa3768a4d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Mode.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Mode.java @@ -6,7 +6,10 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Search mode the index will use to query for results. */ +/** + * Search mode the index will use to query for results. This setting only applies to indices, for + * which Algolia enabled NeuralSearch for you. + */ public enum Mode { NEURAL_SEARCH("neuralSearch"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MultipleBatchResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MultipleBatchResponse.java index fed330f12b..db22a04cc6 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MultipleBatchResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/MultipleBatchResponse.java @@ -30,7 +30,7 @@ public MultipleBatchResponse putTaskID(String key, Long taskIDItem) { return this; } - /** TaskIDs per index. */ + /** Task IDs. One for each index. */ @javax.annotation.Nonnull public Map getTaskID() { return taskID; @@ -46,7 +46,7 @@ public MultipleBatchResponse addObjectIDs(String objectIDsItem) { return this; } - /** Unique object (record) identifiers. */ + /** Unique record identifiers. */ @javax.annotation.Nonnull public List getObjectIDs() { return objectIDs; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/NumericFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/NumericFilters.java index c44f978760..0700c35f3d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/NumericFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/NumericFilters.java @@ -14,8 +14,11 @@ import java.util.logging.Logger; /** - * [Filter on numeric - * attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types + * and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, + * `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: + * `facet: TO `. The range includes the lower and upper boundaries. The same + * combination rules apply as for `facetFilters`. */ @JsonDeserialize(using = NumericFilters.Deserializer.class) public interface NumericFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationIndexParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationIndexParams.java index c0adcc7265..24c50fecac 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationIndexParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationIndexParams.java @@ -37,7 +37,7 @@ public OperationIndexParams setDestination(String destination) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getDestination() { return destination; @@ -57,9 +57,9 @@ public OperationIndexParams addScope(ScopeType scopeItem) { } /** - * **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all - * records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are - * copied. + * **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and + * the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: + * records, settings, synonyms, and rules. */ @javax.annotation.Nullable public List getScope() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationType.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationType.java index a8bdacf2f2..0db3aab215 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationType.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OperationType.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Operation to perform (_move_ or _copy_). */ +/** Operation to perform on the index. */ public enum OperationType { MOVE("move"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OptionalFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OptionalFilters.java index aca731f5c1..275f36f09a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OptionalFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/OptionalFilters.java @@ -14,10 +14,12 @@ import java.util.logging.Logger; /** - * Create filters to boost or demote records. Records that match the filter are ranked higher for - * positive and lower for negative optional filters. In contrast to regular filters, records that - * don't match the optional filter are still included in the results, only their ranking is - * affected. + * Filters to promote or demote records in the search results. Optional filters work like facet + * filters, but they don't exclude records from the search results. Records that match the optional + * filter rank before records that don't match. If you're using a negative filter `facet:-value`, + * matching records rank after records that don't match. - Optional filters don't work on virtual + * replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't + * work with numeric attributes. */ @JsonDeserialize(using = OptionalFilters.Deserializer.class) public interface OptionalFilters { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Params.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Params.java index b7dd70f57d..931a83a6b7 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Params.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Params.java @@ -7,7 +7,10 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** Additional search parameters. */ +/** + * Parameters to apply to this search. You can use all search parameters, plus special + * `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. + */ public class Params { @JsonProperty("query") diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectID.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectID.java index b9e9d86405..9960869a96 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectID.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectID.java @@ -22,7 +22,7 @@ public PromoteObjectID setObjectID(String objectID) { return this; } - /** Unique identifier of the record to promote. */ + /** Unique record identifier. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -33,11 +33,7 @@ public PromoteObjectID setPosition(Integer position) { return this; } - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - */ + /** Position in the search results where you want to show the promoted records. */ @javax.annotation.Nonnull public Integer getPosition() { return position; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectIDs.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectIDs.java index 220f357a10..6e905348e0 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectIDs.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/PromoteObjectIDs.java @@ -29,7 +29,11 @@ public PromoteObjectIDs addObjectIDs(String objectIDsItem) { return this; } - /** Unique identifiers of the records to promote. */ + /** + * Object IDs of the records you want to promote. The records are placed as a group at the + * `position`. For example, if you want to promote four records to position `0`, they will be the + * first four search results. + */ @javax.annotation.Nonnull public List getObjectIDs() { return objectIDs; @@ -40,11 +44,7 @@ public PromoteObjectIDs setPosition(Integer position) { return this; } - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - */ + /** Position in the search results where you want to show the promoted records. */ @javax.annotation.Nonnull public Integer getPosition() { return position; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/QueryType.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/QueryType.java index 7b3b5a7b44..6409330cd2 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/QueryType.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/QueryType.java @@ -7,8 +7,11 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * Determines how query words are [interpreted as - * prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * Determines if and how query words are interpreted as prefixes. By default, only the last query + * word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid + * `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive + * results and makes your search slower. For more information, see [Prefix + * searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ public enum QueryType { PREFIX_LAST("prefixLast"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RankingInfo.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RankingInfo.java index 4fb945a8cf..1a9d6606b7 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RankingInfo.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RankingInfo.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** RankingInfo */ +/** Object with detailed information about the record's ranking. */ public class RankingInfo { @JsonProperty("filters") @@ -54,7 +54,7 @@ public RankingInfo setFilters(Integer filters) { return this; } - /** This field is reserved for advanced usage. */ + /** Whether a filter matched the query. minimum: 0 */ @javax.annotation.Nonnull public Integer getFilters() { return filters; @@ -65,7 +65,7 @@ public RankingInfo setFirstMatchedWord(Integer firstMatchedWord) { return this; } - /** Position of the most important matched attribute in the attributes to index list. */ + /** Position of the first matched word in the best matching attribute of the record. minimum: 0 */ @javax.annotation.Nonnull public Integer getFirstMatchedWord() { return firstMatchedWord; @@ -78,7 +78,7 @@ public RankingInfo setGeoDistance(Integer geoDistance) { /** * Distance between the geo location in the search query and the best matching geo location in the - * record, divided by the geo precision (in meters). + * record, divided by the geo precision (in meters). minimum: 0 */ @javax.annotation.Nonnull public Integer getGeoDistance() { @@ -90,7 +90,7 @@ public RankingInfo setGeoPrecision(Integer geoPrecision) { return this; } - /** Precision used when computing the geo distance, in meters. */ + /** Precision used when computing the geo distance, in meters. minimum: 1 */ @javax.annotation.Nullable public Integer getGeoPrecision() { return geoPrecision; @@ -123,7 +123,7 @@ public RankingInfo setNbExactWords(Integer nbExactWords) { return this; } - /** Number of exactly matched words. */ + /** Number of exactly matched words. minimum: 0 */ @javax.annotation.Nonnull public Integer getNbExactWords() { return nbExactWords; @@ -134,7 +134,7 @@ public RankingInfo setNbTypos(Integer nbTypos) { return this; } - /** Number of typos encountered when matching the record. */ + /** Number of typos encountered when matching the record. minimum: 0 */ @javax.annotation.Nonnull public Integer getNbTypos() { return nbTypos; @@ -145,7 +145,7 @@ public RankingInfo setPromoted(Boolean promoted) { return this; } - /** Present and set to true if a Rule promoted the hit. */ + /** Whether the record was promoted by a rule. */ @javax.annotation.Nonnull public Boolean getPromoted() { return promoted; @@ -157,8 +157,8 @@ public RankingInfo setProximityDistance(Integer proximityDistance) { } /** - * When the query contains more than one word, the sum of the distances between matched words (in - * meters). + * Number of words between multiple matches in the query plus 1. For single word queries, + * `proximityDistance` is 0. minimum: 0 */ @javax.annotation.Nullable public Integer getProximityDistance() { @@ -170,7 +170,7 @@ public RankingInfo setUserScore(Integer userScore) { return this; } - /** Custom ranking for the object, expressed as a single integer value. */ + /** Overall ranking of the record, expressed as a single integer. This attribute is internal. */ @javax.annotation.Nonnull public Integer getUserScore() { return userScore; @@ -181,7 +181,7 @@ public RankingInfo setWords(Integer words) { return this; } - /** Number of matched words, including prefixes and typos. */ + /** Number of matched words. minimum: 1 */ @javax.annotation.Nonnull public Integer getWords() { return words; @@ -192,7 +192,7 @@ public RankingInfo setPromotedByReRanking(Boolean promotedByReRanking) { return this; } - /** Wether the record are promoted by the re-ranking strategy. */ + /** Whether the record is re-ranked. */ @javax.annotation.Nullable public Boolean getPromotedByReRanking() { return promotedByReRanking; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java index 7908f7096d..e76029648b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java @@ -14,8 +14,8 @@ import java.util.logging.Logger; /** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, - * only records that match these filters will be affected by Dynamic Re-Ranking. + * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to + * records that match these filters. */ @JsonDeserialize(using = ReRankingApplyFilter.Deserializer.class) public interface ReRankingApplyFilter { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveStopWords.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveStopWords.java index 27c9110137..8f92ed92c2 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveStopWords.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveStopWords.java @@ -14,14 +14,10 @@ import java.util.logging.Logger; /** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in - * conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words - * should be enabled. This list will override any values that you may have set in `queryLanguages`. - * _true_: enables the stop words feature, ensuring that stop words are removed from consideration - * in a search. The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words - * feature, allowing stop words to be taken into account in a search. + * Removes stop words from the search query. Stop words are common words like articles, + * conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, + * \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages + * used in your index. */ @JsonDeserialize(using = RemoveStopWords.Deserializer.class) public interface RemoveStopWords { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java index 87abc749fe..e0f6a6be5d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java @@ -7,9 +7,24 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * Strategy to [remove - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - * from the query when it doesn't match any hits. + * Strategy for removing words from the query when it doesn't return any results. This helps to + * avoid returning empty search results. + * + *
+ *
none + *
No words are removed when a query doesn't return results. + *
lastWords + *
Treat the last (then second to last, then third to last) word as optional, until there are + * results or at most 5 words have been removed. + *
firstWords + *
Treat the first (then second, then third) word as optional, until there are results or at + * most 5 words have been removed. + *
allOptional + *
Treat all words as optional. + *
+ * + * For more information, see [Remove words to improve + * results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ public enum RemoveWordsIfNoResults { NONE("none"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RenderingContent.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RenderingContent.java index c38ec08c55..3baa8ef1fc 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RenderingContent.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RenderingContent.java @@ -8,10 +8,8 @@ import java.util.Objects; /** - * Extra content for the search UI, for example, to control the [ordering and display of - * facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - * You can set a default value and dynamically override it with - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * Extra data that can be used in the search UI. You can use this to control aspects of your search + * UI, such as, the order of facet names and values without changing your frontend code. */ public class RenderingContent { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Rule.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Rule.java index 03da7eb4cf..3c53486cdc 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Rule.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Rule.java @@ -35,7 +35,7 @@ public Rule setObjectID(String objectID) { return this; } - /** Unique identifier for a rule object. */ + /** Unique identifier of a rule object. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -55,8 +55,9 @@ public Rule addConditions(Condition conditionsItem) { } /** - * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) - * required to activate a rule. You can use up to 25 conditions per rule. + * Conditions that trigger a rule. Some consequences require specific conditions or don't require + * any condition. For more information, see + * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). */ @javax.annotation.Nullable public List getConditions() { @@ -79,9 +80,7 @@ public Rule setDescription(String description) { return this; } - /** - * Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. - */ + /** Description of the rule's purpose to help you distinguish between different rules. */ @javax.annotation.Nullable public String getDescription() { return description; @@ -92,7 +91,7 @@ public Rule setEnabled(Boolean enabled) { return this; } - /** Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. */ + /** Whether the rule is active. */ @javax.annotation.Nullable public Boolean getEnabled() { return enabled; @@ -111,10 +110,7 @@ public Rule addValidity(TimeRange validityItem) { return this; } - /** - * If you specify a validity period, the rule _only_ applies only during that period. If - * specified, the array must not be empty. - */ + /** Time periods when the rule is active. */ @javax.annotation.Nullable public List getValidity() { return validity; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveObjectResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveObjectResponse.java index 38c41aab8d..5b10fca4a9 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveObjectResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveObjectResponse.java @@ -24,7 +24,7 @@ public SaveObjectResponse setCreatedAt(String createdAt) { return this; } - /** Date of creation (ISO-8601 format). */ + /** Timestamp when the record was added, in ISO 8601 format. */ @javax.annotation.Nonnull public String getCreatedAt() { return createdAt; @@ -37,8 +37,8 @@ public SaveObjectResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { @@ -50,7 +50,7 @@ public SaveObjectResponse setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nullable public String getObjectID() { return objectID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveSynonymResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveSynonymResponse.java index 1919877c4f..34bf6add1f 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveSynonymResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SaveSynonymResponse.java @@ -26,8 +26,8 @@ public SaveSynonymResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java index 6f1d11deba..5f45c551fe 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** `searchDictionaryEntries` parameters. */ +/** Search parameter. */ public class SearchDictionaryEntriesParams { @JsonProperty("query") @@ -27,7 +27,7 @@ public SearchDictionaryEntriesParams setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nonnull public String getQuery() { return query; @@ -38,7 +38,7 @@ public SearchDictionaryEntriesParams setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -61,8 +61,8 @@ public SearchDictionaryEntriesParams setLanguage(String language) { } /** - * [Supported language ISO - * code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * ISO code of a [supported + * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ @javax.annotation.Nullable public String getLanguage() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesResponse.java new file mode 100644 index 0000000000..85041bb374 --- /dev/null +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchDictionaryEntriesResponse.java @@ -0,0 +1,119 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost +// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +package com.algolia.model.search; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** SearchDictionaryEntriesResponse */ +public class SearchDictionaryEntriesResponse { + + @JsonProperty("hits") + private List hits = new ArrayList<>(); + + @JsonProperty("page") + private Integer page; + + @JsonProperty("nbHits") + private Integer nbHits; + + @JsonProperty("nbPages") + private Integer nbPages; + + public SearchDictionaryEntriesResponse setHits(List hits) { + this.hits = hits; + return this; + } + + public SearchDictionaryEntriesResponse addHits(DictionaryEntry hitsItem) { + this.hits.add(hitsItem); + return this; + } + + /** Dictionary entries matching the search criteria. */ + @javax.annotation.Nonnull + public List getHits() { + return hits; + } + + public SearchDictionaryEntriesResponse setPage(Integer page) { + this.page = page; + return this; + } + + /** Requested page of the API response. minimum: 0 */ + @javax.annotation.Nonnull + public Integer getPage() { + return page; + } + + public SearchDictionaryEntriesResponse setNbHits(Integer nbHits) { + this.nbHits = nbHits; + return this; + } + + /** Number of results (hits). */ + @javax.annotation.Nonnull + public Integer getNbHits() { + return nbHits; + } + + public SearchDictionaryEntriesResponse setNbPages(Integer nbPages) { + this.nbPages = nbPages; + return this; + } + + /** Number of pages of results. */ + @javax.annotation.Nonnull + public Integer getNbPages() { + return nbPages; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchDictionaryEntriesResponse searchDictionaryEntriesResponse = (SearchDictionaryEntriesResponse) o; + return ( + Objects.equals(this.hits, searchDictionaryEntriesResponse.hits) && + Objects.equals(this.page, searchDictionaryEntriesResponse.page) && + Objects.equals(this.nbHits, searchDictionaryEntriesResponse.nbHits) && + Objects.equals(this.nbPages, searchDictionaryEntriesResponse.nbPages) + ); + } + + @Override + public int hashCode() { + return Objects.hash(hits, page, nbHits, nbPages); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchDictionaryEntriesResponse {\n"); + sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); + sb.append(" nbPages: ").append(toIndentedString(nbPages)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java index e5874ad337..5275b62d07 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java @@ -47,7 +47,7 @@ public SearchForFacetValuesRequest setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java index becb56bdef..678cc71538 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java @@ -32,7 +32,7 @@ public SearchForFacetValuesResponse addFacetHits(FacetHits facetHitsItem) { return this; } - /** Get facetHits */ + /** Matching facet values. */ @javax.annotation.Nonnull public List getFacetHits() { return facetHits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java index 5c2a4c09d2..b71c82379f 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java @@ -94,9 +94,6 @@ public class SearchForFacets implements SearchQuery { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -115,9 +112,6 @@ public class SearchForFacets implements SearchQuery { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -278,7 +272,7 @@ public SearchForFacets setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -289,7 +283,14 @@ public SearchForFacets setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -301,8 +302,21 @@ public SearchForFacets setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -359,9 +373,9 @@ public SearchForFacets setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -381,10 +395,7 @@ public SearchForFacets addRestrictSearchableAttributes(String restrictSearchable return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -404,9 +415,10 @@ public SearchForFacets addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -419,11 +431,11 @@ public SearchForFacets setFacetingAfterDistinct(Boolean facetingAfterDistinct) { } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -435,7 +447,7 @@ public SearchForFacets setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -446,13 +458,7 @@ public SearchForFacets setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -463,14 +469,7 @@ public SearchForFacets setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -482,9 +481,10 @@ public SearchForFacets setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -496,10 +496,7 @@ public SearchForFacets setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -533,7 +530,7 @@ public SearchForFacets setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -555,9 +552,11 @@ public SearchForFacets addInsideBoundingBox(List insideBoundingBoxItem) } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -578,9 +577,11 @@ public SearchForFacets addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -601,10 +602,10 @@ public SearchForFacets addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -625,9 +626,9 @@ public SearchForFacets addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -640,8 +641,11 @@ public SearchForFacets setPersonalizationImpact(Integer personalizationImpact) { } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -654,9 +658,9 @@ public SearchForFacets setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -668,40 +672,18 @@ public SearchForFacets setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public SearchForFacets setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchForFacets addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public SearchForFacets setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -713,9 +695,9 @@ public SearchForFacets setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -727,10 +709,7 @@ public SearchForFacets setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -763,7 +742,7 @@ public SearchForFacets setPercentileComputation(Boolean percentileComputation) { return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -774,37 +753,12 @@ public SearchForFacets setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public SearchForFacets setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchForFacets addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public SearchForFacets setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -820,7 +774,10 @@ public SearchForFacets addAttributesToRetrieve(String attributesToRetrieveItem) /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -841,8 +798,23 @@ public SearchForFacets addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -863,9 +835,22 @@ public SearchForFacets addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -877,7 +862,12 @@ public SearchForFacets setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -897,8 +887,12 @@ public SearchForFacets addAttributesToHighlight(String attributesToHighlightItem } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -919,9 +913,10 @@ public SearchForFacets addAttributesToSnippet(String attributesToSnippetItem) { } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -933,7 +928,7 @@ public SearchForFacets setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -944,7 +939,7 @@ public SearchForFacets setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -966,7 +961,10 @@ public SearchForFacets setRestrictHighlightAndSnippetArrays(Boolean restrictHigh return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -989,7 +987,7 @@ public SearchForFacets setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -1004,7 +1002,7 @@ public SearchForFacets setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -1029,7 +1027,10 @@ public SearchForFacets setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericT return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1051,6 +1052,12 @@ public SearchForFacets addDisableTypoToleranceOnAttributes(String disableTypoTol /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1085,8 +1092,9 @@ public SearchForFacets setKeepDiacriticsOnCharacters(String keepDiacriticsOnChar } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1107,10 +1115,18 @@ public SearchForFacets addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1123,9 +1139,10 @@ public SearchForFacets setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1137,10 +1154,7 @@ public SearchForFacets setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1151,11 +1165,7 @@ public SearchForFacets setEnablePersonalization(Boolean enablePersonalization) { return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1211,8 +1221,8 @@ public SearchForFacets setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1233,9 +1243,21 @@ public SearchForFacets addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1256,8 +1278,12 @@ public SearchForFacets addDisableExactOnAttributes(String disableExactOnAttribut } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1289,8 +1315,20 @@ public SearchForFacets addAlternativesAsExact(AlternativesAsExact alternativesAs } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1311,8 +1349,18 @@ public SearchForFacets addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advanced } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1336,8 +1384,12 @@ public SearchForFacets setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHi } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1350,9 +1402,11 @@ public SearchForFacets setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1372,7 +1426,13 @@ public SearchForFacets addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1384,7 +1444,7 @@ public SearchForFacets setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1398,7 +1458,7 @@ public SearchForFacets setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1409,7 +1469,21 @@ public SearchForFacets setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1421,10 +1495,11 @@ public SearchForFacets setAttributeCriteriaComputedByMinProximity(Boolean attrib } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1448,8 +1523,9 @@ public SearchForFacets setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1483,7 +1559,7 @@ public SearchForFacets setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; @@ -1548,14 +1624,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, searchForFacets.personalizationImpact) && Objects.equals(this.userToken, searchForFacets.userToken) && Objects.equals(this.getRankingInfo, searchForFacets.getRankingInfo) && - Objects.equals(this.explain, searchForFacets.explain) && Objects.equals(this.synonyms, searchForFacets.synonyms) && Objects.equals(this.clickAnalytics, searchForFacets.clickAnalytics) && Objects.equals(this.analytics, searchForFacets.analytics) && Objects.equals(this.analyticsTags, searchForFacets.analyticsTags) && Objects.equals(this.percentileComputation, searchForFacets.percentileComputation) && Objects.equals(this.enableABTest, searchForFacets.enableABTest) && - Objects.equals(this.attributesForFaceting, searchForFacets.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, searchForFacets.attributesToRetrieve) && Objects.equals(this.ranking, searchForFacets.ranking) && Objects.equals(this.customRanking, searchForFacets.customRanking) && @@ -1637,14 +1711,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1727,14 +1799,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java index 1b67f7918d..49caf65634 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java @@ -41,7 +41,7 @@ public SearchForFacetsOptions setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; @@ -64,7 +64,7 @@ public SearchForFacetsOptions setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java index def01a72fb..f1691e727a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java @@ -94,9 +94,6 @@ public class SearchForHits implements SearchQuery { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -115,9 +112,6 @@ public class SearchForHits implements SearchQuery { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -272,7 +266,7 @@ public SearchForHits setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -283,7 +277,14 @@ public SearchForHits setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -295,8 +296,21 @@ public SearchForHits setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -353,9 +367,9 @@ public SearchForHits setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -375,10 +389,7 @@ public SearchForHits addRestrictSearchableAttributes(String restrictSearchableAt return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -398,9 +409,10 @@ public SearchForHits addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -413,11 +425,11 @@ public SearchForHits setFacetingAfterDistinct(Boolean facetingAfterDistinct) { } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -429,7 +441,7 @@ public SearchForHits setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -440,13 +452,7 @@ public SearchForHits setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -457,14 +463,7 @@ public SearchForHits setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -476,9 +475,10 @@ public SearchForHits setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -490,10 +490,7 @@ public SearchForHits setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -527,7 +524,7 @@ public SearchForHits setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -549,9 +546,11 @@ public SearchForHits addInsideBoundingBox(List insideBoundingBoxItem) { } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -572,9 +571,11 @@ public SearchForHits addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -595,10 +596,10 @@ public SearchForHits addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -619,9 +620,9 @@ public SearchForHits addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -634,8 +635,11 @@ public SearchForHits setPersonalizationImpact(Integer personalizationImpact) { } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -648,9 +652,9 @@ public SearchForHits setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -662,40 +666,18 @@ public SearchForHits setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public SearchForHits setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchForHits addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public SearchForHits setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -707,9 +689,9 @@ public SearchForHits setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -721,10 +703,7 @@ public SearchForHits setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -757,7 +736,7 @@ public SearchForHits setPercentileComputation(Boolean percentileComputation) { return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -768,37 +747,12 @@ public SearchForHits setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public SearchForHits setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchForHits addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public SearchForHits setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -814,7 +768,10 @@ public SearchForHits addAttributesToRetrieve(String attributesToRetrieveItem) { /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -835,8 +792,23 @@ public SearchForHits addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -857,9 +829,22 @@ public SearchForHits addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -871,7 +856,12 @@ public SearchForHits setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -891,8 +881,12 @@ public SearchForHits addAttributesToHighlight(String attributesToHighlightItem) } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -913,9 +907,10 @@ public SearchForHits addAttributesToSnippet(String attributesToSnippetItem) { } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -927,7 +922,7 @@ public SearchForHits setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -938,7 +933,7 @@ public SearchForHits setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -960,7 +955,10 @@ public SearchForHits setRestrictHighlightAndSnippetArrays(Boolean restrictHighli return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -983,7 +981,7 @@ public SearchForHits setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -998,7 +996,7 @@ public SearchForHits setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -1023,7 +1021,10 @@ public SearchForHits setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTok return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1045,6 +1046,12 @@ public SearchForHits addDisableTypoToleranceOnAttributes(String disableTypoToler /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1079,8 +1086,9 @@ public SearchForHits setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharac } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1101,10 +1109,18 @@ public SearchForHits addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1117,9 +1133,10 @@ public SearchForHits setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1131,10 +1148,7 @@ public SearchForHits setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1145,11 +1159,7 @@ public SearchForHits setEnablePersonalization(Boolean enablePersonalization) { return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1205,8 +1215,8 @@ public SearchForHits setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1227,9 +1237,21 @@ public SearchForHits addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1250,8 +1272,12 @@ public SearchForHits addDisableExactOnAttributes(String disableExactOnAttributes } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1283,8 +1309,20 @@ public SearchForHits addAlternativesAsExact(AlternativesAsExact alternativesAsEx } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1305,8 +1343,18 @@ public SearchForHits addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSy } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1330,8 +1378,12 @@ public SearchForHits setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHigh } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1344,9 +1396,11 @@ public SearchForHits setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1366,7 +1420,13 @@ public SearchForHits addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1378,7 +1438,7 @@ public SearchForHits setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1392,7 +1452,7 @@ public SearchForHits setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1403,7 +1463,21 @@ public SearchForHits setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1415,10 +1489,11 @@ public SearchForHits setAttributeCriteriaComputedByMinProximity(Boolean attribut } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1442,8 +1517,9 @@ public SearchForHits setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1466,7 +1542,7 @@ public SearchForHits setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; @@ -1520,14 +1596,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, searchForHits.personalizationImpact) && Objects.equals(this.userToken, searchForHits.userToken) && Objects.equals(this.getRankingInfo, searchForHits.getRankingInfo) && - Objects.equals(this.explain, searchForHits.explain) && Objects.equals(this.synonyms, searchForHits.synonyms) && Objects.equals(this.clickAnalytics, searchForHits.clickAnalytics) && Objects.equals(this.analytics, searchForHits.analytics) && Objects.equals(this.analyticsTags, searchForHits.analyticsTags) && Objects.equals(this.percentileComputation, searchForHits.percentileComputation) && Objects.equals(this.enableABTest, searchForHits.enableABTest) && - Objects.equals(this.attributesForFaceting, searchForHits.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, searchForHits.attributesToRetrieve) && Objects.equals(this.ranking, searchForHits.ranking) && Objects.equals(this.customRanking, searchForHits.customRanking) && @@ -1607,14 +1681,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1695,14 +1767,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHitsOptions.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHitsOptions.java index 1f5a94a7a1..41b090b8da 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHitsOptions.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHitsOptions.java @@ -21,7 +21,7 @@ public SearchForHitsOptions setIndexName(String indexName) { return this; } - /** Algolia index name. */ + /** Index name. */ @javax.annotation.Nonnull public String getIndexName() { return indexName; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchHits.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchHits.java index 3ddaaae521..e07181f44d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchHits.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchHits.java @@ -46,7 +46,10 @@ public SearchHits addHits(T hitsItem) { return this; } - /** Get hits */ + /** + * Search results (hits). Hits are records from your index that match the search criteria, + * augmented with additional attributes, such as, for highlighting. + */ @javax.annotation.Nonnull public List getHits() { return hits; @@ -57,7 +60,7 @@ public SearchHits setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nonnull public String getQuery() { return query; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java index df55f67553..78eaba05ad 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java @@ -91,9 +91,6 @@ public class SearchParamsObject implements SearchParams { @JsonProperty("getRankingInfo") private Boolean getRankingInfo; - @JsonProperty("explain") - private List explain; - @JsonProperty("synonyms") private Boolean synonyms; @@ -112,9 +109,6 @@ public class SearchParamsObject implements SearchParams { @JsonProperty("enableABTest") private Boolean enableABTest; - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -252,7 +246,7 @@ public SearchParamsObject setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -263,7 +257,14 @@ public SearchParamsObject setSimilarQuery(String similarQuery) { return this; } - /** Overrides the query parameter and performs a more generic search. */ + /** + * Keywords to be used instead of the search query to conduct a more broader search. Using the + * `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - + * `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All + * remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a + * broad search, they usually return many results. Combine it with `filters` to narrow down the + * list of results. + */ @javax.annotation.Nullable public String getSimilarQuery() { return similarQuery; @@ -275,8 +276,21 @@ public SearchParamsObject setFilters(String filters) { } /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These + * filters are supported: - **Numeric filters.** ` `, where `` is one of + * `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and + * `` are the lower and upper limits of the range (inclusive). - **Facet filters.** + * `:` where `` is a facet attribute (case-sensitive) and `` a facet + * value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` + * operators with the following restrictions: - You can only combine filters of the same type with + * `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of + * filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions + * (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes + * around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, + * `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at + * least one element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @javax.annotation.Nullable public String getFilters() { @@ -333,9 +347,9 @@ public SearchParamsObject setSumOrFiltersScores(Boolean sumOrFiltersScores) { } /** - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum + * filter score is kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. */ @javax.annotation.Nullable public Boolean getSumOrFiltersScores() { @@ -355,10 +369,7 @@ public SearchParamsObject addRestrictSearchableAttributes(String restrictSearcha return this; } - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - */ + /** Restricts a search to a subset of your searchable attributes. */ @javax.annotation.Nullable public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; @@ -378,9 +389,10 @@ public SearchParamsObject addFacets(String facetsItem) { } /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of + * matching facet values. To retrieve all facets, use the wildcard character `*`. For more + * information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @javax.annotation.Nullable public List getFacets() { @@ -393,11 +405,11 @@ public SearchParamsObject setFacetingAfterDistinct(Boolean facetingAfterDistinct } /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate + * facet counts when using faceting in combination with `distinct`. It's usually better to use + * `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` + * only computes correct facet counts if all records have the same facet values for the + * `attributeForDistinct`. */ @javax.annotation.Nullable public Boolean getFacetingAfterDistinct() { @@ -409,7 +421,7 @@ public SearchParamsObject setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -420,13 +432,7 @@ public SearchParamsObject setOffset(Integer offset) { return this; } - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - */ + /** Position of the first hit to retrieve. */ @javax.annotation.Nullable public Integer getOffset() { return offset; @@ -437,14 +443,7 @@ public SearchParamsObject setLength(Integer length) { return this; } - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - */ + /** Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 */ @javax.annotation.Nullable public Integer getLength() { return length; @@ -456,9 +455,10 @@ public SearchParamsObject setAroundLatLng(String aroundLatLng) { } /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and + * longitude. Only records included within circle around this central location are included in the + * results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` + * settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @javax.annotation.Nullable public String getAroundLatLng() { @@ -470,10 +470,7 @@ public SearchParamsObject setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { return this; } - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - */ + /** Whether to obtain the coordinates from the request's IP address. */ @javax.annotation.Nullable public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -507,7 +504,7 @@ public SearchParamsObject setMinimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * minimum: 1 */ @javax.annotation.Nullable @@ -529,9 +526,11 @@ public SearchParamsObject addInsideBoundingBox(List insideBoundingBoxIte } /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two + * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 + * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more + * information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @javax.annotation.Nullable public List> getInsideBoundingBox() { @@ -552,9 +551,11 @@ public SearchParamsObject addInsidePolygon(List insidePolygonItem) { } /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each + * point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. + * For more information, see [filtering inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ @javax.annotation.Nullable public List> getInsidePolygon() { @@ -575,10 +576,10 @@ public SearchParamsObject addNaturalLanguages(String naturalLanguagesItem) { } /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries + * (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of + * provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a + * `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @javax.annotation.Nullable public List getNaturalLanguages() { @@ -599,9 +600,9 @@ public SearchParamsObject addRuleContexts(String ruleContextsItem) { } /** - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. */ @javax.annotation.Nullable public List getRuleContexts() { @@ -614,8 +615,11 @@ public SearchParamsObject setPersonalizationImpact(Integer personalizationImpact } /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more + * Personalization determines the ranking compared to other factors. For more information, see + * [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * minimum: 0 maximum: 100 */ @javax.annotation.Nullable public Integer getPersonalizationImpact() { @@ -628,9 +632,9 @@ public SearchParamsObject setUserToken(String userToken) { } /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and + * conversion events. For more information, see [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @javax.annotation.Nullable public String getUserToken() { @@ -642,40 +646,18 @@ public SearchParamsObject setGetRankingInfo(Boolean getRankingInfo) { return this; } - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - */ + /** Whether the search response should include detailed ranking information. */ @javax.annotation.Nullable public Boolean getGetRankingInfo() { return getRankingInfo; } - public SearchParamsObject setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchParamsObject addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** Enriches the API's response with information about how the query was processed. */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - public SearchParamsObject setSynonyms(Boolean synonyms) { this.synonyms = synonyms; return this; } - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @javax.annotation.Nullable public Boolean getSynonyms() { return synonyms; @@ -687,9 +669,9 @@ public SearchParamsObject setClickAnalytics(Boolean clickAnalytics) { } /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier + * for a search query and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). */ @javax.annotation.Nullable public Boolean getClickAnalytics() { @@ -701,10 +683,7 @@ public SearchParamsObject setAnalytics(Boolean analytics) { return this; } - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - */ + /** Whether this search will be included in Analytics. */ @javax.annotation.Nullable public Boolean getAnalytics() { return analytics; @@ -737,7 +716,7 @@ public SearchParamsObject setPercentileComputation(Boolean percentileComputation return this; } - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @javax.annotation.Nullable public Boolean getPercentileComputation() { return percentileComputation; @@ -748,37 +727,12 @@ public SearchParamsObject setEnableABTest(Boolean enableABTest) { return this; } - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @javax.annotation.Nullable public Boolean getEnableABTest() { return enableABTest; } - public SearchParamsObject setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchParamsObject addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - public SearchParamsObject setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -794,7 +748,10 @@ public SearchParamsObject addAttributesToRetrieve(String attributesToRetrieveIte /** * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. + * retrieve only some of the attributes. - `*` retrieves all attributes, except attributes + * included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all + * attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: + * `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @javax.annotation.Nullable public List getAttributesToRetrieve() { @@ -815,8 +772,23 @@ public SearchParamsObject addRanking(String rankingItem) { } /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds + * to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * The tie-breaking algorithm sequentially applies each criterion in the order they're specified. + * If you configure a replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @javax.annotation.Nullable public List getRanking() { @@ -837,9 +809,22 @@ public SearchParamsObject addCustomRanking(String customRankingItem) { } /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The + * custom ranking attributes decide which items are shown first if the other ranking criteria are + * equal. Records with missing values for your selected custom ranking attributes are always + * sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** + * + *
+ *
asc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in ascending order. + *
desc(\"ATTRIBUTE\") + *
Sort the index by the values of an attribute, in descending order. + *
+ * + * If you use two or more custom ranking attributes, [reduce the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. */ @javax.annotation.Nullable public List getCustomRanking() { @@ -851,7 +836,12 @@ public SearchParamsObject setRelevancyStrictness(Integer relevancyStrictness) { return this; } - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** + * Relevancy threshold below which less relevant results aren't included in the results. You can + * only set `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. + */ @javax.annotation.Nullable public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -871,8 +861,12 @@ public SearchParamsObject addAttributesToHighlight(String attributesToHighlightI } /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to + * highlight all attributes or use an empty array `[]` to turn off highlighting. With + * highlighting, strings that match the search query are surrounded by HTML tags defined by + * `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts + * of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @javax.annotation.Nullable public List getAttributesToHighlight() { @@ -893,9 +887,10 @@ public SearchParamsObject addAttributesToSnippet(String attributesToSnippetItem) } /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. + * If you enable snippets, they include 10 words, including the matched word. The matched word + * will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the + * following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @javax.annotation.Nullable public List getAttributesToSnippet() { @@ -907,7 +902,7 @@ public SearchParamsObject setHighlightPreTag(String highlightPreTag) { return this; } - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPreTag() { return highlightPreTag; @@ -918,7 +913,7 @@ public SearchParamsObject setHighlightPostTag(String highlightPostTag) { return this; } - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @javax.annotation.Nullable public String getHighlightPostTag() { return highlightPostTag; @@ -940,7 +935,10 @@ public SearchParamsObject setRestrictHighlightAndSnippetArrays(Boolean restrictH return this; } - /** Restrict highlighting and snippeting to items that matched the query. */ + /** + * Whether to restrict highlighting and snippeting to items that at least partially matched the + * search query. By default, all items are highlighted and snippeted. + */ @javax.annotation.Nullable public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; @@ -963,7 +961,7 @@ public SearchParamsObject setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -978,7 +976,7 @@ public SearchParamsObject setMinWordSizefor2Typos(Integer minWordSizefor2Typos) } /** - * Minimum number of characters a word in the query string must contain to accept matches with + * Minimum number of characters a word in the search query must contain to accept matches with * [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @@ -1003,7 +1001,10 @@ public SearchParamsObject setAllowTyposOnNumericTokens(Boolean allowTyposOnNumer return this; } - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the + * number of irrelevant matches when searching in large sets of similar numbers. + */ @javax.annotation.Nullable public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; @@ -1025,6 +1026,12 @@ public SearchParamsObject addDisableTypoToleranceOnAttributes(String disableTypo /** * Attributes for which you want to turn off [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Returning only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * - Reducing the number of matches when you have too many. This can happen with attributes that + * are long blocks of text, such as product descriptions. Consider alternatives such as + * `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual + * spellings that might look like typos. */ @javax.annotation.Nullable public List getDisableTypoToleranceOnAttributes() { @@ -1059,8 +1066,9 @@ public SearchParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnC } /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics + * from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can + * specify characters that should keep their diacritics. */ @javax.annotation.Nullable public String getKeepDiacriticsOnCharacters() { @@ -1081,10 +1089,18 @@ public SearchParamsObject addQueryLanguages(String queryLanguagesItem) { } /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific + * settings such as plurals, stop words, and word-detection dictionaries. This setting sets a + * default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This + * setting also sets a dictionary for word detection in the logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always + * specify a query language.** If you don't specify an indexing language, the search engine uses + * all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This + * can lead to unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @javax.annotation.Nullable public List getQueryLanguages() { @@ -1097,9 +1113,10 @@ public SearchParamsObject setDecompoundQuery(Boolean decompoundQuery) { } /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and + * Norwegian. */ @javax.annotation.Nullable public Boolean getDecompoundQuery() { @@ -1111,10 +1128,7 @@ public SearchParamsObject setEnableRules(Boolean enableRules) { return this; } - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - */ + /** Whether to enable rules. */ @javax.annotation.Nullable public Boolean getEnableRules() { return enableRules; @@ -1125,11 +1139,7 @@ public SearchParamsObject setEnablePersonalization(Boolean enablePersonalization return this; } - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - */ + /** Whether to enable Personalization. */ @javax.annotation.Nullable public Boolean getEnablePersonalization() { return enablePersonalization; @@ -1185,8 +1195,8 @@ public SearchParamsObject setAdvancedSyntax(Boolean advancedSyntax) { } /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the + * `advancedSyntaxFeatures` parameter to control which feature is supported. */ @javax.annotation.Nullable public Boolean getAdvancedSyntax() { @@ -1207,9 +1217,21 @@ public SearchParamsObject addOptionalWords(String optionalWordsItem) { } /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must + * match all words in the search query to be included in the search results. Adding optional words + * can help to increase the number of search results by running an additional search query that + * doesn't include the optional words. For example, if the search query is \"action video\" and + * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and + * one for \"action\". Records that match all words are ranked higher. For a search query with 4 + * or more words **and** all its words are optional, the number of matched words required for a + * record to be included in the search results increases for every 1,000 records: - If + * `optionalWords` has less than 10 words, the required number of matched words increases by 1: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If + * `optionalWords` has 10 or more words, the number of required matched words increases by the + * number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more + * information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @javax.annotation.Nullable public List getOptionalWords() { @@ -1230,8 +1252,12 @@ public SearchParamsObject addDisableExactOnAttributes(String disableExactOnAttri } /** - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is + * high, such as product descriptions. Turning off the Exact ranking criterion for these + * attributes favors exact matching on other attributes. This reduces the impact of individual + * attributes with a lot of content on ranking. */ @javax.annotation.Nullable public List getDisableExactOnAttributes() { @@ -1263,8 +1289,20 @@ public SearchParamsObject addAlternativesAsExact(AlternativesAsExact alternative } /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking + * criterion. + * + *
+ *
ignorePlurals + *
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact + * matches. + *
singleWordSynonym + *
Single-word synonyms, such as \"NY/NYC\" are considered exact matches. + *
multiWordsSynonym + *
Multi-word synonyms, such as \"NY/New York\" are considered exact matches. + *
+ * + * . */ @javax.annotation.Nullable public List getAlternativesAsExact() { @@ -1285,8 +1323,18 @@ public SearchParamsObject addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advan } /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. + * Advanced search syntax features you want to support. + * + *
+ *
exactPhrase + *
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only + * returns records with the exact string \"iPhone case\". + *
excludeWords + *
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` + * matches records that contain \"search\" but not \"engine\". + *
+ * + * This setting only has an effect if `advancedSyntax` is true. */ @javax.annotation.Nullable public List getAdvancedSyntaxFeatures() { @@ -1310,8 +1358,12 @@ public SearchParamsObject setReplaceSynonymsInHighlight(Boolean replaceSynonymsI } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words + * are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` + * and a search for `home`, records matching either \"home\" or \"house\" are included in the + * search results, and either \"home\" or \"house\" are highlighted. With + * `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @javax.annotation.Nullable public Boolean getReplaceSynonymsInHighlight() { @@ -1324,9 +1376,11 @@ public SearchParamsObject setMinProximity(Integer minProximity) { } /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, + * neighboring matches and matches with one word between them would have the same score. minimum: + * 1 maximum: 7 */ @javax.annotation.Nullable public Integer getMinProximity() { @@ -1346,7 +1400,13 @@ public SearchParamsObject addResponseFields(String responseFieldsItem) { return this; } - /** Attributes to include in the API response for search and browse queries. */ + /** + * Properties to include in the API response of `search` and `browse` requests. By default, all + * response properties are included. To reduce the response size, you can select, which attributes + * should be included. You can't exclude these properties: `message`, `warning`, `cursor`, + * `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the + * `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + */ @javax.annotation.Nullable public List getResponseFields() { return responseFields; @@ -1358,7 +1418,7 @@ public SearchParamsObject setMaxFacetHits(Integer maxFacetHits) { } /** - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * maximum: 100 */ @@ -1372,7 +1432,7 @@ public SearchParamsObject setMaxValuesPerFacet(Integer maxValuesPerFacet) { return this; } - /** Maximum number of facet values to return for each facet. */ + /** Maximum number of facet values to return for each facet. maximum: 1000 */ @javax.annotation.Nullable public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; @@ -1383,7 +1443,21 @@ public SearchParamsObject setSortFacetValuesBy(String sortFacetValuesBy) { return this; } - /** Controls how facet values are fetched. */ + /** + * Order in which to retrieve facet values. + * + *
+ *
count + *
Facet values are retrieved by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Retrieve facet values alphabetically. + *
+ * + * This setting doesn't influence how facet values are displayed in your UI (see + * `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + */ @javax.annotation.Nullable public String getSortFacetValuesBy() { return sortFacetValuesBy; @@ -1395,10 +1469,11 @@ public SearchParamsObject setAttributeCriteriaComputedByMinProximity(Boolean att } /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting + * only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` + * setting. If true, the best matching attribute is selected based on the minimum proximity of + * multiple matches. Otherwise, the best matching attribute is determined by the order in the + * `searchableAttributes` setting. */ @javax.annotation.Nullable public Boolean getAttributeCriteriaComputedByMinProximity() { @@ -1422,8 +1497,9 @@ public SearchParamsObject setEnableReRanking(Boolean enableReRanking) { } /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic + * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has + * an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @javax.annotation.Nullable public Boolean getEnableReRanking() { @@ -1477,14 +1553,12 @@ public boolean equals(Object o) { Objects.equals(this.personalizationImpact, searchParamsObject.personalizationImpact) && Objects.equals(this.userToken, searchParamsObject.userToken) && Objects.equals(this.getRankingInfo, searchParamsObject.getRankingInfo) && - Objects.equals(this.explain, searchParamsObject.explain) && Objects.equals(this.synonyms, searchParamsObject.synonyms) && Objects.equals(this.clickAnalytics, searchParamsObject.clickAnalytics) && Objects.equals(this.analytics, searchParamsObject.analytics) && Objects.equals(this.analyticsTags, searchParamsObject.analyticsTags) && Objects.equals(this.percentileComputation, searchParamsObject.percentileComputation) && Objects.equals(this.enableABTest, searchParamsObject.enableABTest) && - Objects.equals(this.attributesForFaceting, searchParamsObject.attributesForFaceting) && Objects.equals(this.attributesToRetrieve, searchParamsObject.attributesToRetrieve) && Objects.equals(this.ranking, searchParamsObject.ranking) && Objects.equals(this.customRanking, searchParamsObject.customRanking) && @@ -1561,14 +1635,12 @@ public int hashCode() { personalizationImpact, userToken, getRankingInfo, - explain, synonyms, clickAnalytics, analytics, analyticsTags, percentileComputation, enableABTest, - attributesForFaceting, attributesToRetrieve, ranking, customRanking, @@ -1646,14 +1718,12 @@ public String toString() { sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsQuery.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsQuery.java index c84b88b14f..cf281798d2 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsQuery.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsQuery.java @@ -18,7 +18,7 @@ public SearchParamsQuery setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchResponse.java index f80de67ea2..2a806caeda 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchResponse.java @@ -164,7 +164,7 @@ public SearchResponse setAutomaticRadius(String automaticRadius) { return this; } - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ @javax.annotation.Nullable public String getAutomaticRadius() { return automaticRadius; @@ -242,7 +242,7 @@ public SearchResponse putFacets(String key, Map facetsItem) return this; } - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ @javax.annotation.Nullable public Map> getFacets() { return facets; @@ -319,7 +319,7 @@ public SearchResponse setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; @@ -330,7 +330,7 @@ public SearchResponse setNbPages(Integer nbPages) { return this; } - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @javax.annotation.Nonnull public Integer getNbPages() { return nbPages; @@ -352,7 +352,7 @@ public SearchResponse setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nonnull public Integer getPage() { return page; @@ -460,7 +460,7 @@ public SearchResponse setUserData(Object userData) { return this; } - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @javax.annotation.Nullable public Object getUserData() { return userData; @@ -490,7 +490,10 @@ public SearchResponse addHits(T hitsItem) { return this; } - /** Get hits */ + /** + * Search results (hits). Hits are records from your index that match the search criteria, + * augmented with additional attributes, such as, for highlighting. + */ @javax.annotation.Nonnull public List getHits() { return hits; @@ -501,7 +504,7 @@ public SearchResponse setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nonnull public String getQuery() { return query; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesParams.java index 463443b607..7cbc0b543b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesParams.java @@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -import java.util.ArrayList; -import java.util.List; import java.util.Objects; /** Rules search parameters. */ @@ -30,15 +28,12 @@ public class SearchRulesParams { @JsonProperty("enabled") private Boolean enabled; - @JsonProperty("requestOptions") - private List requestOptions; - public SearchRulesParams setQuery(String query) { this.query = query; return this; } - /** Rule object query. */ + /** Search query for rules. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -60,10 +55,7 @@ public SearchRulesParams setContext(String context) { return this; } - /** - * Restricts responses to the specified [contextual - * rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). - */ + /** Only return rules that match the context (exact match). */ @javax.annotation.Nullable public String getContext() { return context; @@ -74,7 +66,7 @@ public SearchRulesParams setPage(Integer page) { return this; } - /** Requested page (the first page is page 0). minimum: 0 */ + /** Requested page of the API response. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; @@ -97,32 +89,14 @@ public SearchRulesParams setEnabled(Boolean enabled) { } /** - * Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + * If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ + * rules are returned. */ @javax.annotation.Nullable public Boolean getEnabled() { return enabled; } - public SearchRulesParams setRequestOptions(List requestOptions) { - this.requestOptions = requestOptions; - return this; - } - - public SearchRulesParams addRequestOptions(Object requestOptionsItem) { - if (this.requestOptions == null) { - this.requestOptions = new ArrayList<>(); - } - this.requestOptions.add(requestOptionsItem); - return this; - } - - /** Request options to send with the API call. */ - @javax.annotation.Nullable - public List getRequestOptions() { - return requestOptions; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,14 +112,13 @@ public boolean equals(Object o) { Objects.equals(this.context, searchRulesParams.context) && Objects.equals(this.page, searchRulesParams.page) && Objects.equals(this.hitsPerPage, searchRulesParams.hitsPerPage) && - Objects.equals(this.enabled, searchRulesParams.enabled) && - Objects.equals(this.requestOptions, searchRulesParams.requestOptions) + Objects.equals(this.enabled, searchRulesParams.enabled) ); } @Override public int hashCode() { - return Objects.hash(query, anchoring, context, page, hitsPerPage, enabled, requestOptions); + return Objects.hash(query, anchoring, context, page, hitsPerPage, enabled); } @Override @@ -158,7 +131,6 @@ public String toString() { sb.append(" page: ").append(toIndentedString(page)).append("\n"); sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" requestOptions: ").append(toIndentedString(requestOptions)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesResponse.java index c1df5003c9..f3278ca4d2 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchRulesResponse.java @@ -34,7 +34,7 @@ public SearchRulesResponse addHits(Rule hitsItem) { return this; } - /** Fetched rules. */ + /** Rules that matched the search criteria. */ @javax.annotation.Nonnull public List getHits() { return hits; @@ -45,7 +45,7 @@ public SearchRulesResponse setNbHits(Integer nbHits) { return this; } - /** Number of fetched rules. */ + /** Number of rules that matched the search criteria. */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchStrategy.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchStrategy.java index 67e83b70e3..e0c184559d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchStrategy.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchStrategy.java @@ -7,8 +7,9 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping - * further query execution as soon as a query matches at least the `hitsPerPage` number of results. + * Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the + * queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of + * results. */ public enum SearchStrategy { NONE("none"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsParams.java index 5b623ca018..23e7a8f355 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsParams.java @@ -27,7 +27,7 @@ public SearchSynonymsParams setQuery(String query) { return this; } - /** Text to search for in an index. */ + /** Search query. */ @javax.annotation.Nullable public String getQuery() { return query; @@ -49,7 +49,7 @@ public SearchSynonymsParams setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java index 059ee7c719..6373b0408d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java @@ -43,7 +43,7 @@ public SearchSynonymsResponse addHits(SynonymHit hitsItem) { return this; } - /** Synonym objects. */ + /** Matching synonyms. */ @javax.annotation.Nonnull public List getHits() { return hits; @@ -54,7 +54,7 @@ public SearchSynonymsResponse setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsParams.java index bf9126e0eb..fb5e5662d5 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsParams.java @@ -53,7 +53,7 @@ public SearchUserIdsParams setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nullable public Integer getPage() { return page; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java index 2ff5ce526a..56f84d1f55 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java @@ -48,7 +48,7 @@ public SearchUserIdsResponse setNbHits(Integer nbHits) { return this; } - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @javax.annotation.Nonnull public Integer getNbHits() { return nbHits; @@ -59,7 +59,7 @@ public SearchUserIdsResponse setPage(Integer page) { return this; } - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. minimum: 0 */ @javax.annotation.Nonnull public Integer getPage() { return page; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SecuredAPIKeyRestrictions.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SecuredAPIKeyRestrictions.java index 08b4da61fc..6ad8a9a9c3 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SecuredAPIKeyRestrictions.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SecuredAPIKeyRestrictions.java @@ -47,11 +47,10 @@ public SecuredAPIKeyRestrictions setFilters(String filters) { } /** - * Filters that apply to every search made with the secured API key. You can add extra filters at - * search time with the filters query parameter. For example, if you set the filter group:admin on - * your generated API key, and you add groups:press OR groups:visitors with the filters query - * parameter, your final search filter is equivalent to groups:admin AND (groups:press OR - * groups:visitors). + * Filters that apply to every search made with the secured API key. Extra filters added at search + * time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your + * generated API key, and add `groups:visitors` to the search query, the complete set of filters + * will be `group:admin AND groups:visitors`. */ @javax.annotation.Nullable public String getFilters() { @@ -63,7 +62,10 @@ public SecuredAPIKeyRestrictions setValidUntil(Long validUntil) { return this; } - /** Unix timestamp used to set the expiration date of the API key. */ + /** + * Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should + * expire. + */ @javax.annotation.Nullable public Long getValidUntil() { return validUntil; @@ -82,7 +84,12 @@ public SecuredAPIKeyRestrictions addRestrictIndices(String restrictIndicesItem) return this; } - /** Index names that can be queried. */ + /** + * Index names or patterns that this API key can access. By default, an API key can access all + * indices in the same application. You can use leading and trailing wildcard characters (`*`): - + * `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with + * \"_dev\". - `*_products_*` matches all indices containing \"_products_\". + */ @javax.annotation.Nullable public List getRestrictIndices() { return restrictIndices; @@ -94,9 +101,8 @@ public SecuredAPIKeyRestrictions setRestrictSources(String restrictSources) { } /** - * IPv4 network allowed to use the generated key. Use this to protect against API key leaking and - * reuse. You can only provide a single source, but you can specify a range of IPs (for example, - * 192.168.1.0/24). + * IP network that are allowed to use this key. You can only add a single source, but you can + * provide a range of IP addresses. Use this to protect against API key leaking and reuse. */ @javax.annotation.Nullable public String getRestrictSources() { @@ -109,15 +115,9 @@ public SecuredAPIKeyRestrictions setUserToken(String userToken) { } /** - * Unique user IP address. This can be useful when you want to impose a rate limit on specific - * users. By default, rate limits are set based on the IP address. This can become an issue when - * several users search from the same IP address. To avoid this, you can set a unique userToken - * for each user when generating their API key. This lets you restrict each user to a maximum - * number of API calls per hour, even if they share their IP with another user. Specifying the - * userToken in a secured API key is also a good security practice as it ensures users don't - * change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the - * authenticity of user identifiers. Setting the userToken at the API key level ensures that - * downstream services work as expected and prevents abuse. + * Pseudonymous user identifier to restrict usage of this API key to specific users. By default, + * rate limits are set based on IP addresses. This can be an issue if many users search from the + * same IP address. To avoid this, add a user token to each generated API key. */ @javax.annotation.Nullable public String getUserToken() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SemanticSearch.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SemanticSearch.java index 563416de7f..28d7b45566 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SemanticSearch.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SemanticSearch.java @@ -10,7 +10,7 @@ import java.util.Objects; /** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. */ public class SemanticSearch { @@ -31,8 +31,8 @@ public SemanticSearch addEventSources(String eventSourcesItem) { } /** - * Indices from which to collect click and conversion events. If null, the current index and - * replica group will be used as the event source. + * Indices from which to collect click and conversion events. If null, the current index and all + * its replicas are used. */ @javax.annotation.Nullable public List getEventSources() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SnippetResultOption.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SnippetResultOption.java index bb4c9b4f21..bc9d7416bb 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SnippetResultOption.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SnippetResultOption.java @@ -7,10 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet - * is non-empty. - */ +/** Snippets that show the context around a matching search query. */ @JsonDeserialize(as = SnippetResultOption.class) public class SnippetResultOption implements SnippetResult { @@ -25,7 +22,7 @@ public SnippetResultOption setValue(String value) { return this; } - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @javax.annotation.Nonnull public String getValue() { return value; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SortRemainingBy.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SortRemainingBy.java index 6a604d41ed..dd778b4bf1 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SortRemainingBy.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SortRemainingBy.java @@ -7,8 +7,19 @@ import com.fasterxml.jackson.databind.annotation.*; /** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical - * (ascending). - `hidden`: show only pinned values. + * Order of facet values that aren't explicitly positioned with the `order` setting. + * + *
+ *
count + *
Order remaining facet values by decreasing count. The count is the number of matching + * records containing this facet value. + *
alpha + *
Sort facet values alphabetically. + *
hidden + *
Don't show facet values that aren't explicitly positioned. + *
+ * + * . */ public enum SortRemainingBy { COUNT("count"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TagFilters.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TagFilters.java index a8c5711237..395adefe47 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TagFilters.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TagFilters.java @@ -13,7 +13,12 @@ import java.util.List; import java.util.logging.Logger; -/** [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). */ +/** + * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` + * parameter, which supports all filter types and combinations with boolean operators.** Different + * from regular facets, `_tags` can only be used for filtering (including or excluding records). You + * won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. + */ @JsonDeserialize(using = TagFilters.Deserializer.class) public interface TagFilters { // TagFilters as List wrapper. diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TaskStatus.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TaskStatus.java index 37f4585cd1..18fb913336 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TaskStatus.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TaskStatus.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** _published_ if the task has been processed, _notPublished_ otherwise. */ +/** Task status, `published` if the task is completed, `notPublished` otherwise. */ public enum TaskStatus { PUBLISHED("published"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TimeRange.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TimeRange.java index 0a5a90ac8b..b5ebc7ec77 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TimeRange.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TimeRange.java @@ -21,7 +21,7 @@ public TimeRange setFrom(Integer from) { return this; } - /** Lower bound of the time range (Unix timestamp). */ + /** When the rule should start to be active, in Unix epoch time. */ @javax.annotation.Nonnull public Integer getFrom() { return from; @@ -32,7 +32,7 @@ public TimeRange setUntil(Integer until) { return this; } - /** Upper bound of the time range (Unix timestamp). */ + /** When the rule should stop to be active, in Unix epoch time. */ @javax.annotation.Nonnull public Integer getUntil() { return until; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoTolerance.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoTolerance.java index 461219de46..a679b25bf0 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoTolerance.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoTolerance.java @@ -12,9 +12,12 @@ import java.util.logging.Logger; /** - * Controls whether [typo + * Whether [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) - * is enabled and how it is applied. + * is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting + * and + * concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * is also active. */ @JsonDeserialize(using = TypoTolerance.Deserializer.class) public interface TypoTolerance { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoToleranceEnum.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoToleranceEnum.java index 9fdc64ea0c..b1479f2ad7 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoToleranceEnum.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/TypoToleranceEnum.java @@ -6,7 +6,12 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; -/** Gets or Sets typoToleranceEnum */ +/** + * - `min`. Return matches with the lowest number of typos. For example, if you have matches without + * typos, only include those. But if there are no matches without typos (with 1 typo), include + * matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. + * With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. + */ @JsonDeserialize(as = TypoToleranceEnum.class) public enum TypoToleranceEnum implements TypoTolerance { MIN("min"), diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtResponse.java index 12f399e4a9..09eca7d541 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtResponse.java @@ -23,8 +23,8 @@ public UpdatedAtResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java index 037e5d9ae0..01fae34e34 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java @@ -26,8 +26,8 @@ public UpdatedAtWithObjectIdResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nullable public Long getTaskID() { @@ -50,7 +50,7 @@ public UpdatedAtWithObjectIdResponse setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique record identifier. */ @javax.annotation.Nullable public String getObjectID() { return objectID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java index beea9e64f2..e89c3cdad0 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java @@ -24,7 +24,7 @@ public UpdatedRuleResponse setObjectID(String objectID) { return this; } - /** Unique object identifier. */ + /** Unique identifier of a rule object. */ @javax.annotation.Nonnull public String getObjectID() { return objectID; @@ -48,8 +48,8 @@ public UpdatedRuleResponse setTaskID(Long taskID) { /** * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. + * It might not run immediately. You can check the task's progress with the [`task` + * operation](#tag/Indices/operation/getTask) and this `taskID`. */ @javax.annotation.Nonnull public Long getTaskID() { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserHit.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserHit.java index 7cacf01468..371e0dd35c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserHit.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserHit.java @@ -33,7 +33,7 @@ public UserHit setUserID(String userID) { return this; } - /** userID of the user. */ + /** User ID. */ @javax.annotation.Nonnull public String getUserID() { return userID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserId.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserId.java index 74144dcec2..02cdda2f87 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserId.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/UserId.java @@ -27,7 +27,7 @@ public UserId setUserID(String userID) { return this; } - /** userID of the user. */ + /** User ID. */ @javax.annotation.Nonnull public String getUserID() { return userID; diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Value.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Value.java index 72afb0704b..31ba88649d 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Value.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Value.java @@ -31,7 +31,10 @@ public Value addOrder(String orderItem) { return this; } - /** Pinned order of facet lists. */ + /** + * Explicit order of facets or facet values. This setting lets you always show specific facets or + * facet values at the top of the list. + */ @javax.annotation.Nullable public List getOrder() { return order; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/acl.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/acl.ts index c3522561e7..d7413dac12 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/acl.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/acl.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. + * Access control list permissions. */ export type Acl = | 'addObject' diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/action.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/action.ts index 339db61266..dd3583e54c 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/action.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/action.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Type of batch operation. + * Type of indexing operation. */ export type Action = | 'addObject' diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/addApiKeyResponse.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/addApiKeyResponse.ts index 3817c9691e..9f57140d0c 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/addApiKeyResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/addApiKeyResponse.ts @@ -7,7 +7,7 @@ export type AddApiKeyResponse = { key: string; /** - * Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ createdAt: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/anchoring.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/anchoring.ts index c77a11939a..cb727242e5 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/anchoring.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/anchoring.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + * Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. */ export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/apiKey.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/apiKey.ts index f30f69756b..665d39c579 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/apiKey.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/apiKey.ts @@ -7,42 +7,42 @@ import type { Acl } from './acl'; */ export type ApiKey = { /** - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + * Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint\'s reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). */ acl: Acl[]; /** - * Description of an API key for you and your team members. + * Description of an API key to help you identify this API key. */ description?: string; /** - * Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + * Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ indexes?: string[]; /** - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * Maximum number of results this API key can retrieve in one query. By default, there\'s no limit. */ maxHitsPerQuery?: number; /** - * Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there\'s no limit. */ maxQueriesPerIPPerHour?: number; /** - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It\'s a URL-encoded query string. + * Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that\'s outside the restricted range. */ queryParameters?: string; /** - * Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + * Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). */ referers?: string[]; /** - * Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can\'t [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app\'s backend. + * Duration (in seconds) after which the API key expires. By default, API keys don\'t expire. */ validity?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts index 71120c73e8..937a1e87e3 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts @@ -3,6 +3,6 @@ import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner'; /** - * Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ export type AroundPrecision = AroundPrecisionFromValueInner[] | number; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecisionFromValueInner.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecisionFromValueInner.ts index 14a0e3bb76..c3850a800a 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecisionFromValueInner.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecisionFromValueInner.ts @@ -1,7 +1,16 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * Range object with lower and upper values in meters to define custom ranges. + */ export type AroundPrecisionFromValueInner = { + /** + * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + */ from?: number; + /** + * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + */ value?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadius.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadius.ts index 6c99817b26..1c4ae8df2b 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadius.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadius.ts @@ -3,6 +3,6 @@ import type { AroundRadiusAll } from './aroundRadiusAll'; /** - * [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. */ export type AroundRadius = AroundRadiusAll | number; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadiusAll.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadiusAll.ts index 1dd22ed574..e5f1070601 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadiusAll.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundRadiusAll.ts @@ -1,3 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * Return all records with a valid `_geoloc` attribute. Don\'t filter by distance. + */ export type AroundRadiusAll = 'all'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilter.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilter.ts index 98a2e1e7a2..ca83695bf5 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilter.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilter.ts @@ -1,21 +1,21 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Automatic facet Filter. + * Filter or optional filter to be applied to the search. */ export type AutomaticFacetFilter = { /** - * Attribute to filter on. This must match a facet placeholder in the Rule\'s pattern. + * Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. */ facet: string; /** - * Score for the filter. Typically used for optional or disjunctive filters. + * Filter scores to give different weights to individual filters. */ score?: number; /** - * Whether the filter is disjunctive (true) or conjunctive (false). + * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. */ disjunctive?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilters.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilters.ts index 0ac46a30fa..725561f8d2 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/automaticFacetFilters.ts @@ -3,6 +3,6 @@ import type { AutomaticFacetFilter } from './automaticFacetFilter'; /** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. */ export type AutomaticFacetFilters = AutomaticFacetFilter[] | string[]; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts index 3d026541dc..a35d8cbd3d 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts @@ -2,82 +2,87 @@ export type BaseIndexSettings = { /** - * Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn\'t evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + */ + attributesForFaceting?: string[]; + + /** + * Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). */ replicas?: string[]; /** - * Maximum number of hits accessible through pagination. + * Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can\'t be guaranteed. */ paginationLimitedTo?: number; /** - * Attributes that can\'t be retrieved at query time. + * Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don\'t want to include it in the search results. */ unretrievableAttributes?: string[]; /** - * Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. */ disableTypoToleranceOnWords?: string[]; /** - * Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + * Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. */ attributesToTransliterate?: string[]; /** - * Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ camelCaseAttributes?: string[]; /** - * Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + * Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). */ decompoundedAttributes?: Record; /** - * Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ indexLanguages?: string[]; /** - * Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + * Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ disablePrefixOnAttributes?: string[]; /** - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + * Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. */ allowCompressionOfIntegerArray?: boolean; /** - * Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. */ numericAttributesForFiltering?: string[]; /** - * Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren\'t indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. */ separatorsToIndex?: string; /** - * [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. */ searchableAttributes?: string[]; /** - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. */ userData?: any | null; /** - * A list of characters and their normalized replacements to override Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ customNormalization?: Record>; /** - * Name of the deduplication attribute to be used with Algolia\'s [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. */ attributeForDistinct?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchParamsWithoutQuery.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchParamsWithoutQuery.ts index 33825f13f6..95ae5b0395 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchParamsWithoutQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchParamsWithoutQuery.ts @@ -9,12 +9,12 @@ import type { TagFilters } from './tagFilters'; export type BaseSearchParamsWithoutQuery = { /** - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ similarQuery?: string; /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ filters?: string; @@ -27,47 +27,47 @@ export type BaseSearchParamsWithoutQuery = { tagFilters?: TagFilters; /** - * Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ sumOrFiltersScores?: boolean; /** - * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. */ restrictSearchableAttributes?: string[]; /** - * Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ facets?: string[]; /** - * Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ facetingAfterDistinct?: boolean; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page?: number; /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. */ offset?: number; /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). */ length?: number; /** - * Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ aroundLatLng?: string; /** - * Search for entries around a location. The location is automatically computed from the requester\'s IP address. + * Whether to obtain the coordinates from the request\'s IP address. */ aroundLatLngViaIP?: boolean; @@ -76,62 +76,57 @@ export type BaseSearchParamsWithoutQuery = { aroundPrecision?: AroundPrecision; /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn\'t set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set. */ minimumAroundRadius?: number; /** - * Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ insideBoundingBox?: number[][]; /** - * Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ insidePolygon?: number[][]; /** - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ naturalLanguages?: string[]; /** - * Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ ruleContexts?: string[]; /** - * Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ personalizationImpact?: number; /** - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ userToken?: string; /** - * Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * Whether the search response should include detailed ranking information. */ getRankingInfo?: boolean; /** - * Enriches the API\'s response with information about how the query was processed. - */ - explain?: string[]; - - /** - * Whether to take into account an index\'s synonyms for a particular search. + * Whether to take into account an index\'s synonyms for this search. */ synonyms?: boolean; /** - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ clickAnalytics?: boolean; /** - * Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. */ analytics?: boolean; @@ -141,12 +136,12 @@ export type BaseSearchParamsWithoutQuery = { analyticsTags?: string[]; /** - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. */ percentileComputation?: boolean; /** - * Incidates whether this search will be considered in A/B testing. + * Whether to enable A/B testing for this search. */ enableABTest?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchResponse.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchResponse.ts index abd29c39d2..6d3dd06f9b 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseSearchResponse.ts @@ -22,7 +22,7 @@ export type BaseSearchResponse = Record & { aroundLatLng?: string; /** - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. */ automaticRadius?: string; @@ -44,7 +44,7 @@ export type BaseSearchResponse = Record & { exhaustiveTypo?: boolean; /** - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. */ facets?: Record>; @@ -74,12 +74,12 @@ export type BaseSearchResponse = Record & { message?: string; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; /** - * Number of pages of results for the current query. + * Number of pages of results. */ nbPages: number; @@ -89,7 +89,7 @@ export type BaseSearchResponse = Record & { nbSortedHits?: number; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page: number; @@ -128,7 +128,7 @@ export type BaseSearchResponse = Record & { serverUsed?: string; /** - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. */ userData?: any | null; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperation.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperation.ts index 8bcf7b0945..d3df17410b 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperation.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperation.ts @@ -3,13 +3,13 @@ import type { BuiltInOperationType } from './builtInOperationType'; /** - * To update an attribute without pushing the entire record, you can use these built-in operations. + * Update to perform on the attribute. */ export type BuiltInOperation = { _operation: BuiltInOperationType; /** - * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. */ value: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperationType.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperationType.ts index 71a7cd154f..56d0ed532f 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperationType.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/builtInOperationType.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Operation to apply to the attribute. + * How to change the attribute. */ export type BuiltInOperationType = | 'Add' diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/condition.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/condition.ts index bb600e8c49..fea1e67764 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/condition.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/condition.ts @@ -4,19 +4,24 @@ import type { Anchoring } from './anchoring'; export type Condition = { /** - * Query pattern syntax. + * Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". */ pattern?: string; anchoring?: Anchoring; /** - * Whether the pattern matches on plurals, synonyms, and typos. + * Whether the pattern should match plurals, synonyms, and typos. */ alternatives?: boolean; /** - * Rule context format: [A-Za-z0-9_-]+). + * An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. */ context?: string; + + /** + * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + */ + filters?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequence.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequence.ts index be9aa688d4..a24c7e3a82 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequence.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequence.ts @@ -5,28 +5,28 @@ import type { ConsequenceParams } from './consequenceParams'; import type { Promote } from './promote'; /** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + * Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). */ export type Consequence = { params?: ConsequenceParams; /** - * Records to promote. + * Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. */ promote?: Promote[]; /** - * Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + * Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown. */ filterPromotes?: boolean; /** - * Records to hide. By default, you can hide up to 50 records per rule. + * Records you want to hide from the search results. */ hide?: ConsequenceHide[]; /** - * Custom JSON object that will be appended to the userData array in the response. This object isn\'t interpreted by the API. It\'s limited to 1kB of minified JSON. + * A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1 kB of minified JSON. */ userData?: any | null; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceHide.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceHide.ts index ff8731ed7c..9ef5cf251c 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceHide.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceHide.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Unique identifier of the record to hide. + * Object ID of the record to hide. */ export type ConsequenceHide = { /** - * Unique object identifier. + * Unique record identifier. */ objectID: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQuery.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQuery.ts index 464cb5325e..28d8722a34 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQuery.ts @@ -3,6 +3,6 @@ import type { ConsequenceQueryObject } from './consequenceQueryObject'; /** - * When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can\'t do both). + * Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. */ export type ConsequenceQuery = ConsequenceQueryObject | string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQueryObject.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQueryObject.ts index 4aedb781e0..6d12dbc8aa 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQueryObject.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/consequenceQueryObject.ts @@ -4,12 +4,12 @@ import type { Edit } from './edit'; export type ConsequenceQueryObject = { /** - * Words to remove. + * Words to remove from the search query. */ remove?: string[]; /** - * Edits to apply. + * Changes to make to the search query. */ edits?: Edit[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/cursor.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/cursor.ts index b645bb3aae..db36a6129c 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/cursor.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/cursor.ts @@ -2,7 +2,7 @@ export type Cursor = { /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ cursor?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/deleteByParams.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/deleteByParams.ts index 776c9c8d3b..ff6681d834 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/deleteByParams.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/deleteByParams.ts @@ -9,7 +9,7 @@ export type DeleteByParams = { facetFilters?: FacetFilters; /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ filters?: string; @@ -18,19 +18,19 @@ export type DeleteByParams = { tagFilters?: TagFilters; /** - * Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ aroundLatLng?: string; aroundRadius?: AroundRadius; /** - * Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ insideBoundingBox?: number[][]; /** - * Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ insidePolygon?: number[][]; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntry.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntry.ts index 807f902708..2a832ca4bc 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntry.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntry.ts @@ -7,27 +7,27 @@ import type { DictionaryEntryState } from './dictionaryEntryState'; */ export type DictionaryEntry = Record & { /** - * Unique identifier for a dictionary object. + * Unique identifier for the dictionary entry. */ objectID: string; /** - * [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ language: string; /** - * Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia\'s standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn\'t empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + * Matching dictionary word for `stopwords` and `compounds` dictionaries. */ word?: string; /** - * Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia\'s standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + * Matching words in the `plurals` dictionary including declensions. */ words?: string[]; /** - * For compound entries, governs the behavior of the `word` parameter. + * Invividual components of a compound word in the `compounds` dictionary. */ decomposition?: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntryState.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntryState.ts index 7851802368..5ea78345dc 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntryState.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryEntryState.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). + * Whether a dictionary entry is active. */ export type DictionaryEntryState = 'disabled' | 'enabled'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryLanguage.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryLanguage.ts index 4335e2cfe0..7858762a1e 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryLanguage.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/dictionaryLanguage.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Custom entries for a dictionary. + * Dictionary type. If `null`, this dictionary type isn\'t supported for the language. */ export type DictionaryLanguage = { /** - * If `0`, the dictionary hasn\'t been customized and only contains standard entries provided by Algolia. If `null`, that feature isn\'t available or isn\'t supported for that language. + * Number of custom dictionary entries. */ nbCustomEntries?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/distinct.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/distinct.ts index 1779d97415..dc87dfb008 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/distinct.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/distinct.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Enables [deduplication or grouping of results (Algolia\'s _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. */ export type Distinct = boolean | number; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/edit.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/edit.ts index 9c11afef41..b77d006e35 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/edit.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/edit.ts @@ -11,7 +11,7 @@ export type Edit = { delete?: string; /** - * Text that should be inserted in place of the removed text inside the query string. + * Text to be added in place of the deleted text inside the query string. */ insert?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/exactOnSingleWordQuery.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/exactOnSingleWordQuery.ts index 6d5747887c..bad4a2baec 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/exactOnSingleWordQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/exactOnSingleWordQuery.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t. */ export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetFilters.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetFilters.ts index e9eae1db38..f83f2eea3a 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it\'s best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ export type FacetFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetHits.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetHits.ts index 06d0ffb9c3..bd205a61e5 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetHits.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetHits.ts @@ -7,12 +7,12 @@ export type FacetHits = { value: string; /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ highlighted: string; /** - * Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + * Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). */ count: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetOrdering.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetOrdering.ts index 4e1af92fd6..9e057ded54 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetOrdering.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facetOrdering.ts @@ -4,13 +4,13 @@ import type { Facets } from './facets'; import type { Value } from './value'; /** - * Defines the ordering of facets (widgets). + * Order of facet names and facet values in your UI. */ export type FacetOrdering = { facets?: Facets; /** - * Ordering of facet values within an individual facet. + * Order of facet values. One object for each facet. */ values?: Record; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facets.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facets.ts index b10eb0f3cc..3aefad3a52 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facets.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/facets.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Ordering of facets (widgets). + * Order of facet names. */ export type Facets = { /** - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ order?: string[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/highlightResultOption.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/highlightResultOption.ts index 7d68dce0e3..0de083fe2d 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/highlightResultOption.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/highlightResultOption.ts @@ -3,18 +3,18 @@ import type { MatchLevel } from './matchLevel'; /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. */ export type HighlightResultOption = { /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ value: string; matchLevel: MatchLevel; /** - * List of words from the query that matched the object. + * List of matched words from the search query. */ matchedWords: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/hit.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/hit.ts index d670f4df4b..9c00281460 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/hit.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/hit.ts @@ -5,21 +5,21 @@ import type { RankingInfo } from './rankingInfo'; import type { SnippetResult } from './snippetResult'; /** - * A single hit. + * Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. */ export type Hit> = T & { /** - * Unique object identifier. + * Unique record identifier. */ objectID: string; /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. */ _highlightResult?: Record; /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. */ _snippetResult?: Record; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/ignorePlurals.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/ignorePlurals.ts index ffea12b13d..e022728563 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/ignorePlurals.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/ignorePlurals.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren\'t considered to be the same (\"foot\" will not find \"feet\"). + * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. */ export type IgnorePlurals = string[] | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts index 3dcf44d602..5f6092a3b8 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts @@ -83,6 +83,7 @@ export * from './removeWordsIfNoResults'; export * from './renderingContent'; export * from './rule'; export * from './scopeType'; +export * from './searchDictionaryEntriesResponse'; export * from './searchForFacetValuesResponse'; export * from './searchForFacets'; export * from './searchForFacetsOptions'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettings.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettings.ts index 4ef41b83da..7f2e9acde9 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettings.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettings.ts @@ -4,6 +4,6 @@ import type { BaseIndexSettings } from './baseIndexSettings'; import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams'; /** - * Algolia index settings. + * Index settings. */ export type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts index 765e380d13..b946517d87 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts @@ -16,47 +16,42 @@ import type { TypoTolerance } from './typoTolerance'; export type IndexSettingsAsSearchParams = { /** - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - attributesForFaceting?: string[]; - - /** - * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ attributesToRetrieve?: string[]; /** - * Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ ranking?: string[]; /** - * Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ customRanking?: string[]; /** - * Relevancy threshold below which less relevant results aren\'t included in the results. + * Relevancy threshold below which less relevant results aren\'t included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ relevancyStrictness?: number; /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ attributesToHighlight?: string[]; /** - * Attributes to _snippet_. \'Snippeting\' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ attributesToSnippet?: string[]; /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ highlightPreTag?: string; /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ highlightPostTag?: string; @@ -66,7 +61,7 @@ export type IndexSettingsAsSearchParams = { snippetEllipsisText?: string; /** - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ restrictHighlightAndSnippetArrays?: boolean; @@ -76,24 +71,24 @@ export type IndexSettingsAsSearchParams = { hitsPerPage?: number; /** - * Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ minWordSizefor1Typo?: number; /** - * Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ minWordSizefor2Typos?: number; typoTolerance?: TypoTolerance; /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ allowTyposOnNumericTokens?: boolean; /** - * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ disableTypoToleranceOnAttributes?: string[]; @@ -102,27 +97,27 @@ export type IndexSettingsAsSearchParams = { removeStopWords?: RemoveStopWords; /** - * Characters that the engine shouldn\'t automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ keepDiacriticsOnCharacters?: string; /** - * Sets your user\'s search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ queryLanguages?: string[]; /** - * [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ decompoundQuery?: boolean; /** - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. */ enableRules?: boolean; /** - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * Whether to enable Personalization. */ enablePersonalization?: boolean; @@ -135,51 +130,51 @@ export type IndexSettingsAsSearchParams = { semanticSearch?: SemanticSearch; /** - * Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ advancedSyntax?: boolean; /** - * Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ optionalWords?: string[]; /** - * Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ disableExactOnAttributes?: string[]; exactOnSingleWordQuery?: ExactOnSingleWordQuery; /** - * Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ alternativesAsExact?: AlternativesAsExact[]; /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[]; distinct?: Distinct; /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ replaceSynonymsInHighlight?: boolean; /** - * Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ minProximity?: number; /** - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI. */ responseFields?: string[]; /** - * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ maxFacetHits?: number; @@ -189,19 +184,19 @@ export type IndexSettingsAsSearchParams = { maxValuesPerFacet?: number; /** - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ sortFacetValuesBy?: string; /** - * When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ attributeCriteriaComputedByMinProximity?: boolean; renderingContent?: RenderingContent; /** - * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ enableReRanking?: boolean; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/matchLevel.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/matchLevel.ts index 771daa1fe5..a5fa02991f 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/matchLevel.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/matchLevel.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Indicates how well the attribute matched the search query. + * Whether the whole query string matches or only a part. */ export type MatchLevel = 'full' | 'none' | 'partial'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/mode.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/mode.ts index 128d51a2be..37ed887342 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/mode.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/mode.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Search mode the index will use to query for results. + * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. */ export type Mode = 'keywordSearch' | 'neuralSearch'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/numericFilters.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/numericFilters.ts index dde128ffcc..3db0c89dca 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/numericFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/numericFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. */ export type NumericFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/operationType.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/operationType.ts index 4674a69e0f..3b22cc054e 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/operationType.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/operationType.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Operation to perform (_move_ or _copy_). + * Operation to perform on the index. */ export type OperationType = 'copy' | 'move'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/optionalFilters.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/optionalFilters.ts index 1836d9315b..f910cd0cfe 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/optionalFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/optionalFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don\'t match the optional filter are still included in the results, only their ranking is affected. + * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don\'t work with numeric attributes. */ export type OptionalFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/params.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/params.ts index dff37195ce..8dbd02c2ff 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/params.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/params.ts @@ -5,7 +5,7 @@ import type { ConsequenceQuery } from './consequenceQuery'; import type { RenderingContent } from './renderingContent'; /** - * Additional search parameters. + * Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. */ export type Params = { query?: ConsequenceQuery; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectID.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectID.ts index aeb5e5e296..6e2f37992e 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectID.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectID.ts @@ -5,12 +5,12 @@ */ export type PromoteObjectID = { /** - * Unique identifier of the record to promote. + * Unique record identifier. */ objectID: string; /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ position: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectIDs.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectIDs.ts index cfdaa6d76d..01a5dd5763 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectIDs.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/promoteObjectIDs.ts @@ -5,12 +5,12 @@ */ export type PromoteObjectIDs = { /** - * Unique identifiers of the records to promote. + * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. */ objectIDs: string[]; /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ position: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/queryType.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/queryType.ts index 50424749d0..a609aca0e8 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/queryType.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/queryType.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rankingInfo.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rankingInfo.ts index 71de0b00ec..14edcdc592 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rankingInfo.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rankingInfo.ts @@ -3,14 +3,17 @@ import type { MatchedGeoLocation } from './matchedGeoLocation'; import type { Personalization } from './personalization'; +/** + * Object with detailed information about the record\'s ranking. + */ export type RankingInfo = { /** - * This field is reserved for advanced usage. + * Whether a filter matched the query. */ filters: number; /** - * Position of the most important matched attribute in the attributes to index list. + * Position of the first matched word in the best matching attribute of the record. */ firstMatchedWord: number; @@ -39,27 +42,27 @@ export type RankingInfo = { nbTypos: number; /** - * Present and set to true if a Rule promoted the hit. + * Whether the record was promoted by a rule. */ promoted: boolean; /** - * When the query contains more than one word, the sum of the distances between matched words (in meters). + * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. */ proximityDistance?: number; /** - * Custom ranking for the object, expressed as a single integer value. + * Overall ranking of the record, expressed as a single integer. This attribute is internal. */ userScore: number; /** - * Number of matched words, including prefixes and typos. + * Number of matched words. */ words: number; /** - * Wether the record are promoted by the re-ranking strategy. + * Whether the record is re-ranked. */ promotedByReRanking?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/reRankingApplyFilter.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/reRankingApplyFilter.ts index 02a02545fb..ced0223fd3 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/reRankingApplyFilter.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/reRankingApplyFilter.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. */ export type ReRankingApplyFilter = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeStopWords.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeStopWords.ts index 33f66341c1..9bdbf91763 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeStopWords.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeStopWords.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. */ export type RemoveStopWords = string[] | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts index 2e5b6bdef7..81519af90a 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn\'t match any hits. + * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn\'t return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ export type RemoveWordsIfNoResults = | 'allOptional' diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/renderingContent.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/renderingContent.ts index 9c632b96e2..4385efd64f 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/renderingContent.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/renderingContent.ts @@ -3,7 +3,7 @@ import type { FacetOrdering } from './facetOrdering'; /** - * Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. */ export type RenderingContent = { facetOrdering?: FacetOrdering; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rule.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rule.ts index 77a9612943..b002ec88ac 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rule.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/rule.ts @@ -9,29 +9,29 @@ import type { TimeRange } from './timeRange'; */ export type Rule = { /** - * Unique identifier for a rule object. + * Unique identifier of a rule object. */ objectID: string; /** - * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + * Conditions that trigger a rule. Some consequences require specific conditions or don\'t require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). */ conditions?: Condition[]; consequence?: Consequence; /** - * Description of the rule\'s purpose. This can be helpful for display in the Algolia dashboard. + * Description of the rule\'s purpose to help you distinguish between different rules. */ description?: string; /** - * Indicates whether to enable the rule. If it isn\'t enabled, it isn\'t applied at query time. + * Whether the rule is active. */ enabled?: boolean; /** - * If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + * Time periods when the rule is active. */ validity?: TimeRange[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchDictionaryEntriesResponse.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchDictionaryEntriesResponse.ts new file mode 100644 index 0000000000..88880a028b --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchDictionaryEntriesResponse.ts @@ -0,0 +1,25 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import type { DictionaryEntry } from './dictionaryEntry'; + +export type SearchDictionaryEntriesResponse = { + /** + * Dictionary entries matching the search criteria. + */ + hits: DictionaryEntry[]; + + /** + * Requested page of the API response. + */ + page: number; + + /** + * Number of results (hits). + */ + nbHits: number; + + /** + * Number of pages of results. + */ + nbPages: number; +}; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetValuesResponse.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetValuesResponse.ts index a842add7b3..32a0189e7e 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetValuesResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetValuesResponse.ts @@ -3,6 +3,9 @@ import type { FacetHits } from './facetHits'; export type SearchForFacetValuesResponse = { + /** + * Matching facet values. + */ facetHits: FacetHits[]; /** diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetsOptions.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetsOptions.ts index 68d26be397..d599af5dc8 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetsOptions.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForFacetsOptions.ts @@ -9,7 +9,7 @@ export type SearchForFacetsOptions = { facet: string; /** - * Algolia index name. + * Index name. */ indexName: string; @@ -19,7 +19,7 @@ export type SearchForFacetsOptions = { facetQuery?: string; /** - * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ maxFacetHits?: number; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForHitsOptions.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForHitsOptions.ts index f75300dbc8..08edcf8467 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForHitsOptions.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchForHitsOptions.ts @@ -4,7 +4,7 @@ import type { SearchTypeDefault } from './searchTypeDefault'; export type SearchForHitsOptions = { /** - * Algolia index name. + * Index name. */ indexName: string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchHits.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchHits.ts index 8826d69fb0..13dafbabab 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchHits.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchHits.ts @@ -3,10 +3,13 @@ import type { Hit } from './hit'; export type SearchHits> = Record & { + /** + * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. + */ hits: Array>; /** - * Text to search for in an index. + * Search query. */ query: string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchParamsQuery.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchParamsQuery.ts index 39058cbe1c..9f1926f6cc 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchParamsQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchParamsQuery.ts @@ -2,7 +2,7 @@ export type SearchParamsQuery = { /** - * Text to search for in an index. + * Search query. */ query?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchStrategy.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchStrategy.ts index 84d4ae8bea..1bda46977a 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchStrategy.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchStrategy.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. + * Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. */ export type SearchStrategy = 'none' | 'stopIfEnoughMatches'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchSynonymsResponse.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchSynonymsResponse.ts index ac9e1a4a49..cef9b724f5 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchSynonymsResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchSynonymsResponse.ts @@ -4,12 +4,12 @@ import type { SynonymHit } from './synonymHit'; export type SearchSynonymsResponse = Record & { /** - * Synonym objects. + * Matching synonyms. */ hits: SynonymHit[]; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/securedAPIKeyRestrictions.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/securedAPIKeyRestrictions.ts index bba07db289..c230dee7d9 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/securedAPIKeyRestrictions.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/securedAPIKeyRestrictions.ts @@ -6,27 +6,27 @@ export type SecuredAPIKeyRestrictions = { searchParams?: SearchParamsObject; /** - * Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + * Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. */ filters?: string; /** - * Unix timestamp used to set the expiration date of the API key. + * Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. */ validUntil?: number; /** - * Index names that can be queried. + * Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ restrictIndices?: string[]; /** - * IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + * IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. */ restrictSources?: string; /** - * Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don\'t change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + * Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. */ userToken?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/semanticSearch.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/semanticSearch.ts index c9b8322491..86cfd43a0b 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/semanticSearch.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/semanticSearch.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. */ export type SemanticSearch = { /** - * Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + * Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. */ eventSources?: string[] | null; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/snippetResultOption.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/snippetResultOption.ts index cb21bd0f66..daab65f2d3 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/snippetResultOption.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/snippetResultOption.ts @@ -3,11 +3,11 @@ import type { MatchLevel } from './matchLevel'; /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. */ export type SnippetResultOption = { /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ value: string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/sortRemainingBy.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/sortRemainingBy.ts index a5faf046e7..7da7c289ef 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/sortRemainingBy.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/sortRemainingBy.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + * Order of facet values that aren\'t explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don\'t show facet values that aren\'t explicitly positioned.
. */ export type SortRemainingBy = 'alpha' | 'count' | 'hidden'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/tagFilters.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/tagFilters.ts index 1b7e964bda..9660823642 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/tagFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/tagFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`. */ export type TagFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/taskStatus.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/taskStatus.ts index 8f335ad217..169dd7bf2f 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/taskStatus.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/taskStatus.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * _published_ if the task has been processed, _notPublished_ otherwise. + * Task status, `published` if the task is completed, `notPublished` otherwise. */ export type TaskStatus = 'notPublished' | 'published'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/timeRange.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/timeRange.ts index cfd663c8a6..dee6043c91 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/timeRange.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/timeRange.ts @@ -2,12 +2,12 @@ export type TimeRange = { /** - * Lower bound of the time range (Unix timestamp). + * When the rule should start to be active, in Unix epoch time. */ from: number; /** - * Upper bound of the time range (Unix timestamp). + * When the rule should stop to be active, in Unix epoch time. */ until: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoTolerance.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoTolerance.ts index 58ae716eff..0bd64036f8 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoTolerance.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoTolerance.ts @@ -3,6 +3,6 @@ import type { TypoToleranceEnum } from './typoToleranceEnum'; /** - * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. */ export type TypoTolerance = TypoToleranceEnum | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoToleranceEnum.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoToleranceEnum.ts index 05cf7b62da..a33877b0de 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoToleranceEnum.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/typoToleranceEnum.ts @@ -1,3 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. + */ export type TypoToleranceEnum = 'min' | 'strict'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/updatedRuleResponse.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/updatedRuleResponse.ts index 9e445c8361..2a2b24689f 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/updatedRuleResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/updatedRuleResponse.ts @@ -2,7 +2,7 @@ export type UpdatedRuleResponse = { /** - * Unique object identifier. + * Unique identifier of a rule object. */ objectID: string; @@ -12,7 +12,7 @@ export type UpdatedRuleResponse = { updatedAt: string; /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/userId.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/userId.ts index 731250edc5..e46823f8a9 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/userId.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/userId.ts @@ -5,7 +5,7 @@ */ export type UserId = { /** - * UserID of the user. + * User ID. */ userID: string; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/value.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/value.ts index 9bbf488f63..9054c5e5d5 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/value.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/value.ts @@ -4,7 +4,7 @@ import type { SortRemainingBy } from './sortRemainingBy'; export type Value = { /** - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ order?: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts index befdc0fdf7..4cc632dc3a 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts @@ -157,12 +157,12 @@ export function createLiteClient({ }, /** - * Send multiple search queries to one or more indices. + * Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. * * Required API Key ACLs: * - search. * - * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries. + * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ search( diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/aBTestResponse.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/aBTestResponse.ts index 359b08b95a..37a1535ce4 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/aBTestResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/aBTestResponse.ts @@ -12,7 +12,7 @@ export type ABTestResponse = { abTestID: number; /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/clientMethodProps.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/clientMethodProps.ts index cf497bff60..4b58cd01ff 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/clientMethodProps.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/clientMethodProps.ts @@ -89,11 +89,11 @@ export type GetABTestProps = { */ export type ListABTestsProps = { /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts index 74993eacbb..c436e506f9 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts @@ -367,8 +367,8 @@ export function createAbtestingClient({ * - analytics. * * @param listABTests - The listABTests object. - * @param listABTests.offset - Position of the starting record. Used for paging. 0 is the first record. - * @param listABTests.limit - Number of records to return (page size). + * @param listABTests.offset - Position of the first item to return. + * @param listABTests.limit - Number of items to return. * @param listABTests.indexPrefix - Only return A/B tests for indices starting with this prefix. * @param listABTests.indexSuffix - Only return A/B tests for indices ending with this suffix. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/clientMethodProps.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/clientMethodProps.ts index b2cbc6f507..2c813a8266 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/clientMethodProps.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/clientMethodProps.ts @@ -72,15 +72,15 @@ export type CustomPutProps = { */ export type GetAverageClickPositionProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -94,15 +94,15 @@ export type GetAverageClickPositionProps = { */ export type GetClickPositionsProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -116,15 +116,15 @@ export type GetClickPositionsProps = { */ export type GetClickThroughRateProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -138,15 +138,15 @@ export type GetClickThroughRateProps = { */ export type GetConversationRateProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -160,15 +160,15 @@ export type GetConversationRateProps = { */ export type GetNoClickRateProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -182,15 +182,15 @@ export type GetNoClickRateProps = { */ export type GetNoResultsRateProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -204,15 +204,15 @@ export type GetNoResultsRateProps = { */ export type GetSearchesCountProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -226,23 +226,23 @@ export type GetSearchesCountProps = { */ export type GetSearchesNoClicksProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -256,23 +256,23 @@ export type GetSearchesNoClicksProps = { */ export type GetSearchesNoResultsProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -286,7 +286,7 @@ export type GetSearchesNoResultsProps = { */ export type GetStatusProps = { /** - * Index name to target. + * Index name. */ index: string; }; @@ -296,23 +296,23 @@ export type GetStatusProps = { */ export type GetTopCountriesProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -326,7 +326,7 @@ export type GetTopCountriesProps = { */ export type GetTopFilterAttributesProps = { /** - * Index name to target. + * Index name. */ index: string; /** @@ -334,19 +334,19 @@ export type GetTopFilterAttributesProps = { */ search?: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -364,7 +364,7 @@ export type GetTopFilterForAttributeProps = { */ attribute: string; /** - * Index name to target. + * Index name. */ index: string; /** @@ -372,19 +372,19 @@ export type GetTopFilterForAttributeProps = { */ search?: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -398,7 +398,7 @@ export type GetTopFilterForAttributeProps = { */ export type GetTopFiltersNoResultsProps = { /** - * Index name to target. + * Index name. */ index: string; /** @@ -406,19 +406,19 @@ export type GetTopFiltersNoResultsProps = { */ search?: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -432,7 +432,7 @@ export type GetTopFiltersNoResultsProps = { */ export type GetTopHitsProps = { /** - * Index name to target. + * Index name. */ index: string; /** @@ -444,19 +444,19 @@ export type GetTopHitsProps = { */ clickAnalytics?: boolean; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -470,7 +470,7 @@ export type GetTopHitsProps = { */ export type GetTopSearchesProps = { /** - * Index name to target. + * Index name. */ index: string; /** @@ -478,11 +478,11 @@ export type GetTopSearchesProps = { */ clickAnalytics?: boolean; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** @@ -494,11 +494,11 @@ export type GetTopSearchesProps = { */ direction?: Direction; /** - * Number of records to return (page size). + * Number of items to return. */ limit?: number; /** - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. */ offset?: number; /** @@ -512,15 +512,15 @@ export type GetTopSearchesProps = { */ export type GetUsersCountProps = { /** - * Index name to target. + * Index name. */ index: string; /** - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. */ startDate?: string; /** - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. */ endDate?: string; /** diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/searchNoResultEvent.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/searchNoResultEvent.ts index 5f2828f099..accd2bdeda 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/searchNoResultEvent.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/searchNoResultEvent.ts @@ -12,7 +12,7 @@ export type SearchNoResultEvent = { count: number; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearch.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearch.ts index 74a95fcc75..623fd8318c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearch.ts @@ -12,7 +12,7 @@ export type TopSearch = { count: number; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts index b5fb8c79e1..bc4d3a570c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts @@ -42,7 +42,7 @@ export type TopSearchWithAnalytics = { conversionCount: number; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts index 42d2ac5ec2..43685c8165 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts @@ -271,9 +271,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getAverageClickPosition - The getAverageClickPosition object. - * @param getAverageClickPosition.index - Index name to target. - * @param getAverageClickPosition.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getAverageClickPosition.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getAverageClickPosition.index - Index name. + * @param getAverageClickPosition.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getAverageClickPosition.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getAverageClickPosition.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -324,9 +324,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getClickPositions - The getClickPositions object. - * @param getClickPositions.index - Index name to target. - * @param getClickPositions.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getClickPositions.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getClickPositions.index - Index name. + * @param getClickPositions.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getClickPositions.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getClickPositions.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -377,9 +377,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getClickThroughRate - The getClickThroughRate object. - * @param getClickThroughRate.index - Index name to target. - * @param getClickThroughRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getClickThroughRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getClickThroughRate.index - Index name. + * @param getClickThroughRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getClickThroughRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getClickThroughRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -430,9 +430,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getConversationRate - The getConversationRate object. - * @param getConversationRate.index - Index name to target. - * @param getConversationRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getConversationRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getConversationRate.index - Index name. + * @param getConversationRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getConversationRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getConversationRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -483,9 +483,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getNoClickRate - The getNoClickRate object. - * @param getNoClickRate.index - Index name to target. - * @param getNoClickRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getNoClickRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getNoClickRate.index - Index name. + * @param getNoClickRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getNoClickRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getNoClickRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -536,9 +536,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getNoResultsRate - The getNoResultsRate object. - * @param getNoResultsRate.index - Index name to target. - * @param getNoResultsRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getNoResultsRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getNoResultsRate.index - Index name. + * @param getNoResultsRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getNoResultsRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getNoResultsRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -589,9 +589,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getSearchesCount - The getSearchesCount object. - * @param getSearchesCount.index - Index name to target. - * @param getSearchesCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getSearchesCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getSearchesCount.index - Index name. + * @param getSearchesCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getSearchesCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getSearchesCount.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -642,11 +642,11 @@ export function createAnalyticsClient({ * - analytics. * * @param getSearchesNoClicks - The getSearchesNoClicks object. - * @param getSearchesNoClicks.index - Index name to target. - * @param getSearchesNoClicks.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getSearchesNoClicks.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getSearchesNoClicks.limit - Number of records to return (page size). - * @param getSearchesNoClicks.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getSearchesNoClicks.index - Index name. + * @param getSearchesNoClicks.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getSearchesNoClicks.endDate - End date (`YYYY-MM-DD`) of the period to analyze. + * @param getSearchesNoClicks.limit - Number of items to return. + * @param getSearchesNoClicks.offset - Position of the first item to return. * @param getSearchesNoClicks.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -712,11 +712,11 @@ export function createAnalyticsClient({ * - analytics. * * @param getSearchesNoResults - The getSearchesNoResults object. - * @param getSearchesNoResults.index - Index name to target. - * @param getSearchesNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getSearchesNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getSearchesNoResults.limit - Number of records to return (page size). - * @param getSearchesNoResults.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getSearchesNoResults.index - Index name. + * @param getSearchesNoResults.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getSearchesNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze. + * @param getSearchesNoResults.limit - Number of items to return. + * @param getSearchesNoResults.offset - Position of the first item to return. * @param getSearchesNoResults.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -782,7 +782,7 @@ export function createAnalyticsClient({ * - analytics. * * @param getStatus - The getStatus object. - * @param getStatus.index - Index name to target. + * @param getStatus.index - Index name. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getStatus( @@ -820,11 +820,11 @@ export function createAnalyticsClient({ * - analytics. * * @param getTopCountries - The getTopCountries object. - * @param getTopCountries.index - Index name to target. - * @param getTopCountries.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopCountries.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopCountries.limit - Number of records to return (page size). - * @param getTopCountries.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getTopCountries.index - Index name. + * @param getTopCountries.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopCountries.endDate - End date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopCountries.limit - Number of items to return. + * @param getTopCountries.offset - Position of the first item to return. * @param getTopCountries.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -883,12 +883,12 @@ export function createAnalyticsClient({ * - analytics. * * @param getTopFilterAttributes - The getTopFilterAttributes object. - * @param getTopFilterAttributes.index - Index name to target. + * @param getTopFilterAttributes.index - Index name. * @param getTopFilterAttributes.search - User query. - * @param getTopFilterAttributes.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopFilterAttributes.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopFilterAttributes.limit - Number of records to return (page size). - * @param getTopFilterAttributes.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getTopFilterAttributes.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopFilterAttributes.endDate - End date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopFilterAttributes.limit - Number of items to return. + * @param getTopFilterAttributes.offset - Position of the first item to return. * @param getTopFilterAttributes.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -960,12 +960,12 @@ export function createAnalyticsClient({ * * @param getTopFilterForAttribute - The getTopFilterForAttribute object. * @param getTopFilterForAttribute.attribute - Attribute name. - * @param getTopFilterForAttribute.index - Index name to target. + * @param getTopFilterForAttribute.index - Index name. * @param getTopFilterForAttribute.search - User query. - * @param getTopFilterForAttribute.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopFilterForAttribute.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopFilterForAttribute.limit - Number of records to return (page size). - * @param getTopFilterForAttribute.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getTopFilterForAttribute.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopFilterForAttribute.endDate - End date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopFilterForAttribute.limit - Number of items to return. + * @param getTopFilterForAttribute.offset - Position of the first item to return. * @param getTopFilterForAttribute.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1046,12 +1046,12 @@ export function createAnalyticsClient({ * - analytics. * * @param getTopFiltersNoResults - The getTopFiltersNoResults object. - * @param getTopFiltersNoResults.index - Index name to target. + * @param getTopFiltersNoResults.index - Index name. * @param getTopFiltersNoResults.search - User query. - * @param getTopFiltersNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopFiltersNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopFiltersNoResults.limit - Number of records to return (page size). - * @param getTopFiltersNoResults.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getTopFiltersNoResults.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopFiltersNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopFiltersNoResults.limit - Number of items to return. + * @param getTopFiltersNoResults.offset - Position of the first item to return. * @param getTopFiltersNoResults.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1122,13 +1122,13 @@ export function createAnalyticsClient({ * - analytics. * * @param getTopHits - The getTopHits object. - * @param getTopHits.index - Index name to target. + * @param getTopHits.index - Index name. * @param getTopHits.search - User query. * @param getTopHits.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. - * @param getTopHits.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopHits.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopHits.limit - Number of records to return (page size). - * @param getTopHits.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getTopHits.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopHits.endDate - End date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopHits.limit - Number of items to return. + * @param getTopHits.offset - Position of the first item to return. * @param getTopHits.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1204,14 +1204,14 @@ export function createAnalyticsClient({ * - analytics. * * @param getTopSearches - The getTopSearches object. - * @param getTopSearches.index - Index name to target. + * @param getTopSearches.index - Index name. * @param getTopSearches.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. - * @param getTopSearches.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getTopSearches.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getTopSearches.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getTopSearches.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getTopSearches.orderBy - Reorder the results. * @param getTopSearches.direction - Sorting direction of the results: ascending or descending. - * @param getTopSearches.limit - Number of records to return (page size). - * @param getTopSearches.offset - Position of the starting record. Used for paging. 0 is the first record. + * @param getTopSearches.limit - Number of items to return. + * @param getTopSearches.offset - Position of the first item to return. * @param getTopSearches.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1292,9 +1292,9 @@ export function createAnalyticsClient({ * - analytics. * * @param getUsersCount - The getUsersCount object. - * @param getUsersCount.index - Index name to target. - * @param getUsersCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param getUsersCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param getUsersCount.index - Index name. + * @param getUsersCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze. + * @param getUsersCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze. * @param getUsersCount.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/acl.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/acl.ts index c3522561e7..d7413dac12 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/acl.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/acl.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. + * Access control list permissions. */ export type Acl = | 'addObject' diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/action.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/action.ts index 339db61266..dd3583e54c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/action.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/action.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Type of batch operation. + * Type of indexing operation. */ export type Action = | 'addObject' diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/addApiKeyResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/addApiKeyResponse.ts index 3817c9691e..9f57140d0c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/addApiKeyResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/addApiKeyResponse.ts @@ -7,7 +7,7 @@ export type AddApiKeyResponse = { key: string; /** - * Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ createdAt: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/anchoring.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/anchoring.ts index c77a11939a..cb727242e5 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/anchoring.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/anchoring.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + * Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. */ export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/apiKey.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/apiKey.ts index f30f69756b..665d39c579 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/apiKey.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/apiKey.ts @@ -7,42 +7,42 @@ import type { Acl } from './acl'; */ export type ApiKey = { /** - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + * Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint\'s reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). */ acl: Acl[]; /** - * Description of an API key for you and your team members. + * Description of an API key to help you identify this API key. */ description?: string; /** - * Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + * Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ indexes?: string[]; /** - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * Maximum number of results this API key can retrieve in one query. By default, there\'s no limit. */ maxHitsPerQuery?: number; /** - * Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there\'s no limit. */ maxQueriesPerIPPerHour?: number; /** - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It\'s a URL-encoded query string. + * Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that\'s outside the restricted range. */ queryParameters?: string; /** - * Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + * Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). */ referers?: string[]; /** - * Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can\'t [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app\'s backend. + * Duration (in seconds) after which the API key expires. By default, API keys don\'t expire. */ validity?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts index 71120c73e8..937a1e87e3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts @@ -3,6 +3,6 @@ import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner'; /** - * Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ export type AroundPrecision = AroundPrecisionFromValueInner[] | number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecisionFromValueInner.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecisionFromValueInner.ts index 14a0e3bb76..c3850a800a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecisionFromValueInner.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecisionFromValueInner.ts @@ -1,7 +1,16 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * Range object with lower and upper values in meters to define custom ranges. + */ export type AroundPrecisionFromValueInner = { + /** + * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + */ from?: number; + /** + * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + */ value?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadius.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadius.ts index 6c99817b26..1c4ae8df2b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadius.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadius.ts @@ -3,6 +3,6 @@ import type { AroundRadiusAll } from './aroundRadiusAll'; /** - * [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. */ export type AroundRadius = AroundRadiusAll | number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadiusAll.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadiusAll.ts index 1dd22ed574..e5f1070601 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadiusAll.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundRadiusAll.ts @@ -1,3 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * Return all records with a valid `_geoloc` attribute. Don\'t filter by distance. + */ export type AroundRadiusAll = 'all'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilter.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilter.ts index 98a2e1e7a2..ca83695bf5 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilter.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilter.ts @@ -1,21 +1,21 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Automatic facet Filter. + * Filter or optional filter to be applied to the search. */ export type AutomaticFacetFilter = { /** - * Attribute to filter on. This must match a facet placeholder in the Rule\'s pattern. + * Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. */ facet: string; /** - * Score for the filter. Typically used for optional or disjunctive filters. + * Filter scores to give different weights to individual filters. */ score?: number; /** - * Whether the filter is disjunctive (true) or conjunctive (false). + * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. */ disjunctive?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilters.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilters.ts index 0ac46a30fa..725561f8d2 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/automaticFacetFilters.ts @@ -3,6 +3,6 @@ import type { AutomaticFacetFilter } from './automaticFacetFilter'; /** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. */ export type AutomaticFacetFilters = AutomaticFacetFilter[] | string[]; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts index 3d026541dc..a35d8cbd3d 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts @@ -2,82 +2,87 @@ export type BaseIndexSettings = { /** - * Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn\'t evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + */ + attributesForFaceting?: string[]; + + /** + * Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). */ replicas?: string[]; /** - * Maximum number of hits accessible through pagination. + * Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can\'t be guaranteed. */ paginationLimitedTo?: number; /** - * Attributes that can\'t be retrieved at query time. + * Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don\'t want to include it in the search results. */ unretrievableAttributes?: string[]; /** - * Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. */ disableTypoToleranceOnWords?: string[]; /** - * Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + * Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. */ attributesToTransliterate?: string[]; /** - * Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ camelCaseAttributes?: string[]; /** - * Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + * Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). */ decompoundedAttributes?: Record; /** - * Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ indexLanguages?: string[]; /** - * Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + * Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ disablePrefixOnAttributes?: string[]; /** - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + * Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. */ allowCompressionOfIntegerArray?: boolean; /** - * Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. */ numericAttributesForFiltering?: string[]; /** - * Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren\'t indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. */ separatorsToIndex?: string; /** - * [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. */ searchableAttributes?: string[]; /** - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. */ userData?: any | null; /** - * A list of characters and their normalized replacements to override Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ customNormalization?: Record>; /** - * Name of the deduplication attribute to be used with Algolia\'s [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. */ attributeForDistinct?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchParamsWithoutQuery.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchParamsWithoutQuery.ts index 33825f13f6..95ae5b0395 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchParamsWithoutQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchParamsWithoutQuery.ts @@ -9,12 +9,12 @@ import type { TagFilters } from './tagFilters'; export type BaseSearchParamsWithoutQuery = { /** - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ similarQuery?: string; /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ filters?: string; @@ -27,47 +27,47 @@ export type BaseSearchParamsWithoutQuery = { tagFilters?: TagFilters; /** - * Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ sumOrFiltersScores?: boolean; /** - * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. */ restrictSearchableAttributes?: string[]; /** - * Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ facets?: string[]; /** - * Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ facetingAfterDistinct?: boolean; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page?: number; /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. */ offset?: number; /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). */ length?: number; /** - * Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ aroundLatLng?: string; /** - * Search for entries around a location. The location is automatically computed from the requester\'s IP address. + * Whether to obtain the coordinates from the request\'s IP address. */ aroundLatLngViaIP?: boolean; @@ -76,62 +76,57 @@ export type BaseSearchParamsWithoutQuery = { aroundPrecision?: AroundPrecision; /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn\'t set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set. */ minimumAroundRadius?: number; /** - * Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ insideBoundingBox?: number[][]; /** - * Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ insidePolygon?: number[][]; /** - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ naturalLanguages?: string[]; /** - * Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ ruleContexts?: string[]; /** - * Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ personalizationImpact?: number; /** - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ userToken?: string; /** - * Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * Whether the search response should include detailed ranking information. */ getRankingInfo?: boolean; /** - * Enriches the API\'s response with information about how the query was processed. - */ - explain?: string[]; - - /** - * Whether to take into account an index\'s synonyms for a particular search. + * Whether to take into account an index\'s synonyms for this search. */ synonyms?: boolean; /** - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ clickAnalytics?: boolean; /** - * Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. */ analytics?: boolean; @@ -141,12 +136,12 @@ export type BaseSearchParamsWithoutQuery = { analyticsTags?: string[]; /** - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. */ percentileComputation?: boolean; /** - * Incidates whether this search will be considered in A/B testing. + * Whether to enable A/B testing for this search. */ enableABTest?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchResponse.ts index abd29c39d2..6d3dd06f9b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/baseSearchResponse.ts @@ -22,7 +22,7 @@ export type BaseSearchResponse = Record & { aroundLatLng?: string; /** - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. */ automaticRadius?: string; @@ -44,7 +44,7 @@ export type BaseSearchResponse = Record & { exhaustiveTypo?: boolean; /** - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. */ facets?: Record>; @@ -74,12 +74,12 @@ export type BaseSearchResponse = Record & { message?: string; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; /** - * Number of pages of results for the current query. + * Number of pages of results. */ nbPages: number; @@ -89,7 +89,7 @@ export type BaseSearchResponse = Record & { nbSortedHits?: number; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page: number; @@ -128,7 +128,7 @@ export type BaseSearchResponse = Record & { serverUsed?: string; /** - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. */ userData?: any | null; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/batchDictionaryEntriesParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/batchDictionaryEntriesParams.ts index fe96c34801..1016e47973 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/batchDictionaryEntriesParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/batchDictionaryEntriesParams.ts @@ -3,16 +3,16 @@ import type { BatchDictionaryEntriesRequest } from './batchDictionaryEntriesRequest'; /** - * `batchDictionaryEntries` parameters. + * Request body for updating dictionary entries. */ export type BatchDictionaryEntriesParams = { /** - * Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + * Whether to replace all custom entries in the dictionary with the ones sent with this request. */ clearExistingDictionaryEntries?: boolean; /** - * Operations to batch. + * List of additions and deletions to your dictionaries. */ requests: BatchDictionaryEntriesRequest[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/batchResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/batchResponse.ts index 500715628a..b677024906 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/batchResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/batchResponse.ts @@ -2,12 +2,12 @@ export type BatchResponse = { /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; /** - * Unique object (record) identifiers. + * Unique record identifiers. */ objectIDs: string[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperation.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperation.ts index 8bcf7b0945..d3df17410b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperation.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperation.ts @@ -3,13 +3,13 @@ import type { BuiltInOperationType } from './builtInOperationType'; /** - * To update an attribute without pushing the entire record, you can use these built-in operations. + * Update to perform on the attribute. */ export type BuiltInOperation = { _operation: BuiltInOperationType; /** - * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. */ value: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperationType.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperationType.ts index 71a7cd154f..56d0ed532f 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperationType.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperationType.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Operation to apply to the attribute. + * How to change the attribute. */ export type BuiltInOperationType = | 'Add' diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/clientMethodProps.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/clientMethodProps.ts index 086014edea..400d98c45c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/clientMethodProps.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/clientMethodProps.ts @@ -36,15 +36,15 @@ import type { UpdatedAtResponse } from './updatedAtResponse'; */ export type AddOrUpdateObjectProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * Unique record (object) identifier. + * Unique record identifier. */ objectID: string; /** - * Algolia record. + * The record, a schemaless object with attributes that are useful in the context of search and discovery. */ body: Record; }; @@ -54,7 +54,7 @@ export type AddOrUpdateObjectProps = { */ export type AssignUserIdProps = { /** - * UserID to assign. + * User ID to assign. */ xAlgoliaUserID: string; assignUserIdParams: AssignUserIdParams; @@ -65,7 +65,7 @@ export type AssignUserIdProps = { */ export type BatchProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; batchWriteParams: BatchWriteParams; @@ -76,7 +76,7 @@ export type BatchProps = { */ export type BatchAssignUserIdsProps = { /** - * UserID to assign. + * User ID to assign. */ xAlgoliaUserID: string; batchAssignUserIdsParams: BatchAssignUserIdsParams; @@ -87,7 +87,7 @@ export type BatchAssignUserIdsProps = { */ export type BatchDictionaryEntriesProps = { /** - * Dictionary to search in. + * Dictionary type in which to search. */ dictionaryName: DictionaryType; batchDictionaryEntriesParams: BatchDictionaryEntriesParams; @@ -98,7 +98,7 @@ export type BatchDictionaryEntriesProps = { */ export type BrowseProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; browseParams?: BrowseParams; @@ -109,7 +109,7 @@ export type BrowseProps = { */ export type ClearObjectsProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; }; @@ -119,11 +119,11 @@ export type ClearObjectsProps = { */ export type ClearRulesProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; }; @@ -133,11 +133,11 @@ export type ClearRulesProps = { */ export type ClearSynonymsProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; }; @@ -221,7 +221,7 @@ export type DeleteApiKeyProps = { */ export type DeleteByProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; deleteByParams: DeleteByParams; @@ -232,7 +232,7 @@ export type DeleteByProps = { */ export type DeleteIndexProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; }; @@ -242,11 +242,11 @@ export type DeleteIndexProps = { */ export type DeleteObjectProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * Unique record (object) identifier. + * Unique record identifier. */ objectID: string; }; @@ -256,7 +256,7 @@ export type DeleteObjectProps = { */ export type DeleteRuleProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -264,7 +264,7 @@ export type DeleteRuleProps = { */ objectID: string; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; }; @@ -284,7 +284,7 @@ export type DeleteSourceProps = { */ export type DeleteSynonymProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -292,7 +292,7 @@ export type DeleteSynonymProps = { */ objectID: string; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; }; @@ -312,7 +312,7 @@ export type GetApiKeyProps = { */ export type GetLogsProps = { /** - * First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + * First log entry to retrieve. The most recent entries are listed first. */ offset?: number; /** @@ -320,11 +320,11 @@ export type GetLogsProps = { */ length?: number; /** - * Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. + * Index for which to retrieve log entries. By default, log entries are retrieved for all indices. */ indexName?: string; /** - * Type of log entries to retrieve. When omitted, all log entries are retrieved. + * Type of log entries to retrieve. By default, all log entries are retrieved. */ type?: LogType; }; @@ -334,15 +334,15 @@ export type GetLogsProps = { */ export type GetObjectProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * Unique record (object) identifier. + * Unique record identifier. */ objectID: string; /** - * Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won\'t be retrieved unless the request is authenticated with the admin API key. + * Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key. */ attributesToRetrieve?: string[]; }; @@ -352,7 +352,7 @@ export type GetObjectProps = { */ export type GetRuleProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -366,7 +366,7 @@ export type GetRuleProps = { */ export type GetSettingsProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; }; @@ -376,7 +376,7 @@ export type GetSettingsProps = { */ export type GetSynonymProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -390,7 +390,7 @@ export type GetSynonymProps = { */ export type GetTaskProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -404,7 +404,7 @@ export type GetTaskProps = { */ export type GetUserIdProps = { /** - * UserID to assign. + * User ID to assign. */ userID: string; }; @@ -414,7 +414,7 @@ export type GetUserIdProps = { */ export type HasPendingMappingsProps = { /** - * Indicates whether to include the cluster\'s pending mapping state in the response. + * Whether to include the cluster\'s pending mapping state in the response. */ getClusters?: boolean; }; @@ -424,11 +424,11 @@ export type HasPendingMappingsProps = { */ export type ListIndicesProps = { /** - * Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. + * Requested page of the API response. If `null`, the API response is not paginated. */ page?: number; /** - * Maximum number of hits per page. + * Number of hits per page. */ hitsPerPage?: number; }; @@ -438,11 +438,11 @@ export type ListIndicesProps = { */ export type ListUserIdsProps = { /** - * Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. + * Requested page of the API response. If `null`, the API response is not paginated. */ page?: number; /** - * Maximum number of hits per page. + * Number of hits per page. */ hitsPerPage?: number; }; @@ -452,7 +452,7 @@ export type ListUserIdsProps = { */ export type OperationIndexProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; operationIndexParams: OperationIndexParams; @@ -463,19 +463,19 @@ export type OperationIndexProps = { */ export type PartialUpdateObjectProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * Unique record (object) identifier. + * Unique record identifier. */ objectID: string; /** - * Object with attributes to update. + * Attributes with their values. */ attributesToUpdate: Record; /** - * Indicates whether to create a new record if it doesn\'t exist yet. + * Whether to create a new record if it doesn\'t exist. */ createIfNotExists?: boolean; }; @@ -485,7 +485,7 @@ export type PartialUpdateObjectProps = { */ export type RemoveUserIdProps = { /** - * UserID to assign. + * User ID to assign. */ userID: string; }; @@ -515,11 +515,11 @@ export type RestoreApiKeyProps = { */ export type SaveObjectProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * The Algolia record. + * The record, a schemaless object with attributes that are useful in the context of search and discovery. */ body: Record; }; @@ -529,7 +529,7 @@ export type SaveObjectProps = { */ export type SaveRuleProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -538,7 +538,7 @@ export type SaveRuleProps = { objectID: string; rule: Rule; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; }; @@ -548,16 +548,16 @@ export type SaveRuleProps = { */ export type SaveRulesProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; rules: Rule[]; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; /** - * Indicates whether existing rules should be deleted before adding this batch. + * Whether existing rules should be deleted before adding this batch. */ clearExistingRules?: boolean; }; @@ -567,7 +567,7 @@ export type SaveRulesProps = { */ export type SaveSynonymProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -576,7 +576,7 @@ export type SaveSynonymProps = { objectID: string; synonymHit: SynonymHit; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; }; @@ -586,16 +586,16 @@ export type SaveSynonymProps = { */ export type SaveSynonymsProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; synonymHit: SynonymHit[]; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; /** - * Indicates whether to replace all synonyms in the index with the ones sent with this request. + * Whether to replace all synonyms in the index with the ones sent with this request. */ replaceExistingSynonyms?: boolean; }; @@ -637,7 +637,7 @@ export type LegacySearchMethodProps = LegacySearchQuery[]; */ export type SearchDictionaryEntriesProps = { /** - * Dictionary to search in. + * Dictionary type in which to search. */ dictionaryName: DictionaryType; searchDictionaryEntriesParams: SearchDictionaryEntriesParams; @@ -648,11 +648,11 @@ export type SearchDictionaryEntriesProps = { */ export type SearchForFacetValuesProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** - * Facet name. + * Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. */ facetName: string; searchForFacetValuesRequest?: SearchForFacetValuesRequest; @@ -663,7 +663,7 @@ export type SearchForFacetValuesProps = { */ export type SearchRulesProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; searchRulesParams?: SearchRulesParams; @@ -674,7 +674,7 @@ export type SearchRulesProps = { */ export type SearchSingleIndexProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; searchParams?: SearchParams; @@ -685,7 +685,7 @@ export type SearchSingleIndexProps = { */ export type SearchSynonymsProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -699,12 +699,12 @@ export type SearchSynonymsProps = { */ export type SetSettingsProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; indexSettings: IndexSettings; /** - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ forwardToReplicas?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/condition.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/condition.ts index bb600e8c49..fea1e67764 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/condition.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/condition.ts @@ -4,19 +4,24 @@ import type { Anchoring } from './anchoring'; export type Condition = { /** - * Query pattern syntax. + * Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". */ pattern?: string; anchoring?: Anchoring; /** - * Whether the pattern matches on plurals, synonyms, and typos. + * Whether the pattern should match plurals, synonyms, and typos. */ alternatives?: boolean; /** - * Rule context format: [A-Za-z0-9_-]+). + * An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. */ context?: string; + + /** + * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + */ + filters?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/consequence.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/consequence.ts index be9aa688d4..a24c7e3a82 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/consequence.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/consequence.ts @@ -5,28 +5,28 @@ import type { ConsequenceParams } from './consequenceParams'; import type { Promote } from './promote'; /** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + * Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). */ export type Consequence = { params?: ConsequenceParams; /** - * Records to promote. + * Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. */ promote?: Promote[]; /** - * Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + * Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown. */ filterPromotes?: boolean; /** - * Records to hide. By default, you can hide up to 50 records per rule. + * Records you want to hide from the search results. */ hide?: ConsequenceHide[]; /** - * Custom JSON object that will be appended to the userData array in the response. This object isn\'t interpreted by the API. It\'s limited to 1kB of minified JSON. + * A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1 kB of minified JSON. */ userData?: any | null; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceHide.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceHide.ts index ff8731ed7c..9ef5cf251c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceHide.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceHide.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Unique identifier of the record to hide. + * Object ID of the record to hide. */ export type ConsequenceHide = { /** - * Unique object identifier. + * Unique record identifier. */ objectID: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQuery.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQuery.ts index 464cb5325e..28d8722a34 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQuery.ts @@ -3,6 +3,6 @@ import type { ConsequenceQueryObject } from './consequenceQueryObject'; /** - * When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can\'t do both). + * Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. */ export type ConsequenceQuery = ConsequenceQueryObject | string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQueryObject.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQueryObject.ts index 4aedb781e0..6d12dbc8aa 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQueryObject.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/consequenceQueryObject.ts @@ -4,12 +4,12 @@ import type { Edit } from './edit'; export type ConsequenceQueryObject = { /** - * Words to remove. + * Words to remove from the search query. */ remove?: string[]; /** - * Edits to apply. + * Changes to make to the search query. */ edits?: Edit[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/createdAtResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/createdAtResponse.ts index 23e13dc05f..75ab8fe315 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/createdAtResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/createdAtResponse.ts @@ -5,7 +5,7 @@ */ export type CreatedAtResponse = { /** - * Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ createdAt: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/cursor.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/cursor.ts index b645bb3aae..db36a6129c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/cursor.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/cursor.ts @@ -2,7 +2,7 @@ export type Cursor = { /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ cursor?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/deleteByParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/deleteByParams.ts index 776c9c8d3b..ff6681d834 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/deleteByParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/deleteByParams.ts @@ -9,7 +9,7 @@ export type DeleteByParams = { facetFilters?: FacetFilters; /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ filters?: string; @@ -18,19 +18,19 @@ export type DeleteByParams = { tagFilters?: TagFilters; /** - * Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ aroundLatLng?: string; aroundRadius?: AroundRadius; /** - * Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ insideBoundingBox?: number[][]; /** - * Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ insidePolygon?: number[][]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/deletedAtResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/deletedAtResponse.ts index 58a016bde6..f8ae3d95da 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/deletedAtResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/deletedAtResponse.ts @@ -5,7 +5,7 @@ */ export type DeletedAtResponse = { /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntry.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntry.ts index 807f902708..2a832ca4bc 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntry.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntry.ts @@ -7,27 +7,27 @@ import type { DictionaryEntryState } from './dictionaryEntryState'; */ export type DictionaryEntry = Record & { /** - * Unique identifier for a dictionary object. + * Unique identifier for the dictionary entry. */ objectID: string; /** - * [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ language: string; /** - * Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia\'s standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn\'t empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + * Matching dictionary word for `stopwords` and `compounds` dictionaries. */ word?: string; /** - * Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia\'s standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + * Matching words in the `plurals` dictionary including declensions. */ words?: string[]; /** - * For compound entries, governs the behavior of the `word` parameter. + * Invividual components of a compound word in the `compounds` dictionary. */ decomposition?: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntryState.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntryState.ts index 7851802368..5ea78345dc 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntryState.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryEntryState.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). + * Whether a dictionary entry is active. */ export type DictionaryEntryState = 'disabled' | 'enabled'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryLanguage.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryLanguage.ts index 4335e2cfe0..7858762a1e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryLanguage.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionaryLanguage.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Custom entries for a dictionary. + * Dictionary type. If `null`, this dictionary type isn\'t supported for the language. */ export type DictionaryLanguage = { /** - * If `0`, the dictionary hasn\'t been customized and only contains standard entries provided by Algolia. If `null`, that feature isn\'t available or isn\'t supported for that language. + * Number of custom dictionary entries. */ nbCustomEntries?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionarySettingsParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionarySettingsParams.ts index 67021c7fcd..053d5e85d6 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/dictionarySettingsParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/dictionarySettingsParams.ts @@ -3,7 +3,7 @@ import type { StandardEntries } from './standardEntries'; /** - * Enable or turn off the built-in Algolia stop words for a specific language. + * Turn on or off the built-in Algolia stop words for a specific language. */ export type DictionarySettingsParams = { disableStandardEntries: StandardEntries; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/distinct.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/distinct.ts index 1779d97415..dc87dfb008 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/distinct.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/distinct.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Enables [deduplication or grouping of results (Algolia\'s _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. */ export type Distinct = boolean | number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/edit.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/edit.ts index 9c11afef41..b77d006e35 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/edit.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/edit.ts @@ -11,7 +11,7 @@ export type Edit = { delete?: string; /** - * Text that should be inserted in place of the removed text inside the query string. + * Text to be added in place of the deleted text inside the query string. */ insert?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/exactOnSingleWordQuery.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/exactOnSingleWordQuery.ts index 6d5747887c..bad4a2baec 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/exactOnSingleWordQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/exactOnSingleWordQuery.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t. */ export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/facetFilters.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/facetFilters.ts index e9eae1db38..f83f2eea3a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/facetFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/facetFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it\'s best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ export type FacetFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/facetHits.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/facetHits.ts index 06d0ffb9c3..bd205a61e5 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/facetHits.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/facetHits.ts @@ -7,12 +7,12 @@ export type FacetHits = { value: string; /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ highlighted: string; /** - * Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + * Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). */ count: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/facetOrdering.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/facetOrdering.ts index 4e1af92fd6..9e057ded54 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/facetOrdering.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/facetOrdering.ts @@ -4,13 +4,13 @@ import type { Facets } from './facets'; import type { Value } from './value'; /** - * Defines the ordering of facets (widgets). + * Order of facet names and facet values in your UI. */ export type FacetOrdering = { facets?: Facets; /** - * Ordering of facet values within an individual facet. + * Order of facet values. One object for each facet. */ values?: Record; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/facets.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/facets.ts index b10eb0f3cc..3aefad3a52 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/facets.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/facets.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Ordering of facets (widgets). + * Order of facet names. */ export type Facets = { /** - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ order?: string[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsRequest.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsRequest.ts index a2124fbff2..f1281a71a3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsRequest.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsRequest.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Record retrieval operation. + * Request body for retrieving records. */ export type GetObjectsRequest = { /** @@ -10,12 +10,12 @@ export type GetObjectsRequest = { attributesToRetrieve?: string[]; /** - * Record\'s objectID. + * Object ID for the record to retrieve. */ objectID: string; /** - * Name of the index containing the required records. + * Index from which to retrieve the records. */ indexName: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsResponse.ts index 4e7dd7abef..f69e6c7560 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsResponse.ts @@ -2,7 +2,7 @@ export type GetObjectsResponse> = { /** - * Retrieved results. + * Retrieved records. */ results: T[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/hasPendingMappingsResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/hasPendingMappingsResponse.ts index 1a5421899d..e4eedf62b9 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/hasPendingMappingsResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/hasPendingMappingsResponse.ts @@ -2,7 +2,7 @@ export type HasPendingMappingsResponse = { /** - * Indicates whether there are clusters undergoing migration, creation, or deletion. + * Whether there are clusters undergoing migration, creation, or deletion. */ pending: boolean; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/highlightResultOption.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/highlightResultOption.ts index 7d68dce0e3..0de083fe2d 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/highlightResultOption.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/highlightResultOption.ts @@ -3,18 +3,18 @@ import type { MatchLevel } from './matchLevel'; /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. */ export type HighlightResultOption = { /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ value: string; matchLevel: MatchLevel; /** - * List of words from the query that matched the object. + * List of matched words from the search query. */ matchedWords: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/hit.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/hit.ts index d670f4df4b..9c00281460 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/hit.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/hit.ts @@ -5,21 +5,21 @@ import type { RankingInfo } from './rankingInfo'; import type { SnippetResult } from './snippetResult'; /** - * A single hit. + * Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. */ export type Hit> = T & { /** - * Unique object identifier. + * Unique record identifier. */ objectID: string; /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. */ _highlightResult?: Record; /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. */ _snippetResult?: Record; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/ignorePlurals.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/ignorePlurals.ts index ffea12b13d..e022728563 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/ignorePlurals.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/ignorePlurals.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren\'t considered to be the same (\"foot\" will not find \"feet\"). + * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. */ export type IgnorePlurals = string[] | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts index edfc461022..2174f5bda3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts @@ -117,6 +117,7 @@ export * from './saveObjectResponse'; export * from './saveSynonymResponse'; export * from './scopeType'; export * from './searchDictionaryEntriesParams'; +export * from './searchDictionaryEntriesResponse'; export * from './searchForFacetValuesRequest'; export * from './searchForFacetValuesResponse'; export * from './searchForFacets'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettings.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettings.ts index 4ef41b83da..7f2e9acde9 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettings.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettings.ts @@ -4,6 +4,6 @@ import type { BaseIndexSettings } from './baseIndexSettings'; import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams'; /** - * Algolia index settings. + * Index settings. */ export type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts index 765e380d13..b946517d87 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts @@ -16,47 +16,42 @@ import type { TypoTolerance } from './typoTolerance'; export type IndexSettingsAsSearchParams = { /** - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - attributesForFaceting?: string[]; - - /** - * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ attributesToRetrieve?: string[]; /** - * Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ ranking?: string[]; /** - * Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ customRanking?: string[]; /** - * Relevancy threshold below which less relevant results aren\'t included in the results. + * Relevancy threshold below which less relevant results aren\'t included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ relevancyStrictness?: number; /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ attributesToHighlight?: string[]; /** - * Attributes to _snippet_. \'Snippeting\' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ attributesToSnippet?: string[]; /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ highlightPreTag?: string; /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ highlightPostTag?: string; @@ -66,7 +61,7 @@ export type IndexSettingsAsSearchParams = { snippetEllipsisText?: string; /** - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ restrictHighlightAndSnippetArrays?: boolean; @@ -76,24 +71,24 @@ export type IndexSettingsAsSearchParams = { hitsPerPage?: number; /** - * Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ minWordSizefor1Typo?: number; /** - * Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ minWordSizefor2Typos?: number; typoTolerance?: TypoTolerance; /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ allowTyposOnNumericTokens?: boolean; /** - * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ disableTypoToleranceOnAttributes?: string[]; @@ -102,27 +97,27 @@ export type IndexSettingsAsSearchParams = { removeStopWords?: RemoveStopWords; /** - * Characters that the engine shouldn\'t automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ keepDiacriticsOnCharacters?: string; /** - * Sets your user\'s search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ queryLanguages?: string[]; /** - * [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ decompoundQuery?: boolean; /** - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. */ enableRules?: boolean; /** - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * Whether to enable Personalization. */ enablePersonalization?: boolean; @@ -135,51 +130,51 @@ export type IndexSettingsAsSearchParams = { semanticSearch?: SemanticSearch; /** - * Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ advancedSyntax?: boolean; /** - * Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ optionalWords?: string[]; /** - * Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ disableExactOnAttributes?: string[]; exactOnSingleWordQuery?: ExactOnSingleWordQuery; /** - * Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ alternativesAsExact?: AlternativesAsExact[]; /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[]; distinct?: Distinct; /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ replaceSynonymsInHighlight?: boolean; /** - * Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ minProximity?: number; /** - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI. */ responseFields?: string[]; /** - * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ maxFacetHits?: number; @@ -189,19 +184,19 @@ export type IndexSettingsAsSearchParams = { maxValuesPerFacet?: number; /** - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ sortFacetValuesBy?: string; /** - * When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ attributeCriteriaComputedByMinProximity?: boolean; renderingContent?: RenderingContent; /** - * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ enableReRanking?: boolean; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/log.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/log.ts index 6a6332a8e8..becb942060 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/log.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/log.ts @@ -4,32 +4,32 @@ import type { LogQuery } from './logQuery'; export type Log = { /** - * Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + * Timestamp of the API request in ISO 8601 format. */ timestamp: string; /** - * HTTP method of the performed request. + * HTTP method of the request. */ method: string; /** - * HTTP response code. + * HTTP status code of the response. */ answer_code: string; /** - * Request body. Truncated after 1,000 characters. + * Request body. */ query_body: string; /** - * Answer body. Truncated after 1,000 characters. + * Response body. */ answer: string; /** - * Request URL. + * URL of the API endpoint. */ url: string; @@ -39,7 +39,7 @@ export type Log = { ip: string; /** - * Request headers (API key is obfuscated). + * Request headers (API keys are obfuscated). */ query_headers: string; @@ -49,12 +49,12 @@ export type Log = { sha1: string; /** - * Number of API calls. + * Number of API requests. */ nb_api_calls: string; /** - * Processing time for the query. Doesn\'t include network time. + * Processing time for the query in milliseconds. This doesn\'t include latency due to the network. */ processing_time_ms: string; @@ -69,12 +69,12 @@ export type Log = { query_params?: string; /** - * Number of hits returned for the query. + * Number of search results (hits) returned for the query. */ query_nb_hits?: string; /** - * Performed queries for the given request. + * Queries performed for the given request. */ inner_queries?: LogQuery[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/logQuery.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/logQuery.ts index aa2456008a..c821e3d694 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/logQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/logQuery.ts @@ -7,7 +7,7 @@ export type LogQuery = { index_name?: string; /** - * User identifier. + * A user identifier. */ user_token?: string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/matchLevel.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/matchLevel.ts index 771daa1fe5..a5fa02991f 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/matchLevel.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/matchLevel.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Indicates how well the attribute matched the search query. + * Whether the whole query string matches or only a part. */ export type MatchLevel = 'full' | 'none' | 'partial'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/mode.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/mode.ts index 128d51a2be..37ed887342 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/mode.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/mode.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Search mode the index will use to query for results. + * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. */ export type Mode = 'keywordSearch' | 'neuralSearch'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/multipleBatchResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/multipleBatchResponse.ts index a38ad82004..617d830bb2 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/multipleBatchResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/multipleBatchResponse.ts @@ -2,12 +2,12 @@ export type MultipleBatchResponse = { /** - * TaskIDs per index. + * Task IDs. One for each index. */ taskID: Record; /** - * Unique object (record) identifiers. + * Unique record identifiers. */ objectIDs: string[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/numericFilters.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/numericFilters.ts index dde128ffcc..3db0c89dca 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/numericFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/numericFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. */ export type NumericFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/operationIndexParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/operationIndexParams.ts index 33c36066da..83644f304d 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/operationIndexParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/operationIndexParams.ts @@ -7,12 +7,12 @@ export type OperationIndexParams = { operation: OperationType; /** - * Algolia index name. + * Index name. */ destination: string; /** - * **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + * **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. */ scope?: ScopeType[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/operationType.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/operationType.ts index 4674a69e0f..3b22cc054e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/operationType.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/operationType.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Operation to perform (_move_ or _copy_). + * Operation to perform on the index. */ export type OperationType = 'copy' | 'move'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/optionalFilters.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/optionalFilters.ts index 1836d9315b..f910cd0cfe 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/optionalFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/optionalFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don\'t match the optional filter are still included in the results, only their ranking is affected. + * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don\'t work with numeric attributes. */ export type OptionalFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/params.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/params.ts index dff37195ce..8dbd02c2ff 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/params.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/params.ts @@ -5,7 +5,7 @@ import type { ConsequenceQuery } from './consequenceQuery'; import type { RenderingContent } from './renderingContent'; /** - * Additional search parameters. + * Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. */ export type Params = { query?: ConsequenceQuery; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectID.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectID.ts index aeb5e5e296..6e2f37992e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectID.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectID.ts @@ -5,12 +5,12 @@ */ export type PromoteObjectID = { /** - * Unique identifier of the record to promote. + * Unique record identifier. */ objectID: string; /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ position: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectIDs.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectIDs.ts index cfdaa6d76d..01a5dd5763 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectIDs.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/promoteObjectIDs.ts @@ -5,12 +5,12 @@ */ export type PromoteObjectIDs = { /** - * Unique identifiers of the records to promote. + * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. */ objectIDs: string[]; /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ position: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/queryType.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/queryType.ts index 50424749d0..a609aca0e8 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/queryType.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/queryType.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/rankingInfo.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/rankingInfo.ts index 71de0b00ec..14edcdc592 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/rankingInfo.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/rankingInfo.ts @@ -3,14 +3,17 @@ import type { MatchedGeoLocation } from './matchedGeoLocation'; import type { Personalization } from './personalization'; +/** + * Object with detailed information about the record\'s ranking. + */ export type RankingInfo = { /** - * This field is reserved for advanced usage. + * Whether a filter matched the query. */ filters: number; /** - * Position of the most important matched attribute in the attributes to index list. + * Position of the first matched word in the best matching attribute of the record. */ firstMatchedWord: number; @@ -39,27 +42,27 @@ export type RankingInfo = { nbTypos: number; /** - * Present and set to true if a Rule promoted the hit. + * Whether the record was promoted by a rule. */ promoted: boolean; /** - * When the query contains more than one word, the sum of the distances between matched words (in meters). + * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. */ proximityDistance?: number; /** - * Custom ranking for the object, expressed as a single integer value. + * Overall ranking of the record, expressed as a single integer. This attribute is internal. */ userScore: number; /** - * Number of matched words, including prefixes and typos. + * Number of matched words. */ words: number; /** - * Wether the record are promoted by the re-ranking strategy. + * Whether the record is re-ranked. */ promotedByReRanking?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/reRankingApplyFilter.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/reRankingApplyFilter.ts index 02a02545fb..ced0223fd3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/reRankingApplyFilter.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/reRankingApplyFilter.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. */ export type ReRankingApplyFilter = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/removeStopWords.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/removeStopWords.ts index 33f66341c1..9bdbf91763 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/removeStopWords.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/removeStopWords.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. */ export type RemoveStopWords = string[] | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/removeWordsIfNoResults.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/removeWordsIfNoResults.ts index 2e5b6bdef7..81519af90a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/removeWordsIfNoResults.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/removeWordsIfNoResults.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn\'t match any hits. + * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn\'t return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ export type RemoveWordsIfNoResults = | 'allOptional' diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/renderingContent.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/renderingContent.ts index 9c632b96e2..4385efd64f 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/renderingContent.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/renderingContent.ts @@ -3,7 +3,7 @@ import type { FacetOrdering } from './facetOrdering'; /** - * Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. */ export type RenderingContent = { facetOrdering?: FacetOrdering; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/rule.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/rule.ts index 77a9612943..b002ec88ac 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/rule.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/rule.ts @@ -9,29 +9,29 @@ import type { TimeRange } from './timeRange'; */ export type Rule = { /** - * Unique identifier for a rule object. + * Unique identifier of a rule object. */ objectID: string; /** - * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + * Conditions that trigger a rule. Some consequences require specific conditions or don\'t require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). */ conditions?: Condition[]; consequence?: Consequence; /** - * Description of the rule\'s purpose. This can be helpful for display in the Algolia dashboard. + * Description of the rule\'s purpose to help you distinguish between different rules. */ description?: string; /** - * Indicates whether to enable the rule. If it isn\'t enabled, it isn\'t applied at query time. + * Whether the rule is active. */ enabled?: boolean; /** - * If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + * Time periods when the rule is active. */ validity?: TimeRange[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/saveObjectResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/saveObjectResponse.ts index f955ad1ddd..cb4cbd835e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/saveObjectResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/saveObjectResponse.ts @@ -2,17 +2,17 @@ export type SaveObjectResponse = { /** - * Date of creation (ISO-8601 format). + * Timestamp when the record was added, in ISO 8601 format. */ createdAt: string; /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; /** - * Unique object identifier. + * Unique record identifier. */ objectID?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/saveSynonymResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/saveSynonymResponse.ts index f2dddfb665..d2bc20244b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/saveSynonymResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/saveSynonymResponse.ts @@ -2,7 +2,7 @@ export type SaveSynonymResponse = { /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesParams.ts index b1eedbacd3..035b9a14aa 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesParams.ts @@ -1,16 +1,16 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * `searchDictionaryEntries` parameters. + * Search parameter. */ export type SearchDictionaryEntriesParams = { /** - * Text to search for in an index. + * Search query. */ query: string; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page?: number; @@ -20,7 +20,7 @@ export type SearchDictionaryEntriesParams = { hitsPerPage?: number; /** - * [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ language?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesResponse.ts new file mode 100644 index 0000000000..88880a028b --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchDictionaryEntriesResponse.ts @@ -0,0 +1,25 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import type { DictionaryEntry } from './dictionaryEntry'; + +export type SearchDictionaryEntriesResponse = { + /** + * Dictionary entries matching the search criteria. + */ + hits: DictionaryEntry[]; + + /** + * Requested page of the API response. + */ + page: number; + + /** + * Number of results (hits). + */ + nbHits: number; + + /** + * Number of pages of results. + */ + nbPages: number; +}; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesRequest.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesRequest.ts index 002fa62d3b..03118e161e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesRequest.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesRequest.ts @@ -12,7 +12,7 @@ export type SearchForFacetValuesRequest = { facetQuery?: string; /** - * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ maxFacetHits?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesResponse.ts index a842add7b3..32a0189e7e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetValuesResponse.ts @@ -3,6 +3,9 @@ import type { FacetHits } from './facetHits'; export type SearchForFacetValuesResponse = { + /** + * Matching facet values. + */ facetHits: FacetHits[]; /** diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetsOptions.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetsOptions.ts index 68d26be397..d599af5dc8 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetsOptions.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForFacetsOptions.ts @@ -9,7 +9,7 @@ export type SearchForFacetsOptions = { facet: string; /** - * Algolia index name. + * Index name. */ indexName: string; @@ -19,7 +19,7 @@ export type SearchForFacetsOptions = { facetQuery?: string; /** - * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ maxFacetHits?: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForHitsOptions.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForHitsOptions.ts index f75300dbc8..08edcf8467 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchForHitsOptions.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchForHitsOptions.ts @@ -4,7 +4,7 @@ import type { SearchTypeDefault } from './searchTypeDefault'; export type SearchForHitsOptions = { /** - * Algolia index name. + * Index name. */ indexName: string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchHits.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchHits.ts index 8826d69fb0..13dafbabab 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchHits.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchHits.ts @@ -3,10 +3,13 @@ import type { Hit } from './hit'; export type SearchHits> = Record & { + /** + * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. + */ hits: Array>; /** - * Text to search for in an index. + * Search query. */ query: string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsQuery.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsQuery.ts index 39058cbe1c..9f1926f6cc 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsQuery.ts @@ -2,7 +2,7 @@ export type SearchParamsQuery = { /** - * Text to search for in an index. + * Search query. */ query?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesParams.ts index 18ddeee87b..f95752470e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesParams.ts @@ -7,19 +7,19 @@ import type { Anchoring } from './anchoring'; */ export type SearchRulesParams = { /** - * Rule object query. + * Search query for rules. */ query?: string; anchoring?: Anchoring; /** - * Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + * Only return rules that match the context (exact match). */ context?: string; /** - * Requested page (the first page is page 0). + * Requested page of the API response. */ page?: number; @@ -29,12 +29,7 @@ export type SearchRulesParams = { hitsPerPage?: number; /** - * Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + * If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. */ enabled?: boolean | null; - - /** - * Request options to send with the API call. - */ - requestOptions?: Array>; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesResponse.ts index f160419757..ababfe4d88 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchRulesResponse.ts @@ -4,12 +4,12 @@ import type { Rule } from './rule'; export type SearchRulesResponse = { /** - * Fetched rules. + * Rules that matched the search criteria. */ hits: Rule[]; /** - * Number of fetched rules. + * Number of rules that matched the search criteria. */ nbHits: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchStrategy.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchStrategy.ts index 84d4ae8bea..1bda46977a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchStrategy.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchStrategy.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. + * Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. */ export type SearchStrategy = 'none' | 'stopIfEnoughMatches'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsParams.ts index 2e3596e252..aba75f43f7 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsParams.ts @@ -4,14 +4,14 @@ import type { SynonymType } from './synonymType'; export type SearchSynonymsParams = { /** - * Text to search for in an index. + * Search query. */ query?: string; type?: SynonymType; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page?: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsResponse.ts index ac9e1a4a49..cef9b724f5 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchSynonymsResponse.ts @@ -4,12 +4,12 @@ import type { SynonymHit } from './synonymHit'; export type SearchSynonymsResponse = Record & { /** - * Synonym objects. + * Matching synonyms. */ hits: SynonymHit[]; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsParams.ts index dab21cd148..b92f2a3750 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsParams.ts @@ -15,7 +15,7 @@ export type SearchUserIdsParams = { clusterName?: string; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page?: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsResponse.ts index bf3191c566..6a6c1e1434 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchUserIdsResponse.ts @@ -12,12 +12,12 @@ export type SearchUserIdsResponse = { hits: UserHit[]; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/securedAPIKeyRestrictions.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/securedAPIKeyRestrictions.ts index bba07db289..c230dee7d9 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/securedAPIKeyRestrictions.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/securedAPIKeyRestrictions.ts @@ -6,27 +6,27 @@ export type SecuredAPIKeyRestrictions = { searchParams?: SearchParamsObject; /** - * Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + * Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. */ filters?: string; /** - * Unix timestamp used to set the expiration date of the API key. + * Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. */ validUntil?: number; /** - * Index names that can be queried. + * Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ restrictIndices?: string[]; /** - * IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + * IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. */ restrictSources?: string; /** - * Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don\'t change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + * Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. */ userToken?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/semanticSearch.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/semanticSearch.ts index c9b8322491..86cfd43a0b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/semanticSearch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/semanticSearch.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. */ export type SemanticSearch = { /** - * Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + * Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. */ eventSources?: string[] | null; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/snippetResultOption.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/snippetResultOption.ts index cb21bd0f66..daab65f2d3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/snippetResultOption.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/snippetResultOption.ts @@ -3,11 +3,11 @@ import type { MatchLevel } from './matchLevel'; /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. */ export type SnippetResultOption = { /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ value: string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/sortRemainingBy.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/sortRemainingBy.ts index a5faf046e7..7da7c289ef 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/sortRemainingBy.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/sortRemainingBy.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + * Order of facet values that aren\'t explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don\'t show facet values that aren\'t explicitly positioned.
. */ export type SortRemainingBy = 'alpha' | 'count' | 'hidden'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/tagFilters.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/tagFilters.ts index 1b7e964bda..9660823642 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/tagFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/tagFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`. */ export type TagFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/taskStatus.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/taskStatus.ts index 8f335ad217..169dd7bf2f 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/taskStatus.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/taskStatus.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * _published_ if the task has been processed, _notPublished_ otherwise. + * Task status, `published` if the task is completed, `notPublished` otherwise. */ export type TaskStatus = 'notPublished' | 'published'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/timeRange.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/timeRange.ts index cfd663c8a6..dee6043c91 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/timeRange.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/timeRange.ts @@ -2,12 +2,12 @@ export type TimeRange = { /** - * Lower bound of the time range (Unix timestamp). + * When the rule should start to be active, in Unix epoch time. */ from: number; /** - * Upper bound of the time range (Unix timestamp). + * When the rule should stop to be active, in Unix epoch time. */ until: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/typoTolerance.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/typoTolerance.ts index 58ae716eff..0bd64036f8 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/typoTolerance.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/typoTolerance.ts @@ -3,6 +3,6 @@ import type { TypoToleranceEnum } from './typoToleranceEnum'; /** - * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. */ export type TypoTolerance = TypoToleranceEnum | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/typoToleranceEnum.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/typoToleranceEnum.ts index 05cf7b62da..a33877b0de 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/typoToleranceEnum.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/typoToleranceEnum.ts @@ -1,3 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. + */ export type TypoToleranceEnum = 'min' | 'strict'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtResponse.ts index 9f755ba7bd..f36d93942a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtResponse.ts @@ -5,7 +5,7 @@ */ export type UpdatedAtResponse = { /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtWithObjectIdResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtWithObjectIdResponse.ts index bda44f362c..0c1bde66d6 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtWithObjectIdResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/updatedAtWithObjectIdResponse.ts @@ -5,7 +5,7 @@ */ export type UpdatedAtWithObjectIdResponse = { /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID?: number; @@ -15,7 +15,7 @@ export type UpdatedAtWithObjectIdResponse = { updatedAt?: string; /** - * Unique object identifier. + * Unique record identifier. */ objectID?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/updatedRuleResponse.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/updatedRuleResponse.ts index 9e445c8361..2a2b24689f 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/updatedRuleResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/updatedRuleResponse.ts @@ -2,7 +2,7 @@ export type UpdatedRuleResponse = { /** - * Unique object identifier. + * Unique identifier of a rule object. */ objectID: string; @@ -12,7 +12,7 @@ export type UpdatedRuleResponse = { updatedAt: string; /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/userHit.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/userHit.ts index 6a288e3894..b8caa118a6 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/userHit.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/userHit.ts @@ -4,7 +4,7 @@ import type { UserHighlightResult } from './userHighlightResult'; export type UserHit = { /** - * UserID of the user. + * User ID. */ userID: string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/userId.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/userId.ts index 731250edc5..e46823f8a9 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/userId.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/userId.ts @@ -5,7 +5,7 @@ */ export type UserId = { /** - * UserID of the user. + * User ID. */ userID: string; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/value.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/value.ts index 9bbf488f63..9054c5e5d5 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/value.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/value.ts @@ -4,7 +4,7 @@ import type { SortRemainingBy } from './sortRemainingBy'; export type Value = { /** - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ order?: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts index 0eac8bf7de..e1dcba8f38 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts @@ -106,6 +106,7 @@ import type { ReplaceSourceResponse } from '../model/replaceSourceResponse'; import type { Rule } from '../model/rule'; import type { SaveObjectResponse } from '../model/saveObjectResponse'; import type { SaveSynonymResponse } from '../model/saveSynonymResponse'; +import type { SearchDictionaryEntriesResponse } from '../model/searchDictionaryEntriesResponse'; import type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse'; import type { SearchMethodParams } from '../model/searchMethodParams'; import type { SearchResponse } from '../model/searchResponse'; @@ -592,7 +593,7 @@ export function createSearchClient({ return { copyOperationResponse, batchResponses, moveOperationResponse }; }, /** - * Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + * Creates a new API key with specific permissions and restrictions. * * Required API Key ACLs: * - admin. @@ -632,15 +633,15 @@ export function createSearchClient({ }, /** - * If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject. * * @param addOrUpdateObject - The addOrUpdateObject object. - * @param addOrUpdateObject.indexName - Index on which to perform the request. - * @param addOrUpdateObject.objectID - Unique record (object) identifier. - * @param addOrUpdateObject.body - Algolia record. + * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation. + * @param addOrUpdateObject.objectID - Unique record identifier. + * @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ addOrUpdateObject( @@ -683,7 +684,7 @@ export function createSearchClient({ }, /** - * Add a source to the list of allowed sources. + * Adds a source to the list of allowed sources. * * Required API Key ACLs: * - admin. @@ -723,13 +724,13 @@ export function createSearchClient({ }, /** - * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. * * Required API Key ACLs: * - admin. * * @param assignUserId - The assignUserId object. - * @param assignUserId.xAlgoliaUserID - UserID to assign. + * @param assignUserId.xAlgoliaUserID - User ID to assign. * @param assignUserId.assignUserIdParams - The assignUserIdParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -775,10 +776,10 @@ export function createSearchClient({ }, /** - * To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name. * * @param batch - The batch object. - * @param batch.indexName - Index on which to perform the request. + * @param batch.indexName - Name of the index on which to perform the operation. * @param batch.batchWriteParams - The batchWriteParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -823,13 +824,13 @@ export function createSearchClient({ }, /** - * Assign multiple user IDs to a cluster. **You can\'t _move_ users with this operation.**. + * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**. * * Required API Key ACLs: * - admin. * * @param batchAssignUserIds - The batchAssignUserIds object. - * @param batchAssignUserIds.xAlgoliaUserID - UserID to assign. + * @param batchAssignUserIds.xAlgoliaUserID - User ID to assign. * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -880,13 +881,13 @@ export function createSearchClient({ }, /** - * Add or remove a batch of dictionary entries. + * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. * * Required API Key ACLs: * - editSettings. * * @param batchDictionaryEntries - The batchDictionaryEntries object. - * @param batchDictionaryEntries.dictionaryName - Dictionary to search in. + * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search. * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -934,13 +935,13 @@ export function createSearchClient({ }, /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn\'t support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. * * Required API Key ACLs: * - browse. * * @param browse - The browse object. - * @param browse.indexName - Index on which to perform the request. + * @param browse.indexName - Name of the index on which to perform the operation. * @param browse.browseParams - The browseParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -973,13 +974,13 @@ export function createSearchClient({ }, /** - * Delete the records but leave settings and index-specific API keys untouched. + * Deletes only the records from an index while keeping settings, synonyms, and rules. * * Required API Key ACLs: * - deleteIndex. * * @param clearObjects - The clearObjects object. - * @param clearObjects.indexName - Index on which to perform the request. + * @param clearObjects.indexName - Name of the index on which to perform the operation. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ clearObjects( @@ -1010,14 +1011,14 @@ export function createSearchClient({ }, /** - * Delete all rules in the index. + * Deletes all rules from the index. * * Required API Key ACLs: * - editSettings. * * @param clearRules - The clearRules object. - * @param clearRules.indexName - Index on which to perform the request. - * @param clearRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. + * @param clearRules.indexName - Name of the index on which to perform the operation. + * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ clearRules( @@ -1052,14 +1053,14 @@ export function createSearchClient({ }, /** - * Delete all synonyms in the index. + * Deletes all synonyms from the index. * * Required API Key ACLs: * - editSettings. * * @param clearSynonyms - The clearSynonyms object. - * @param clearSynonyms.indexName - Index on which to perform the request. - * @param clearSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. + * @param clearSynonyms.indexName - Name of the index on which to perform the operation. + * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ clearSynonyms( @@ -1226,7 +1227,7 @@ export function createSearchClient({ }, /** - * Delete an existing API key. The request must be authenticated with the admin API key. + * Deletes the API key. * * Required API Key ACLs: * - admin. @@ -1263,13 +1264,13 @@ export function createSearchClient({ }, /** - * This operation doesn\'t support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn\'t accept empty filters or queries. + * This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). * * Required API Key ACLs: * - deleteIndex. * * @param deleteBy - The deleteBy object. - * @param deleteBy.indexName - Index on which to perform the request. + * @param deleteBy.indexName - Name of the index on which to perform the operation. * @param deleteBy.deleteByParams - The deleteByParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1308,13 +1309,13 @@ export function createSearchClient({ }, /** - * Delete an existing index. + * Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * * Required API Key ACLs: * - deleteIndex. * * @param deleteIndex - The deleteIndex object. - * @param deleteIndex.indexName - Index on which to perform the request. + * @param deleteIndex.indexName - Name of the index on which to perform the operation. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteIndex( @@ -1345,14 +1346,14 @@ export function createSearchClient({ }, /** - * To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). * * Required API Key ACLs: * - deleteObject. * * @param deleteObject - The deleteObject object. - * @param deleteObject.indexName - Index on which to perform the request. - * @param deleteObject.objectID - Unique record (object) identifier. + * @param deleteObject.indexName - Name of the index on which to perform the operation. + * @param deleteObject.objectID - Unique record identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteObject( @@ -1388,15 +1389,15 @@ export function createSearchClient({ }, /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - editSettings. * * @param deleteRule - The deleteRule object. - * @param deleteRule.indexName - Index on which to perform the request. + * @param deleteRule.indexName - Name of the index on which to perform the operation. * @param deleteRule.objectID - Unique identifier of a rule object. - * @param deleteRule.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. + * @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteRule( @@ -1436,7 +1437,7 @@ export function createSearchClient({ }, /** - * Remove a source from the list of allowed sources. + * Deletes a source from the list of allowed sources. * * Required API Key ACLs: * - admin. @@ -1473,15 +1474,15 @@ export function createSearchClient({ }, /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - editSettings. * * @param deleteSynonym - The deleteSynonym object. - * @param deleteSynonym.indexName - Index on which to perform the request. + * @param deleteSynonym.indexName - Name of the index on which to perform the operation. * @param deleteSynonym.objectID - Unique identifier of a synonym object. - * @param deleteSynonym.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. + * @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteSynonym( @@ -1521,7 +1522,7 @@ export function createSearchClient({ }, /** - * Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key. + * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key. * * @param getApiKey - The getApiKey object. * @param getApiKey.key - API key. @@ -1555,7 +1556,7 @@ export function createSearchClient({ }, /** - * Lists Algolia\'s [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language\'s [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + * Lists supported languages with their supported dictionary types and number of custom entries. * * Required API Key ACLs: * - settings. @@ -1580,7 +1581,7 @@ export function createSearchClient({ }, /** - * Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + * Retrieves the languages for which standard dictionary entries are turned off. * * Required API Key ACLs: * - settings. @@ -1605,16 +1606,16 @@ export function createSearchClient({ }, /** - * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There\'s also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN\'s endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself. * * Required API Key ACLs: * - logs. * * @param getLogs - The getLogs object. - * @param getLogs.offset - First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first. * @param getLogs.length - Maximum number of entries to retrieve. - * @param getLogs.indexName - Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. - * @param getLogs.type - Type of log entries to retrieve. When omitted, all log entries are retrieved. + * @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices. + * @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getLogs( @@ -1652,15 +1653,15 @@ export function createSearchClient({ }, /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). * * Required API Key ACLs: * - search. * * @param getObject - The getObject object. - * @param getObject.indexName - Index on which to perform the request. - * @param getObject.objectID - Unique record (object) identifier. - * @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won\'t be retrieved unless the request is authenticated with the admin API key. + * @param getObject.indexName - Name of the index on which to perform the operation. + * @param getObject.objectID - Unique record identifier. + * @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getObject( @@ -1700,7 +1701,7 @@ export function createSearchClient({ }, /** - * Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. * * Required API Key ACLs: * - search. @@ -1742,13 +1743,13 @@ export function createSearchClient({ }, /** - * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - settings. * * @param getRule - The getRule object. - * @param getRule.indexName - Index on which to perform the request. + * @param getRule.indexName - Name of the index on which to perform the operation. * @param getRule.objectID - Unique identifier of a rule object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1785,13 +1786,13 @@ export function createSearchClient({ }, /** - * Return an object containing an index\'s [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + * Retrieves an object with non-null index settings. * * Required API Key ACLs: * - search. * * @param getSettings - The getSettings object. - * @param getSettings.indexName - Index on which to perform the request. + * @param getSettings.indexName - Name of the index on which to perform the operation. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getSettings( @@ -1822,7 +1823,7 @@ export function createSearchClient({ }, /** - * Get all allowed sources (IP addresses). + * Retrieves all allowed IP addresses with access to your application. * * Required API Key ACLs: * - admin. @@ -1845,13 +1846,13 @@ export function createSearchClient({ }, /** - * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - settings. * * @param getSynonym - The getSynonym object. - * @param getSynonym.indexName - Index on which to perform the request. + * @param getSynonym.indexName - Name of the index on which to perform the operation. * @param getSynonym.objectID - Unique identifier of a synonym object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1888,13 +1889,13 @@ export function createSearchClient({ }, /** - * Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status. * * Required API Key ACLs: * - addObject. * * @param getTask - The getTask object. - * @param getTask.indexName - Index on which to perform the request. + * @param getTask.indexName - Name of the index on which to perform the operation. * @param getTask.taskID - Unique task identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1931,7 +1932,7 @@ export function createSearchClient({ }, /** - * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time. + * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. * * Required API Key ACLs: * - admin. @@ -1956,13 +1957,13 @@ export function createSearchClient({ }, /** - * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time. + * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. * * Required API Key ACLs: * - admin. * * @param getUserId - The getUserId object. - * @param getUserId.userID - UserID to assign. + * @param getUserId.userID - User ID to assign. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getUserId( @@ -1999,7 +2000,7 @@ export function createSearchClient({ * - admin. * * @param hasPendingMappings - The hasPendingMappings object. - * @param hasPendingMappings.getClusters - Indicates whether to include the cluster\'s pending mapping state in the response. + * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ hasPendingMappings( @@ -2025,7 +2026,7 @@ export function createSearchClient({ }, /** - * List all API keys associated with your Algolia application, including their permissions and restrictions. + * Lists all API keys associated with your Algolia application, including their permissions and restrictions. * * Required API Key ACLs: * - admin. @@ -2048,7 +2049,7 @@ export function createSearchClient({ }, /** - * List the available clusters in a multi-cluster setup. + * Lists the available clusters in a multi-cluster setup. * * Required API Key ACLs: * - admin. @@ -2073,14 +2074,14 @@ export function createSearchClient({ }, /** - * List indices in an Algolia application. + * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. * * Required API Key ACLs: * - listIndexes. * * @param listIndices - The listIndices object. - * @param listIndices.page - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - * @param listIndices.hitsPerPage - Maximum number of hits per page. + * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated. + * @param listIndices.hitsPerPage - Number of hits per page. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listIndices( @@ -2110,14 +2111,14 @@ export function createSearchClient({ }, /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time. + * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. * * Required API Key ACLs: * - admin. * * @param listUserIds - The listUserIds object. - * @param listUserIds.page - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - * @param listUserIds.hitsPerPage - Maximum number of hits per page. + * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated. + * @param listUserIds.hitsPerPage - Number of hits per page. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listUserIds( @@ -2147,7 +2148,7 @@ export function createSearchClient({ }, /** - * To reduce the time spent on network round trips, you can perform several write actions in a single request. It\'s a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. * * @param batchParams - The batchParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -2184,13 +2185,13 @@ export function createSearchClient({ }, /** - * This `operation`, _copy_ or _move_, will copy or move a source index\'s (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn\'t exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). * * Required API Key ACLs: * - addObject. * * @param operationIndex - The operationIndex object. - * @param operationIndex.indexName - Index on which to perform the request. + * @param operationIndex.indexName - Name of the index on which to perform the operation. * @param operationIndex.operationIndexParams - The operationIndexParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -2240,16 +2241,16 @@ export function createSearchClient({ }, /** - * Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. * * Required API Key ACLs: * - addObject. * * @param partialUpdateObject - The partialUpdateObject object. - * @param partialUpdateObject.indexName - Index on which to perform the request. - * @param partialUpdateObject.objectID - Unique record (object) identifier. - * @param partialUpdateObject.attributesToUpdate - Object with attributes to update. - * @param partialUpdateObject.createIfNotExists - Indicates whether to create a new record if it doesn\'t exist yet. + * @param partialUpdateObject.indexName - Name of the index on which to perform the operation. + * @param partialUpdateObject.objectID - Unique record identifier. + * @param partialUpdateObject.attributesToUpdate - Attributes with their values. + * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ partialUpdateObject( @@ -2301,13 +2302,13 @@ export function createSearchClient({ }, /** - * Remove a userID and its associated data from the multi-clusters. + * Deletes a user ID and its associated data from the clusters. * * Required API Key ACLs: * - admin. * * @param removeUserId - The removeUserId object. - * @param removeUserId.userID - UserID to assign. + * @param removeUserId.userID - User ID to assign. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ removeUserId( @@ -2338,7 +2339,7 @@ export function createSearchClient({ }, /** - * Replace all allowed sources. + * Replaces the list of allowed sources. * * Required API Key ACLs: * - admin. @@ -2373,7 +2374,7 @@ export function createSearchClient({ }, /** - * Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored. * * Required API Key ACLs: * - admin. @@ -2410,14 +2411,14 @@ export function createSearchClient({ }, /** - * Add a record (object) to an index or replace it. If the record doesn\'t contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject. * * @param saveObject - The saveObject object. - * @param saveObject.indexName - Index on which to perform the request. - * @param saveObject.body - The Algolia record. + * @param saveObject.indexName - Name of the index on which to perform the operation. + * @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ saveObject( @@ -2455,16 +2456,16 @@ export function createSearchClient({ }, /** - * To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + * If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). * * Required API Key ACLs: * - editSettings. * * @param saveRule - The saveRule object. - * @param saveRule.indexName - Index on which to perform the request. + * @param saveRule.indexName - Name of the index on which to perform the operation. * @param saveRule.objectID - Unique identifier of a rule object. * @param saveRule.rule - The rule object. - * @param saveRule.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. + * @param saveRule.forwardToReplicas - Whether changes are applied to replica indices. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ saveRule( @@ -2517,16 +2518,16 @@ export function createSearchClient({ }, /** - * Create or update multiple rules. + * Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. * * Required API Key ACLs: * - editSettings. * * @param saveRules - The saveRules object. - * @param saveRules.indexName - Index on which to perform the request. + * @param saveRules.indexName - Name of the index on which to perform the operation. * @param saveRules.rules - The rules object. - * @param saveRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. - * @param saveRules.clearExistingRules - Indicates whether existing rules should be deleted before adding this batch. + * @param saveRules.forwardToReplicas - Whether changes are applied to replica indices. + * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ saveRules( @@ -2577,16 +2578,16 @@ export function createSearchClient({ }, /** - * Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn\'t exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + * If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * * Required API Key ACLs: * - editSettings. * * @param saveSynonym - The saveSynonym object. - * @param saveSynonym.indexName - Index on which to perform the request. + * @param saveSynonym.indexName - Name of the index on which to perform the operation. * @param saveSynonym.objectID - Unique identifier of a synonym object. * @param saveSynonym.synonymHit - The synonymHit object. - * @param saveSynonym.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. + * @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ saveSynonym( @@ -2644,16 +2645,16 @@ export function createSearchClient({ }, /** - * Create or update multiple synonyms. + * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. * * Required API Key ACLs: * - editSettings. * * @param saveSynonyms - The saveSynonyms object. - * @param saveSynonyms.indexName - Index on which to perform the request. + * @param saveSynonyms.indexName - Name of the index on which to perform the operation. * @param saveSynonyms.synonymHit - The synonymHit object. - * @param saveSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. - * @param saveSynonyms.replaceExistingSynonyms - Indicates whether to replace all synonyms in the index with the ones sent with this request. + * @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices. + * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ saveSynonyms( @@ -2705,12 +2706,12 @@ export function createSearchClient({ }, /** - * Send multiple search queries to one or more indices. + * Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. * * Required API Key ACLs: * - search. * - * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries. + * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ search( @@ -2772,13 +2773,13 @@ export function createSearchClient({ }, /** - * Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + * Searches for standard and custom dictionary entries. * * Required API Key ACLs: * - settings. * * @param searchDictionaryEntries - The searchDictionaryEntries object. - * @param searchDictionaryEntries.dictionaryName - Dictionary to search in. + * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search. * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -2788,7 +2789,7 @@ export function createSearchClient({ searchDictionaryEntriesParams, }: SearchDictionaryEntriesProps, requestOptions?: RequestOptions - ): Promise { + ): Promise { if (!dictionaryName) { throw new Error( 'Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.' @@ -2828,14 +2829,14 @@ export function createSearchClient({ }, /** - * [Search for a facet\'s values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn\'t supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**. * * Required API Key ACLs: * - search. * * @param searchForFacetValues - The searchForFacetValues object. - * @param searchForFacetValues.indexName - Index on which to perform the request. - * @param searchForFacetValues.facetName - Facet name. + * @param searchForFacetValues.indexName - Name of the index on which to perform the operation. + * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -2879,13 +2880,13 @@ export function createSearchClient({ }, /** - * Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + * Searches for rules in your index. * * Required API Key ACLs: * - settings. * * @param searchRules - The searchRules object. - * @param searchRules.indexName - Index on which to perform the request. + * @param searchRules.indexName - Name of the index on which to perform the operation. * @param searchRules.searchRulesParams - The searchRulesParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -2920,13 +2921,13 @@ export function createSearchClient({ }, /** - * Return records that match the query. + * Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * * Required API Key ACLs: * - search. * * @param searchSingleIndex - The searchSingleIndex object. - * @param searchSingleIndex.indexName - Index on which to perform the request. + * @param searchSingleIndex.indexName - Name of the index on which to perform the operation. * @param searchSingleIndex.searchParams - The searchParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -2961,13 +2962,13 @@ export function createSearchClient({ }, /** - * Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + * Searches for synonyms in your index. * * Required API Key ACLs: * - settings. * * @param searchSynonyms - The searchSynonyms object. - * @param searchSynonyms.indexName - Index on which to perform the request. + * @param searchSynonyms.indexName - Name of the index on which to perform the operation. * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -3002,7 +3003,7 @@ export function createSearchClient({ }, /** - * Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + * Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). * * Required API Key ACLs: * - admin. @@ -3044,7 +3045,7 @@ export function createSearchClient({ }, /** - * Set stop word settings for a specific language. + * Turns standard stop word dictionary entries on or off for a given language. * * Required API Key ACLs: * - editSettings. @@ -3084,15 +3085,15 @@ export function createSearchClient({ }, /** - * Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + * Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. * * Required API Key ACLs: * - editSettings. * * @param setSettings - The setSettings object. - * @param setSettings.indexName - Index on which to perform the request. + * @param setSettings.indexName - Name of the index on which to perform the operation. * @param setSettings.indexSettings - The indexSettings object. - * @param setSettings.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices. + * @param setSettings.forwardToReplicas - Whether changes are applied to replica indices. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ setSettings( @@ -3134,7 +3135,7 @@ export function createSearchClient({ }, /** - * Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. * * Required API Key ACLs: * - admin. diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/anchoring.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/anchoring.ts index c77a11939a..cb727242e5 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/anchoring.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/anchoring.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + * Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. */ export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts index 71120c73e8..937a1e87e3 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts @@ -3,6 +3,6 @@ import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner'; /** - * Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ export type AroundPrecision = AroundPrecisionFromValueInner[] | number; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecisionFromValueInner.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecisionFromValueInner.ts index 14a0e3bb76..c3850a800a 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecisionFromValueInner.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecisionFromValueInner.ts @@ -1,7 +1,16 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * Range object with lower and upper values in meters to define custom ranges. + */ export type AroundPrecisionFromValueInner = { + /** + * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + */ from?: number; + /** + * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + */ value?: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadius.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadius.ts index 6c99817b26..1c4ae8df2b 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadius.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadius.ts @@ -3,6 +3,6 @@ import type { AroundRadiusAll } from './aroundRadiusAll'; /** - * [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. */ export type AroundRadius = AroundRadiusAll | number; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadiusAll.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadiusAll.ts index 1dd22ed574..e5f1070601 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadiusAll.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundRadiusAll.ts @@ -1,3 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * Return all records with a valid `_geoloc` attribute. Don\'t filter by distance. + */ export type AroundRadiusAll = 'all'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilter.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilter.ts index 98a2e1e7a2..ca83695bf5 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilter.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilter.ts @@ -1,21 +1,21 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Automatic facet Filter. + * Filter or optional filter to be applied to the search. */ export type AutomaticFacetFilter = { /** - * Attribute to filter on. This must match a facet placeholder in the Rule\'s pattern. + * Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. */ facet: string; /** - * Score for the filter. Typically used for optional or disjunctive filters. + * Filter scores to give different weights to individual filters. */ score?: number; /** - * Whether the filter is disjunctive (true) or conjunctive (false). + * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. */ disjunctive?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilters.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilters.ts index 0ac46a30fa..725561f8d2 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/automaticFacetFilters.ts @@ -3,6 +3,6 @@ import type { AutomaticFacetFilter } from './automaticFacetFilter'; /** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. */ export type AutomaticFacetFilters = AutomaticFacetFilter[] | string[]; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendRequest.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendRequest.ts index fee4851d39..0d0a6cd607 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendRequest.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendRequest.ts @@ -2,7 +2,7 @@ export type BaseRecommendRequest = { /** - * Algolia index name. + * Index name. */ indexName: string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendationsQuery.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendationsQuery.ts index 66b9b50ebf..19b95a895d 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendationsQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendationsQuery.ts @@ -7,7 +7,7 @@ export type BaseRecommendationsQuery = { model: RecommendationModels; /** - * Unique object identifier. + * Unique record identifier. */ objectID: string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendedForYouQueryParameters.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendedForYouQueryParameters.ts index 6ea2032960..a7735ead9c 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendedForYouQueryParameters.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/baseRecommendedForYouQueryParameters.ts @@ -2,7 +2,7 @@ export type BaseRecommendedForYouQueryParameters = { /** - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ userToken: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchParamsWithoutQuery.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchParamsWithoutQuery.ts index 33825f13f6..95ae5b0395 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchParamsWithoutQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchParamsWithoutQuery.ts @@ -9,12 +9,12 @@ import type { TagFilters } from './tagFilters'; export type BaseSearchParamsWithoutQuery = { /** - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ similarQuery?: string; /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ filters?: string; @@ -27,47 +27,47 @@ export type BaseSearchParamsWithoutQuery = { tagFilters?: TagFilters; /** - * Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ sumOrFiltersScores?: boolean; /** - * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. */ restrictSearchableAttributes?: string[]; /** - * Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ facets?: string[]; /** - * Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ facetingAfterDistinct?: boolean; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page?: number; /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. */ offset?: number; /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). */ length?: number; /** - * Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ aroundLatLng?: string; /** - * Search for entries around a location. The location is automatically computed from the requester\'s IP address. + * Whether to obtain the coordinates from the request\'s IP address. */ aroundLatLngViaIP?: boolean; @@ -76,62 +76,57 @@ export type BaseSearchParamsWithoutQuery = { aroundPrecision?: AroundPrecision; /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn\'t set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set. */ minimumAroundRadius?: number; /** - * Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ insideBoundingBox?: number[][]; /** - * Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ insidePolygon?: number[][]; /** - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ naturalLanguages?: string[]; /** - * Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ ruleContexts?: string[]; /** - * Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ personalizationImpact?: number; /** - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ userToken?: string; /** - * Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * Whether the search response should include detailed ranking information. */ getRankingInfo?: boolean; /** - * Enriches the API\'s response with information about how the query was processed. - */ - explain?: string[]; - - /** - * Whether to take into account an index\'s synonyms for a particular search. + * Whether to take into account an index\'s synonyms for this search. */ synonyms?: boolean; /** - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ clickAnalytics?: boolean; /** - * Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. */ analytics?: boolean; @@ -141,12 +136,12 @@ export type BaseSearchParamsWithoutQuery = { analyticsTags?: string[]; /** - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. */ percentileComputation?: boolean; /** - * Incidates whether this search will be considered in A/B testing. + * Whether to enable A/B testing for this search. */ enableABTest?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchResponse.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchResponse.ts index abd29c39d2..6d3dd06f9b 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/baseSearchResponse.ts @@ -22,7 +22,7 @@ export type BaseSearchResponse = Record & { aroundLatLng?: string; /** - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. */ automaticRadius?: string; @@ -44,7 +44,7 @@ export type BaseSearchResponse = Record & { exhaustiveTypo?: boolean; /** - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. */ facets?: Record>; @@ -74,12 +74,12 @@ export type BaseSearchResponse = Record & { message?: string; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; /** - * Number of pages of results for the current query. + * Number of pages of results. */ nbPages: number; @@ -89,7 +89,7 @@ export type BaseSearchResponse = Record & { nbSortedHits?: number; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page: number; @@ -128,7 +128,7 @@ export type BaseSearchResponse = Record & { serverUsed?: string; /** - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. */ userData?: any | null; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/clientMethodProps.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/clientMethodProps.ts index 652cfc5119..2ba6a48fc5 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/clientMethodProps.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/clientMethodProps.ts @@ -72,7 +72,7 @@ export type CustomPutProps = { */ export type DeleteRecommendRuleProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -80,7 +80,7 @@ export type DeleteRecommendRuleProps = { */ model: RecommendModels; /** - * Unique record (object) identifier. + * Unique record identifier. */ objectID: string; }; @@ -90,7 +90,7 @@ export type DeleteRecommendRuleProps = { */ export type GetRecommendRuleProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -98,7 +98,7 @@ export type GetRecommendRuleProps = { */ model: RecommendModels; /** - * Unique record (object) identifier. + * Unique record identifier. */ objectID: string; }; @@ -108,7 +108,7 @@ export type GetRecommendRuleProps = { */ export type GetRecommendStatusProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** @@ -126,7 +126,7 @@ export type GetRecommendStatusProps = { */ export type SearchRecommendRulesProps = { /** - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ indexName: string; /** diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/condition.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/condition.ts index bb600e8c49..fea1e67764 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/condition.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/condition.ts @@ -4,19 +4,24 @@ import type { Anchoring } from './anchoring'; export type Condition = { /** - * Query pattern syntax. + * Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". */ pattern?: string; anchoring?: Anchoring; /** - * Whether the pattern matches on plurals, synonyms, and typos. + * Whether the pattern should match plurals, synonyms, and typos. */ alternatives?: boolean; /** - * Rule context format: [A-Za-z0-9_-]+). + * An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. */ context?: string; + + /** + * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + */ + filters?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/consequence.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/consequence.ts index be9aa688d4..a24c7e3a82 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/consequence.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/consequence.ts @@ -5,28 +5,28 @@ import type { ConsequenceParams } from './consequenceParams'; import type { Promote } from './promote'; /** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + * Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). */ export type Consequence = { params?: ConsequenceParams; /** - * Records to promote. + * Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. */ promote?: Promote[]; /** - * Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + * Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown. */ filterPromotes?: boolean; /** - * Records to hide. By default, you can hide up to 50 records per rule. + * Records you want to hide from the search results. */ hide?: ConsequenceHide[]; /** - * Custom JSON object that will be appended to the userData array in the response. This object isn\'t interpreted by the API. It\'s limited to 1kB of minified JSON. + * A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1 kB of minified JSON. */ userData?: any | null; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceHide.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceHide.ts index ff8731ed7c..9ef5cf251c 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceHide.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceHide.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Unique identifier of the record to hide. + * Object ID of the record to hide. */ export type ConsequenceHide = { /** - * Unique object identifier. + * Unique record identifier. */ objectID: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQuery.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQuery.ts index 464cb5325e..28d8722a34 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQuery.ts @@ -3,6 +3,6 @@ import type { ConsequenceQueryObject } from './consequenceQueryObject'; /** - * When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can\'t do both). + * Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. */ export type ConsequenceQuery = ConsequenceQueryObject | string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQueryObject.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQueryObject.ts index 4aedb781e0..6d12dbc8aa 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQueryObject.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/consequenceQueryObject.ts @@ -4,12 +4,12 @@ import type { Edit } from './edit'; export type ConsequenceQueryObject = { /** - * Words to remove. + * Words to remove from the search query. */ remove?: string[]; /** - * Edits to apply. + * Changes to make to the search query. */ edits?: Edit[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/deletedAtResponse.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/deletedAtResponse.ts index 58a016bde6..f8ae3d95da 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/deletedAtResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/deletedAtResponse.ts @@ -5,7 +5,7 @@ */ export type DeletedAtResponse = { /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`. + * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ taskID: number; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/distinct.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/distinct.ts index 1779d97415..dc87dfb008 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/distinct.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/distinct.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Enables [deduplication or grouping of results (Algolia\'s _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. */ export type Distinct = boolean | number; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/edit.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/edit.ts index 9c11afef41..b77d006e35 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/edit.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/edit.ts @@ -11,7 +11,7 @@ export type Edit = { delete?: string; /** - * Text that should be inserted in place of the removed text inside the query string. + * Text to be added in place of the deleted text inside the query string. */ insert?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/exactOnSingleWordQuery.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/exactOnSingleWordQuery.ts index 6d5747887c..bad4a2baec 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/exactOnSingleWordQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/exactOnSingleWordQuery.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t. */ export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/facetFilters.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/facetFilters.ts index e9eae1db38..f83f2eea3a 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/facetFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/facetFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it\'s best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ export type FacetFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/facetOrdering.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/facetOrdering.ts index 4e1af92fd6..9e057ded54 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/facetOrdering.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/facetOrdering.ts @@ -4,13 +4,13 @@ import type { Facets } from './facets'; import type { Value } from './value'; /** - * Defines the ordering of facets (widgets). + * Order of facet names and facet values in your UI. */ export type FacetOrdering = { facets?: Facets; /** - * Ordering of facet values within an individual facet. + * Order of facet values. One object for each facet. */ values?: Record; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/facets.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/facets.ts index b10eb0f3cc..3aefad3a52 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/facets.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/facets.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Ordering of facets (widgets). + * Order of facet names. */ export type Facets = { /** - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ order?: string[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/highlightResultOption.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/highlightResultOption.ts index 7d68dce0e3..0de083fe2d 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/highlightResultOption.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/highlightResultOption.ts @@ -3,18 +3,18 @@ import type { MatchLevel } from './matchLevel'; /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. */ export type HighlightResultOption = { /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ value: string; matchLevel: MatchLevel; /** - * List of words from the query that matched the object. + * List of matched words from the search query. */ matchedWords: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/ignorePlurals.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/ignorePlurals.ts index ffea12b13d..e022728563 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/ignorePlurals.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/ignorePlurals.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren\'t considered to be the same (\"foot\" will not find \"feet\"). + * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. */ export type IgnorePlurals = string[] | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/indexSettingsAsSearchParams.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/indexSettingsAsSearchParams.ts index 765e380d13..b946517d87 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/indexSettingsAsSearchParams.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/indexSettingsAsSearchParams.ts @@ -16,47 +16,42 @@ import type { TypoTolerance } from './typoTolerance'; export type IndexSettingsAsSearchParams = { /** - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - */ - attributesForFaceting?: string[]; - - /** - * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ attributesToRetrieve?: string[]; /** - * Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ ranking?: string[]; /** - * Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ customRanking?: string[]; /** - * Relevancy threshold below which less relevant results aren\'t included in the results. + * Relevancy threshold below which less relevant results aren\'t included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ relevancyStrictness?: number; /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ attributesToHighlight?: string[]; /** - * Attributes to _snippet_. \'Snippeting\' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ attributesToSnippet?: string[]; /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ highlightPreTag?: string; /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ highlightPostTag?: string; @@ -66,7 +61,7 @@ export type IndexSettingsAsSearchParams = { snippetEllipsisText?: string; /** - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ restrictHighlightAndSnippetArrays?: boolean; @@ -76,24 +71,24 @@ export type IndexSettingsAsSearchParams = { hitsPerPage?: number; /** - * Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ minWordSizefor1Typo?: number; /** - * Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ minWordSizefor2Typos?: number; typoTolerance?: TypoTolerance; /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ allowTyposOnNumericTokens?: boolean; /** - * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ disableTypoToleranceOnAttributes?: string[]; @@ -102,27 +97,27 @@ export type IndexSettingsAsSearchParams = { removeStopWords?: RemoveStopWords; /** - * Characters that the engine shouldn\'t automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ keepDiacriticsOnCharacters?: string; /** - * Sets your user\'s search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ queryLanguages?: string[]; /** - * [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ decompoundQuery?: boolean; /** - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. */ enableRules?: boolean; /** - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * Whether to enable Personalization. */ enablePersonalization?: boolean; @@ -135,51 +130,51 @@ export type IndexSettingsAsSearchParams = { semanticSearch?: SemanticSearch; /** - * Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ advancedSyntax?: boolean; /** - * Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ optionalWords?: string[]; /** - * Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ disableExactOnAttributes?: string[]; exactOnSingleWordQuery?: ExactOnSingleWordQuery; /** - * Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ alternativesAsExact?: AlternativesAsExact[]; /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[]; distinct?: Distinct; /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ replaceSynonymsInHighlight?: boolean; /** - * Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ minProximity?: number; /** - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI. */ responseFields?: string[]; /** - * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ maxFacetHits?: number; @@ -189,19 +184,19 @@ export type IndexSettingsAsSearchParams = { maxValuesPerFacet?: number; /** - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ sortFacetValuesBy?: string; /** - * When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ attributeCriteriaComputedByMinProximity?: boolean; renderingContent?: RenderingContent; /** - * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ enableReRanking?: boolean; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/matchLevel.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/matchLevel.ts index 771daa1fe5..a5fa02991f 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/matchLevel.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/matchLevel.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Indicates how well the attribute matched the search query. + * Whether the whole query string matches or only a part. */ export type MatchLevel = 'full' | 'none' | 'partial'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/mode.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/mode.ts index 128d51a2be..37ed887342 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/mode.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/mode.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Search mode the index will use to query for results. + * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. */ export type Mode = 'keywordSearch' | 'neuralSearch'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/numericFilters.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/numericFilters.ts index dde128ffcc..3db0c89dca 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/numericFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/numericFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. */ export type NumericFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/optionalFilters.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/optionalFilters.ts index 1836d9315b..f910cd0cfe 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/optionalFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/optionalFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don\'t match the optional filter are still included in the results, only their ranking is affected. + * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don\'t work with numeric attributes. */ export type OptionalFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/params.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/params.ts index dff37195ce..8dbd02c2ff 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/params.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/params.ts @@ -5,7 +5,7 @@ import type { ConsequenceQuery } from './consequenceQuery'; import type { RenderingContent } from './renderingContent'; /** - * Additional search parameters. + * Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. */ export type Params = { query?: ConsequenceQuery; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectID.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectID.ts index aeb5e5e296..6e2f37992e 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectID.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectID.ts @@ -5,12 +5,12 @@ */ export type PromoteObjectID = { /** - * Unique identifier of the record to promote. + * Unique record identifier. */ objectID: string; /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ position: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectIDs.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectIDs.ts index cfdaa6d76d..01a5dd5763 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectIDs.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/promoteObjectIDs.ts @@ -5,12 +5,12 @@ */ export type PromoteObjectIDs = { /** - * Unique identifiers of the records to promote. + * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. */ objectIDs: string[]; /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ position: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/queryType.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/queryType.ts index 50424749d0..a609aca0e8 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/queryType.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/queryType.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/rankingInfo.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/rankingInfo.ts index 71de0b00ec..14edcdc592 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/rankingInfo.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/rankingInfo.ts @@ -3,14 +3,17 @@ import type { MatchedGeoLocation } from './matchedGeoLocation'; import type { Personalization } from './personalization'; +/** + * Object with detailed information about the record\'s ranking. + */ export type RankingInfo = { /** - * This field is reserved for advanced usage. + * Whether a filter matched the query. */ filters: number; /** - * Position of the most important matched attribute in the attributes to index list. + * Position of the first matched word in the best matching attribute of the record. */ firstMatchedWord: number; @@ -39,27 +42,27 @@ export type RankingInfo = { nbTypos: number; /** - * Present and set to true if a Rule promoted the hit. + * Whether the record was promoted by a rule. */ promoted: boolean; /** - * When the query contains more than one word, the sum of the distances between matched words (in meters). + * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. */ proximityDistance?: number; /** - * Custom ranking for the object, expressed as a single integer value. + * Overall ranking of the record, expressed as a single integer. This attribute is internal. */ userScore: number; /** - * Number of matched words, including prefixes and typos. + * Number of matched words. */ words: number; /** - * Wether the record are promoted by the re-ranking strategy. + * Whether the record is re-ranked. */ promotedByReRanking?: boolean; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/reRankingApplyFilter.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/reRankingApplyFilter.ts index 02a02545fb..ced0223fd3 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/reRankingApplyFilter.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/reRankingApplyFilter.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. */ export type ReRankingApplyFilter = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendHit.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/recommendHit.ts index 937abae77c..f504c1de34 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendHit.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/recommendHit.ts @@ -9,17 +9,17 @@ import type { SnippetResult } from './snippetResult'; */ export type RecommendHit = Record & { /** - * Unique object identifier. + * Unique record identifier. */ objectID: string; /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. */ _highlightResult?: Record; /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. */ _snippetResult?: Record; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendationsHits.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/recommendationsHits.ts index 537ff8bd2f..296284c87a 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendationsHits.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/recommendationsHits.ts @@ -6,7 +6,7 @@ export type RecommendationsHits = { hits: RecommendationsHit[]; /** - * Text to search for in an index. + * Search query. */ query?: string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/removeStopWords.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/removeStopWords.ts index 33f66341c1..9bdbf91763 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/removeStopWords.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/removeStopWords.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. */ export type RemoveStopWords = string[] | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/removeWordsIfNoResults.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/removeWordsIfNoResults.ts index 2e5b6bdef7..81519af90a 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/removeWordsIfNoResults.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/removeWordsIfNoResults.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn\'t match any hits. + * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn\'t return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ export type RemoveWordsIfNoResults = | 'allOptional' diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/renderingContent.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/renderingContent.ts index 9c632b96e2..4385efd64f 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/renderingContent.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/renderingContent.ts @@ -3,7 +3,7 @@ import type { FacetOrdering } from './facetOrdering'; /** - * Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. */ export type RenderingContent = { facetOrdering?: FacetOrdering; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/searchParamsQuery.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/searchParamsQuery.ts index 39058cbe1c..9f1926f6cc 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/searchParamsQuery.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/searchParamsQuery.ts @@ -2,7 +2,7 @@ export type SearchParamsQuery = { /** - * Text to search for in an index. + * Search query. */ query?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesParams.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesParams.ts index f0aa68398e..7cb2c07634 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesParams.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesParams.ts @@ -5,7 +5,7 @@ */ export type SearchRecommendRulesParams = { /** - * Full-text query. + * Search query. */ query?: string; @@ -15,7 +15,7 @@ export type SearchRecommendRulesParams = { context?: string; /** - * Requested page (the first page is page 0). + * Requested page of the API response. */ page?: number; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesResponse.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesResponse.ts index 2d760331b2..1e65875485 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/searchRecommendRulesResponse.ts @@ -9,17 +9,17 @@ export type SearchRecommendRulesResponse = { hits: RuleResponse[]; /** - * Number of hits the search query matched. + * Number of results (hits). */ nbHits: number; /** - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. */ page: number; /** - * Number of pages of results for the current query. + * Number of pages of results. */ nbPages: number; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/semanticSearch.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/semanticSearch.ts index c9b8322491..86cfd43a0b 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/semanticSearch.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/semanticSearch.ts @@ -1,11 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. */ export type SemanticSearch = { /** - * Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + * Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. */ eventSources?: string[] | null; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/snippetResultOption.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/snippetResultOption.ts index cb21bd0f66..daab65f2d3 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/snippetResultOption.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/snippetResultOption.ts @@ -3,11 +3,11 @@ import type { MatchLevel } from './matchLevel'; /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. */ export type SnippetResultOption = { /** - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ value: string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/sortRemainingBy.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/sortRemainingBy.ts index a5faf046e7..7da7c289ef 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/sortRemainingBy.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/sortRemainingBy.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + * Order of facet values that aren\'t explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don\'t show facet values that aren\'t explicitly positioned.
. */ export type SortRemainingBy = 'alpha' | 'count' | 'hidden'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/tagFilters.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/tagFilters.ts index 1b7e964bda..9660823642 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/tagFilters.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/tagFilters.ts @@ -3,6 +3,6 @@ import type { MixedSearchFilters } from './mixedSearchFilters'; /** - * [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`. */ export type TagFilters = MixedSearchFilters[] | string; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/taskStatus.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/taskStatus.ts index 8f335ad217..169dd7bf2f 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/taskStatus.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/taskStatus.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. /** - * _published_ if the task has been processed, _notPublished_ otherwise. + * Task status, `published` if the task is completed, `notPublished` otherwise. */ export type TaskStatus = 'notPublished' | 'published'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/typoTolerance.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/typoTolerance.ts index 58ae716eff..0bd64036f8 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/typoTolerance.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/typoTolerance.ts @@ -3,6 +3,6 @@ import type { TypoToleranceEnum } from './typoToleranceEnum'; /** - * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. */ export type TypoTolerance = TypoToleranceEnum | boolean; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/typoToleranceEnum.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/typoToleranceEnum.ts index 05cf7b62da..a33877b0de 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/typoToleranceEnum.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/typoToleranceEnum.ts @@ -1,3 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. + */ export type TypoToleranceEnum = 'min' | 'strict'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/value.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/value.ts index 9bbf488f63..9054c5e5d5 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/value.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/value.ts @@ -4,7 +4,7 @@ import type { SortRemainingBy } from './sortRemainingBy'; export type Value = { /** - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ order?: string[]; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts b/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts index b8b4c60e67..47e4bd41d5 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts @@ -271,9 +271,9 @@ export function createRecommendClient({ * - editSettings. * * @param deleteRecommendRule - The deleteRecommendRule object. - * @param deleteRecommendRule.indexName - Index on which to perform the request. + * @param deleteRecommendRule.indexName - Name of the index on which to perform the operation. * @param deleteRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * @param deleteRecommendRule.objectID - Unique record (object) identifier. + * @param deleteRecommendRule.objectID - Unique record identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ deleteRecommendRule( @@ -323,9 +323,9 @@ export function createRecommendClient({ * - settings. * * @param getRecommendRule - The getRecommendRule object. - * @param getRecommendRule.indexName - Index on which to perform the request. + * @param getRecommendRule.indexName - Name of the index on which to perform the operation. * @param getRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * @param getRecommendRule.objectID - Unique record (object) identifier. + * @param getRecommendRule.objectID - Unique record identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getRecommendRule( @@ -375,7 +375,7 @@ export function createRecommendClient({ * - editSettings. * * @param getRecommendStatus - The getRecommendStatus object. - * @param getRecommendStatus.indexName - Index on which to perform the request. + * @param getRecommendStatus.indexName - Name of the index on which to perform the operation. * @param getRecommendStatus.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * @param getRecommendStatus.taskID - Unique identifier of a task. Numeric value (up to 64bits). * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -468,7 +468,7 @@ export function createRecommendClient({ * - settings. * * @param searchRecommendRules - The searchRecommendRules object. - * @param searchRecommendRules.indexName - Index on which to perform the request. + * @param searchRecommendRules.indexName - Name of the index on which to perform the operation. * @param searchRecommendRules.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AbtestingClient.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AbtestingClient.kt index 526618369b..e1d02b0fff 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AbtestingClient.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AbtestingClient.kt @@ -179,8 +179,8 @@ public class AbtestingClient( * * Required API Key ACLs: * - analytics - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) - * @param limit Number of records to return (page size). (default to 10) + * @param offset Position of the first item to return. (default to 0) + * @param limit Number of items to return. (default to 10) * @param indexPrefix Only return A/B tests for indices starting with this prefix. * @param indexSuffix Only return A/B tests for indices ending with this suffix. * @param requestOptions additional request configuration. diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AnalyticsClient.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AnalyticsClient.kt index d95a8a73f7..f14833711d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AnalyticsClient.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/AnalyticsClient.kt @@ -121,9 +121,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -150,9 +150,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -179,9 +179,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -208,9 +208,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -237,9 +237,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -266,9 +266,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -295,9 +295,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -324,11 +324,11 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -357,11 +357,11 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -390,7 +390,7 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. + * @param index Index name. * @param requestOptions additional request configuration. */ public suspend fun getStatus(index: String, requestOptions: RequestOptions? = null): GetStatusResponse { @@ -413,11 +413,11 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -446,12 +446,12 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. + * @param index Index name. * @param search User query. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -482,12 +482,12 @@ public class AnalyticsClient( * Required API Key ACLs: * - analytics * @param attribute Attribute name. - * @param index Index name to target. + * @param index Index name. * @param search User query. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -518,12 +518,12 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. + * @param index Index name. * @param search User query. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -553,13 +553,13 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. + * @param index Index name. * @param search User query. * @param clickAnalytics Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -590,14 +590,14 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. + * @param index Index name. * @param clickAnalytics Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param orderBy Reorder the results. (default to searchCount) * @param direction Sorting direction of the results: ascending or descending. (default to asc) - * @param limit Number of records to return (page size). (default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. (default to 0) + * @param limit Number of items to return. (default to 10) + * @param offset Position of the first item to return. (default to 0) * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ @@ -629,9 +629,9 @@ public class AnalyticsClient( * * Required API Key ACLs: * - analytics - * @param index Index name to target. - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * @param index Index name. + * @param startDate Start date (`YYYY-MM-DD`) of the period to analyze. + * @param endDate End date (`YYYY-MM-DD`) of the period to analyze. * @param tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. * @param requestOptions additional request configuration. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/RecommendClient.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/RecommendClient.kt index e37040bf0d..caba227f0f 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/RecommendClient.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/RecommendClient.kt @@ -124,9 +124,9 @@ public class RecommendClient( * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * @param objectID Unique record (object) identifier. + * @param objectID Unique record identifier. * @param requestOptions additional request configuration. */ public suspend fun deleteRecommendRule(indexName: String, model: RecommendModels, objectID: String, requestOptions: RequestOptions? = null): DeletedAtResponse { @@ -147,9 +147,9 @@ public class RecommendClient( * * Required API Key ACLs: * - settings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * @param objectID Unique record (object) identifier. + * @param objectID Unique record identifier. * @param requestOptions additional request configuration. */ public suspend fun getRecommendRule(indexName: String, model: RecommendModels, objectID: String, requestOptions: RequestOptions? = null): RuleResponse { @@ -170,7 +170,7 @@ public class RecommendClient( * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * @param taskID Unique identifier of a task. Numeric value (up to 64bits). * @param requestOptions additional request configuration. @@ -213,7 +213,7 @@ public class RecommendClient( * * Required API Key ACLs: * - settings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * @param searchRecommendRulesParams * @param requestOptions additional request configuration. diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt index b22c3a65fa..b6dfa177a8 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt @@ -32,7 +32,7 @@ public class SearchClient( } /** - * Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + * Creates a new API key with specific permissions and restrictions. * * Required API Key ACLs: * - admin @@ -52,13 +52,13 @@ public class SearchClient( } /** - * If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject - * @param indexName Index on which to perform the request. - * @param objectID Unique record (object) identifier. - * @param body Algolia record. + * @param indexName Name of the index on which to perform the operation. + * @param objectID Unique record identifier. + * @param body The record, a schemaless object with attributes that are useful in the context of search and discovery. * @param requestOptions additional request configuration. */ public suspend fun addOrUpdateObject(indexName: String, objectID: String, body: JsonObject, requestOptions: RequestOptions? = null): UpdatedAtWithObjectIdResponse { @@ -77,7 +77,7 @@ public class SearchClient( } /** - * Add a source to the list of allowed sources. + * Adds a source to the list of allowed sources. * * Required API Key ACLs: * - admin @@ -97,11 +97,11 @@ public class SearchClient( } /** - * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. * * Required API Key ACLs: * - admin - * @param xAlgoliaUserID userID to assign. + * @param xAlgoliaUserID User ID to assign. * @param assignUserIdParams * @param requestOptions additional request configuration. */ @@ -122,8 +122,8 @@ public class SearchClient( } /** - * To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. - * @param indexName Index on which to perform the request. + * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. + * @param indexName Name of the index on which to perform the operation. * @param batchWriteParams * @param requestOptions additional request configuration. */ @@ -141,11 +141,11 @@ public class SearchClient( } /** - * Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + * Assigns multiple user IDs to a cluster. **You can't move users with this operation**. * * Required API Key ACLs: * - admin - * @param xAlgoliaUserID userID to assign. + * @param xAlgoliaUserID User ID to assign. * @param batchAssignUserIdsParams * @param requestOptions additional request configuration. */ @@ -166,11 +166,11 @@ public class SearchClient( } /** - * Add or remove a batch of dictionary entries. + * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. * * Required API Key ACLs: * - editSettings - * @param dictionaryName Dictionary to search in. + * @param dictionaryName Dictionary type in which to search. * @param batchDictionaryEntriesParams * @param requestOptions additional request configuration. */ @@ -187,11 +187,11 @@ public class SearchClient( } /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. * * Required API Key ACLs: * - browse - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param browseParams * @param requestOptions additional request configuration. */ @@ -209,11 +209,11 @@ public class SearchClient( } /** - * Delete the records but leave settings and index-specific API keys untouched. + * Deletes only the records from an index while keeping settings, synonyms, and rules. * * Required API Key ACLs: * - deleteIndex - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param requestOptions additional request configuration. */ public suspend fun clearObjects(indexName: String, requestOptions: RequestOptions? = null): UpdatedAtResponse { @@ -229,12 +229,12 @@ public class SearchClient( } /** - * Delete all rules in the index. + * Deletes all rules from the index. * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. + * @param indexName Name of the index on which to perform the operation. + * @param forwardToReplicas Whether changes are applied to replica indices. * @param requestOptions additional request configuration. */ public suspend fun clearRules(indexName: String, forwardToReplicas: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedAtResponse { @@ -253,12 +253,12 @@ public class SearchClient( } /** - * Delete all synonyms in the index. + * Deletes all synonyms from the index. * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. + * @param indexName Name of the index on which to perform the operation. + * @param forwardToReplicas Whether changes are applied to replica indices. * @param requestOptions additional request configuration. */ public suspend fun clearSynonyms(indexName: String, forwardToReplicas: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedAtResponse { @@ -365,7 +365,7 @@ public class SearchClient( } /** - * Delete an existing API key. The request must be authenticated with the admin API key. + * Deletes the API key. * * Required API Key ACLs: * - admin @@ -385,11 +385,11 @@ public class SearchClient( } /** - * This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + * This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). * * Required API Key ACLs: * - deleteIndex - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param deleteByParams * @param requestOptions additional request configuration. */ @@ -407,11 +407,11 @@ public class SearchClient( } /** - * Delete an existing index. + * Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * * Required API Key ACLs: * - deleteIndex - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param requestOptions additional request configuration. */ public suspend fun deleteIndex(indexName: String, requestOptions: RequestOptions? = null): DeletedAtResponse { @@ -427,12 +427,12 @@ public class SearchClient( } /** - * To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). * * Required API Key ACLs: * - deleteObject - * @param indexName Index on which to perform the request. - * @param objectID Unique record (object) identifier. + * @param indexName Name of the index on which to perform the operation. + * @param objectID Unique record identifier. * @param requestOptions additional request configuration. */ public suspend fun deleteObject(indexName: String, objectID: String, requestOptions: RequestOptions? = null): DeletedAtResponse { @@ -449,13 +449,13 @@ public class SearchClient( } /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param objectID Unique identifier of a rule object. - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. + * @param forwardToReplicas Whether changes are applied to replica indices. * @param requestOptions additional request configuration. */ public suspend fun deleteRule(indexName: String, objectID: String, forwardToReplicas: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedAtResponse { @@ -475,7 +475,7 @@ public class SearchClient( } /** - * Remove a source from the list of allowed sources. + * Deletes a source from the list of allowed sources. * * Required API Key ACLs: * - admin @@ -495,13 +495,13 @@ public class SearchClient( } /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param objectID Unique identifier of a synonym object. - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. + * @param forwardToReplicas Whether changes are applied to replica indices. * @param requestOptions additional request configuration. */ public suspend fun deleteSynonym(indexName: String, objectID: String, forwardToReplicas: Boolean? = null, requestOptions: RequestOptions? = null): DeletedAtResponse { @@ -521,7 +521,7 @@ public class SearchClient( } /** - * Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. * @param key API key. * @param requestOptions additional request configuration. */ @@ -538,7 +538,7 @@ public class SearchClient( } /** - * Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + * Lists supported languages with their supported dictionary types and number of custom entries. * * Required API Key ACLs: * - settings @@ -556,7 +556,7 @@ public class SearchClient( } /** - * Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + * Retrieves the languages for which standard dictionary entries are turned off. * * Required API Key ACLs: * - settings @@ -574,14 +574,14 @@ public class SearchClient( } /** - * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. * * Required API Key ACLs: * - logs - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (default to 0) + * @param offset First log entry to retrieve. The most recent entries are listed first. (default to 0) * @param length Maximum number of entries to retrieve. (default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. (default to all) + * @param indexName Index for which to retrieve log entries. By default, log entries are retrieved for all indices. + * @param type Type of log entries to retrieve. By default, all log entries are retrieved. (default to all) * @param requestOptions additional request configuration. */ public suspend fun getLogs(offset: Int? = null, length: Int? = null, indexName: String? = null, type: LogType? = null, requestOptions: RequestOptions? = null): GetLogsResponse { @@ -602,13 +602,13 @@ public class SearchClient( } /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). * * Required API Key ACLs: * - search - * @param indexName Index on which to perform the request. - * @param objectID Unique record (object) identifier. - * @param attributesToRetrieve Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + * @param indexName Name of the index on which to perform the operation. + * @param objectID Unique record identifier. + * @param attributesToRetrieve Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. * @param requestOptions additional request configuration. */ public suspend fun getObject(indexName: String, objectID: String, attributesToRetrieve: List? = null, requestOptions: RequestOptions? = null): Map { @@ -628,7 +628,7 @@ public class SearchClient( } /** - * Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. * * Required API Key ACLs: * - search @@ -649,11 +649,11 @@ public class SearchClient( } /** - * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - settings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param objectID Unique identifier of a rule object. * @param requestOptions additional request configuration. */ @@ -671,11 +671,11 @@ public class SearchClient( } /** - * Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + * Retrieves an object with non-null index settings. * * Required API Key ACLs: * - search - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param requestOptions additional request configuration. */ public suspend fun getSettings(indexName: String, requestOptions: RequestOptions? = null): IndexSettings { @@ -691,7 +691,7 @@ public class SearchClient( } /** - * Get all allowed sources (IP addresses). + * Retrieves all allowed IP addresses with access to your application. * * Required API Key ACLs: * - admin @@ -709,11 +709,11 @@ public class SearchClient( } /** - * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - settings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param objectID Unique identifier of a synonym object. * @param requestOptions additional request configuration. */ @@ -731,11 +731,11 @@ public class SearchClient( } /** - * Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. * * Required API Key ACLs: * - addObject - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param taskID Unique task identifier. * @param requestOptions additional request configuration. */ @@ -752,7 +752,7 @@ public class SearchClient( } /** - * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin @@ -770,11 +770,11 @@ public class SearchClient( } /** - * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin - * @param userID userID to assign. + * @param userID User ID to assign. * @param requestOptions additional request configuration. */ public suspend fun getUserId(userID: String, requestOptions: RequestOptions? = null): UserId { @@ -794,7 +794,7 @@ public class SearchClient( * * Required API Key ACLs: * - admin - * @param getClusters Indicates whether to include the cluster's pending mapping state in the response. + * @param getClusters Whether to include the cluster's pending mapping state in the response. * @param requestOptions additional request configuration. */ public suspend fun hasPendingMappings(getClusters: Boolean? = null, requestOptions: RequestOptions? = null): HasPendingMappingsResponse { @@ -812,7 +812,7 @@ public class SearchClient( } /** - * List all API keys associated with your Algolia application, including their permissions and restrictions. + * Lists all API keys associated with your Algolia application, including their permissions and restrictions. * * Required API Key ACLs: * - admin @@ -830,7 +830,7 @@ public class SearchClient( } /** - * List the available clusters in a multi-cluster setup. + * Lists the available clusters in a multi-cluster setup. * * Required API Key ACLs: * - admin @@ -848,12 +848,12 @@ public class SearchClient( } /** - * List indices in an Algolia application. + * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. * * Required API Key ACLs: * - listIndexes - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - * @param hitsPerPage Maximum number of hits per page. (default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * @param hitsPerPage Number of hits per page. (default to 100) * @param requestOptions additional request configuration. */ public suspend fun listIndices(page: Int? = null, hitsPerPage: Int? = null, requestOptions: RequestOptions? = null): ListIndicesResponse { @@ -872,12 +872,12 @@ public class SearchClient( } /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - * @param hitsPerPage Maximum number of hits per page. (default to 100) + * @param page Requested page of the API response. If `null`, the API response is not paginated. + * @param hitsPerPage Number of hits per page. (default to 100) * @param requestOptions additional request configuration. */ public suspend fun listUserIds(page: Int? = null, hitsPerPage: Int? = null, requestOptions: RequestOptions? = null): ListUserIdsResponse { @@ -896,7 +896,7 @@ public class SearchClient( } /** - * To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. * @param batchParams * @param requestOptions additional request configuration. */ @@ -913,11 +913,11 @@ public class SearchClient( } /** - * This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). * * Required API Key ACLs: * - addObject - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param operationIndexParams * @param requestOptions additional request configuration. */ @@ -935,14 +935,14 @@ public class SearchClient( } /** - * Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. * * Required API Key ACLs: * - addObject - * @param indexName Index on which to perform the request. - * @param objectID Unique record (object) identifier. - * @param attributesToUpdate Object with attributes to update. - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. (default to true) + * @param indexName Name of the index on which to perform the operation. + * @param objectID Unique record identifier. + * @param attributesToUpdate Attributes with their values. + * @param createIfNotExists Whether to create a new record if it doesn't exist. (default to true) * @param requestOptions additional request configuration. */ public suspend fun partialUpdateObject(indexName: String, objectID: String, attributesToUpdate: Map, createIfNotExists: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedAtWithObjectIdResponse { @@ -963,11 +963,11 @@ public class SearchClient( } /** - * Remove a userID and its associated data from the multi-clusters. + * Deletes a user ID and its associated data from the clusters. * * Required API Key ACLs: * - admin - * @param userID userID to assign. + * @param userID User ID to assign. * @param requestOptions additional request configuration. */ public suspend fun removeUserId(userID: String, requestOptions: RequestOptions? = null): RemoveUserIdResponse { @@ -983,7 +983,7 @@ public class SearchClient( } /** - * Replace all allowed sources. + * Replaces the list of allowed sources. * * Required API Key ACLs: * - admin @@ -1003,7 +1003,7 @@ public class SearchClient( } /** - * Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. * * Required API Key ACLs: * - admin @@ -1023,12 +1023,12 @@ public class SearchClient( } /** - * Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject - * @param indexName Index on which to perform the request. - * @param body The Algolia record. + * @param indexName Name of the index on which to perform the operation. + * @param body The record, a schemaless object with attributes that are useful in the context of search and discovery. * @param requestOptions additional request configuration. */ public suspend fun saveObject(indexName: String, body: JsonObject, requestOptions: RequestOptions? = null): SaveObjectResponse { @@ -1046,14 +1046,14 @@ public class SearchClient( } /** - * To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + * If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param objectID Unique identifier of a rule object. * @param rule - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. + * @param forwardToReplicas Whether changes are applied to replica indices. * @param requestOptions additional request configuration. */ public suspend fun saveRule(indexName: String, objectID: String, rule: Rule, forwardToReplicas: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedRuleResponse { @@ -1074,14 +1074,14 @@ public class SearchClient( } /** - * Create or update multiple rules. + * Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param rules - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this batch. + * @param forwardToReplicas Whether changes are applied to replica indices. + * @param clearExistingRules Whether existing rules should be deleted before adding this batch. * @param requestOptions additional request configuration. */ public suspend fun saveRules(indexName: String, rules: List, forwardToReplicas: Boolean? = null, clearExistingRules: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedAtResponse { @@ -1102,14 +1102,14 @@ public class SearchClient( } /** - * Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + * If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param objectID Unique identifier of a synonym object. * @param synonymHit - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. + * @param forwardToReplicas Whether changes are applied to replica indices. * @param requestOptions additional request configuration. */ public suspend fun saveSynonym(indexName: String, objectID: String, synonymHit: SynonymHit, forwardToReplicas: Boolean? = null, requestOptions: RequestOptions? = null): SaveSynonymResponse { @@ -1130,14 +1130,14 @@ public class SearchClient( } /** - * Create or update multiple synonyms. + * If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param synonymHit - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the ones sent with this request. + * @param forwardToReplicas Whether changes are applied to replica indices. + * @param replaceExistingSynonyms Whether to replace all synonyms in the index with the ones sent with this request. * @param requestOptions additional request configuration. */ public suspend fun saveSynonyms(indexName: String, synonymHit: List, forwardToReplicas: Boolean? = null, replaceExistingSynonyms: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedAtResponse { @@ -1158,11 +1158,11 @@ public class SearchClient( } /** - * Send multiple search queries to one or more indices. + * Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. * * Required API Key ACLs: * - search - * @param searchMethodParams Query requests and strategies. Results will be received in the same order as the queries. + * @param searchMethodParams Muli-search request body. Results are returned in the same order as the requests. * @param requestOptions additional request configuration. */ public suspend fun search(searchMethodParams: SearchMethodParams, requestOptions: RequestOptions? = null): SearchResponses { @@ -1179,15 +1179,15 @@ public class SearchClient( } /** - * Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + * Searches for standard and custom dictionary entries. * * Required API Key ACLs: * - settings - * @param dictionaryName Dictionary to search in. + * @param dictionaryName Dictionary type in which to search. * @param searchDictionaryEntriesParams * @param requestOptions additional request configuration. */ - public suspend fun searchDictionaryEntries(dictionaryName: DictionaryType, searchDictionaryEntriesParams: SearchDictionaryEntriesParams, requestOptions: RequestOptions? = null): UpdatedAtResponse { + public suspend fun searchDictionaryEntries(dictionaryName: DictionaryType, searchDictionaryEntriesParams: SearchDictionaryEntriesParams, requestOptions: RequestOptions? = null): SearchDictionaryEntriesResponse { val requestConfig = RequestConfig( method = RequestMethod.POST, path = listOf("1", "dictionaries", "$dictionaryName", "search"), @@ -1201,12 +1201,12 @@ public class SearchClient( } /** - * [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. * * Required API Key ACLs: * - search - * @param indexName Index on which to perform the request. - * @param facetName Facet name. + * @param indexName Name of the index on which to perform the operation. + * @param facetName Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. * @param searchForFacetValuesRequest * @param requestOptions additional request configuration. */ @@ -1226,11 +1226,11 @@ public class SearchClient( } /** - * Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + * Searches for rules in your index. * * Required API Key ACLs: * - settings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param searchRulesParams * @param requestOptions additional request configuration. */ @@ -1249,11 +1249,11 @@ public class SearchClient( } /** - * Return records that match the query. + * Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * * Required API Key ACLs: * - search - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param searchParams * @param requestOptions additional request configuration. */ @@ -1272,11 +1272,11 @@ public class SearchClient( } /** - * Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + * Searches for synonyms in your index. * * Required API Key ACLs: * - settings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param searchSynonymsParams Body of the `searchSynonyms` operation. * @param requestOptions additional request configuration. */ @@ -1295,7 +1295,7 @@ public class SearchClient( } /** - * Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + * Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). * * Required API Key ACLs: * - admin @@ -1316,7 +1316,7 @@ public class SearchClient( } /** - * Set stop word settings for a specific language. + * Turns standard stop word dictionary entries on or off for a given language. * * Required API Key ACLs: * - editSettings @@ -1336,13 +1336,13 @@ public class SearchClient( } /** - * Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + * Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. * * Required API Key ACLs: * - editSettings - * @param indexName Index on which to perform the request. + * @param indexName Name of the index on which to perform the operation. * @param indexSettings - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. + * @param forwardToReplicas Whether changes are applied to replica indices. * @param requestOptions additional request configuration. */ public suspend fun setSettings(indexName: String, indexSettings: IndexSettings, forwardToReplicas: Boolean? = null, requestOptions: RequestOptions? = null): UpdatedAtResponse { @@ -1362,7 +1362,7 @@ public class SearchClient( } /** - * Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. * * Required API Key ACLs: * - admin diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestResponse.kt index 389db742cc..d5c8659d46 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestResponse.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.* * * @param index A/B test index. * @param abTestID Unique A/B test ID. - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @Serializable public data class ABTestResponse( @@ -20,6 +20,6 @@ public data class ABTestResponse( /** Unique A/B test ID. */ @SerialName(value = "abTestID") val abTestID: Int, - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/SearchNoResultEvent.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/SearchNoResultEvent.kt index 17dea396e8..f9a0d33307 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/SearchNoResultEvent.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/SearchNoResultEvent.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.* * * @param search User query. * @param count Number of occurrences. - * @param nbHits Number of hits the search query matched. + * @param nbHits Number of results (hits). */ @Serializable public data class SearchNoResultEvent( @@ -20,6 +20,6 @@ public data class SearchNoResultEvent( /** Number of occurrences. */ @SerialName(value = "count") val count: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @SerialName(value = "nbHits") val nbHits: Int, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearch.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearch.kt index 0d88e28244..c7d8d481cf 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearch.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearch.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.* * * @param search User query. * @param count Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). - * @param nbHits Number of hits the search query matched. + * @param nbHits Number of results (hits). */ @Serializable public data class TopSearch( @@ -20,6 +20,6 @@ public data class TopSearch( /** Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). */ @SerialName(value = "count") val count: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @SerialName(value = "nbHits") val nbHits: Int, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt index 82b5b5a742..7c0a3351f4 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt @@ -15,7 +15,7 @@ import kotlinx.serialization.json.* * @param trackedSearchCount Number of tracked searches. This is the number of search requests where the `clickAnalytics` parameter is `true`. * @param clickCount Number of click events. * @param conversionCount Number of converted clicks. - * @param nbHits Number of hits the search query matched. + * @param nbHits Number of results (hits). */ @Serializable public data class TopSearchWithAnalytics( @@ -44,6 +44,6 @@ public data class TopSearchWithAnalytics( /** Number of converted clicks. */ @SerialName(value = "conversionCount") val conversionCount: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @SerialName(value = "nbHits") val nbHits: Int, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Anchoring.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Anchoring.kt index 82a193c6dc..02c005415d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Anchoring.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Anchoring.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + * Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. */ @Serializable public enum class Anchoring(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt index d3e2af778a..40fe088146 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. * * Implementations: * - [Int] - *[AroundPrecision.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecisionFromValueInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecisionFromValueInner.kt index 975c4c958e..91f12c5edc 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecisionFromValueInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecisionFromValueInner.kt @@ -5,15 +5,17 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * AroundPrecisionFromValueInner + * Range object with lower and upper values in meters to define custom ranges. * - * @param from - * @param `value` + * @param from Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + * @param `value` Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @Serializable public data class AroundPrecisionFromValueInner( + /** Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @SerialName(value = "from") val from: Int? = null, + /** Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @SerialName(value = "value") val `value`: Int? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadius.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadius.kt index 64e5c3ea87..9d155232ae 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadius.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadius.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. * * Implementations: * - [AroundRadiusAll] diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadiusAll.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadiusAll.kt index 2e28b218ac..662092e1d9 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadiusAll.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundRadiusAll.kt @@ -3,6 +3,9 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* +/** + * Return all records with a valid `_geoloc` attribute. Don't filter by distance. + */ @Serializable public enum class AroundRadiusAll(public val value: kotlin.String) : AroundRadius { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilter.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilter.kt index e000c08735..02df8369f3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilter.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilter.kt @@ -5,21 +5,21 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Automatic facet Filter. + * Filter or optional filter to be applied to the search. * - * @param facet Attribute to filter on. This must match a facet placeholder in the Rule's pattern. - * @param score Score for the filter. Typically used for optional or disjunctive filters. - * @param disjunctive Whether the filter is disjunctive (true) or conjunctive (false). + * @param facet Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. + * @param score Filter scores to give different weights to individual filters. + * @param disjunctive Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. */ @Serializable public data class AutomaticFacetFilter( - /** Attribute to filter on. This must match a facet placeholder in the Rule's pattern. */ + /** Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. */ @SerialName(value = "facet") val facet: String, - /** Score for the filter. Typically used for optional or disjunctive filters. */ + /** Filter scores to give different weights to individual filters. */ @SerialName(value = "score") val score: Int? = null, - /** Whether the filter is disjunctive (true) or conjunctive (false). */ + /** Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. */ @SerialName(value = "disjunctive") val disjunctive: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilters.kt index 8a94c96485..cc60018308 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AutomaticFacetFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. * * Implementations: * - [List] - *[AutomaticFacetFilters.ofListOfAutomaticFacetFilter]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendRequest.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendRequest.kt index b5d125fae1..2c37b26bca 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendRequest.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendRequest.kt @@ -7,14 +7,14 @@ import kotlinx.serialization.json.* /** * BaseRecommendRequest * - * @param indexName Algolia index name. + * @param indexName Index name. * @param threshold Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. * @param maxRecommendations Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. */ @Serializable public data class BaseRecommendRequest( - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, /** Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendationsQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendationsQuery.kt index b5d9e9843a..cfbafca943 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendationsQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendationsQuery.kt @@ -8,7 +8,7 @@ import kotlinx.serialization.json.* * BaseRecommendationsQuery * * @param model - * @param objectID Unique object identifier. + * @param objectID Unique record identifier. * @param queryParameters * @param fallbackParameters */ @@ -17,7 +17,7 @@ public data class BaseRecommendationsQuery( @SerialName(value = "model") val model: RecommendationModels, - /** Unique object identifier. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String, @SerialName(value = "queryParameters") val queryParameters: SearchParamsObject? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendedForYouQueryParameters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendedForYouQueryParameters.kt index e397bc34d2..21bd39e1e5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendedForYouQueryParameters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseRecommendedForYouQueryParameters.kt @@ -7,11 +7,11 @@ import kotlinx.serialization.json.* /** * BaseRecommendedForYouQueryParameters * - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @Serializable public data class BaseRecommendedForYouQueryParameters( - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParams.kt index c150c759fb..832af27eca 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParams.kt @@ -7,50 +7,49 @@ import kotlinx.serialization.json.* /** * BaseSearchParams * - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. */ @Serializable public data class BaseSearchParams( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -61,79 +60,76 @@ public data class BaseSearchParams( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParamsWithoutQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParamsWithoutQuery.kt index 002664689a..3d5802b1d6 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParamsWithoutQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchParamsWithoutQuery.kt @@ -7,46 +7,45 @@ import kotlinx.serialization.json.* /** * BaseSearchParamsWithoutQuery * - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. */ @Serializable public data class BaseSearchParamsWithoutQuery( - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -57,79 +56,76 @@ public data class BaseSearchParamsWithoutQuery( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchResponse.kt index 9ea170b0b1..849a913b83 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/BaseSearchResponse.kt @@ -11,19 +11,19 @@ import kotlinx.serialization.json.* * BaseSearchResponse * * @param hitsPerPage Number of hits per page. - * @param nbHits Number of hits the search query matched. - * @param nbPages Number of pages of results for the current query. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param nbHits Number of results (hits). + * @param nbPages Number of pages of results. + * @param page Page of search results to retrieve. * @param processingTimeMS Time the server took to process the request, in milliseconds. * @param abTestID A/B test ID. This is only included in the response for indices that are part of an A/B test. * @param abTestVariantID Variant ID. This is only included in the response for indices that are part of an A/B test. * @param aroundLatLng Computed geographical location. - * @param automaticRadius Automatically-computed radius. + * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. - * @param facets Mapping of each facet name to the corresponding facet counts. + * @param facets Facet counts. * @param facetsStats Statistics for numerical facets. * @param index Index name used for the query. * @param indexUsed Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query. @@ -36,7 +36,7 @@ import kotlinx.serialization.json.* * @param renderingContent * @param serverTimeMS Time the server took to process the request, in milliseconds. * @param serverUsed Host name of the server that processed the request. - * @param userData Lets you store custom data in your indices. + * @param userData An object with custom data. You can store up to 32 kB as custom data. * @param queryID Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ @Serializable(BaseSearchResponseSerializer::class) @@ -45,13 +45,13 @@ public data class BaseSearchResponse( /** Number of hits per page. */ val hitsPerPage: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ val nbHits: Int, - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ val nbPages: Int, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ val page: Int, /** Time the server took to process the request, in milliseconds. */ @@ -66,7 +66,7 @@ public data class BaseSearchResponse( /** Computed geographical location. */ val aroundLatLng: String? = null, - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ val automaticRadius: String? = null, val exhaustive: Exhaustive? = null, @@ -83,7 +83,7 @@ public data class BaseSearchResponse( @Deprecated(message = "This property is deprecated.") val exhaustiveTypo: Boolean? = null, - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ val facets: Map>? = null, /** Statistics for numerical facets. */ @@ -120,7 +120,7 @@ public data class BaseSearchResponse( /** Host name of the server that processed the request. */ val serverUsed: String? = null, - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ val userData: JsonElement? = null, /** Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Condition.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Condition.kt index ab783bf824..f627f92f43 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Condition.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Condition.kt @@ -7,22 +7,26 @@ import kotlinx.serialization.json.* /** * Condition * - * @param pattern Query pattern syntax. + * @param pattern Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". * @param anchoring - * @param alternatives Whether the pattern matches on plurals, synonyms, and typos. - * @param context Rule context format: [A-Za-z0-9_-]+). + * @param alternatives Whether the pattern should match plurals, synonyms, and typos. + * @param context An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. + * @param filters Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. */ @Serializable public data class Condition( - /** Query pattern syntax. */ + /** Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". */ @SerialName(value = "pattern") val pattern: String? = null, @SerialName(value = "anchoring") val anchoring: Anchoring? = null, - /** Whether the pattern matches on plurals, synonyms, and typos. */ + /** Whether the pattern should match plurals, synonyms, and typos. */ @SerialName(value = "alternatives") val alternatives: Boolean? = null, - /** Rule context format: [A-Za-z0-9_-]+). */ + /** An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. */ @SerialName(value = "context") val context: String? = null, + + /** Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. */ + @SerialName(value = "filters") val filters: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Consequence.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Consequence.kt index 73e4184311..5037ce5a08 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Consequence.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Consequence.kt @@ -5,28 +5,28 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + * Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). * * @param params - * @param promote Records to promote. - * @param filterPromotes Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. - * @param hide Records to hide. By default, you can hide up to 50 records per rule. - * @param userData Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + * @param promote Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. + * @param filterPromotes Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. + * @param hide Records you want to hide from the search results. + * @param userData A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. */ @Serializable public data class Consequence( @SerialName(value = "params") val params: ConsequenceParams? = null, - /** Records to promote. */ + /** Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. */ @SerialName(value = "promote") val promote: List? = null, - /** Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. */ + /** Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. */ @SerialName(value = "filterPromotes") val filterPromotes: Boolean? = null, - /** Records to hide. By default, you can hide up to 50 records per rule. */ + /** Records you want to hide from the search results. */ @SerialName(value = "hide") val hide: List? = null, - /** Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. */ + /** A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. */ @SerialName(value = "userData") val userData: JsonElement? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceHide.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceHide.kt index 8491722198..fa3cfc2054 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceHide.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceHide.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Unique identifier of the record to hide. + * Object ID of the record to hide. * - * @param objectID Unique object identifier. + * @param objectID Unique record identifier. */ @Serializable public data class ConsequenceHide( - /** Unique object identifier. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceParams.kt index 3a37507058..8a63f90730 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceParams.kt @@ -7,82 +7,80 @@ import kotlinx.serialization.json.* /** * ConsequenceParams * - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter * @param query * @param automaticFacetFilters @@ -91,10 +89,10 @@ import kotlinx.serialization.json.* @Serializable public data class ConsequenceParams( - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -105,149 +103,143 @@ public data class ConsequenceParams( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -258,49 +250,49 @@ public data class ConsequenceParams( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQuery.kt index 300b882327..7aed7248c5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQuery.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + * Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. * * Implementations: * - [ConsequenceQueryObject] diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQueryObject.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQueryObject.kt index 79194143aa..0d1f48ab2e 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQueryObject.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ConsequenceQueryObject.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * ConsequenceQueryObject * - * @param remove Words to remove. - * @param edits Edits to apply. + * @param remove Words to remove from the search query. + * @param edits Changes to make to the search query. */ @Serializable public data class ConsequenceQueryObject( - /** Words to remove. */ + /** Words to remove from the search query. */ @SerialName(value = "remove") val remove: List? = null, - /** Edits to apply. */ + /** Changes to make to the search query. */ @SerialName(value = "edits") val edits: List? = null, ) : ConsequenceQuery diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/DeletedAtResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/DeletedAtResponse.kt index 14578d64d1..bdb0aa73e3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/DeletedAtResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/DeletedAtResponse.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.json.* /** * Response, taskID, and deletion timestamp. * - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * @param deletedAt Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @Serializable public data class DeletedAtResponse( - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, /** Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Distinct.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Distinct.kt index e406bfab56..05c331c838 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Distinct.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Distinct.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. * * Implementations: * - [Boolean] - *[Distinct.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Edit.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Edit.kt index ec6a2f7456..60f7345fe5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Edit.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Edit.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.* * * @param type * @param delete Text or patterns to remove from the query string. - * @param insert Text that should be inserted in place of the removed text inside the query string. + * @param insert Text to be added in place of the deleted text inside the query string. */ @Serializable public data class Edit( @@ -19,6 +19,6 @@ public data class Edit( /** Text or patterns to remove from the query string. */ @SerialName(value = "delete") val delete: String? = null, - /** Text that should be inserted in place of the removed text inside the query string. */ + /** Text to be added in place of the deleted text inside the query string. */ @SerialName(value = "insert") val insert: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ExactOnSingleWordQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ExactOnSingleWordQuery.kt index bb73f9c0fd..df02fc116c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ExactOnSingleWordQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ExactOnSingleWordQuery.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. */ @Serializable public enum class ExactOnSingleWordQuery(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetFilters.kt index ce3b4371dc..5aacfdbf4b 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. * * Implementations: * - [List] - *[FacetFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetOrdering.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetOrdering.kt index de775c4627..5de26fec60 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetOrdering.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FacetOrdering.kt @@ -5,16 +5,16 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Defines the ordering of facets (widgets). + * Order of facet names and facet values in your UI. * * @param facets - * @param values Ordering of facet values within an individual facet. + * @param values Order of facet values. One object for each facet. */ @Serializable public data class FacetOrdering( @SerialName(value = "facets") val facets: Facets? = null, - /** Ordering of facet values within an individual facet. */ + /** Order of facet values. One object for each facet. */ @SerialName(value = "values") val values: Map? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Facets.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Facets.kt index c3fddba0a7..64a7598de4 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Facets.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Facets.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Ordering of facets (widgets). + * Order of facet names. * - * @param order Pinned order of facet lists. + * @param order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ @Serializable public data class Facets( - /** Pinned order of facet lists. */ + /** Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ @SerialName(value = "order") val order: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/HighlightResultOption.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/HighlightResultOption.kt index 0422e69468..391b42ffbb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/HighlightResultOption.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/HighlightResultOption.kt @@ -5,22 +5,22 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. * - * @param `value` Markup text with `facetQuery` matches highlighted. + * @param `value` Highlighted attribute value, including HTML tags. * @param matchLevel - * @param matchedWords List of words from the query that matched the object. + * @param matchedWords List of matched words from the search query. * @param fullyHighlighted Whether the entire attribute value is highlighted. */ @Serializable public data class HighlightResultOption( - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @SerialName(value = "value") val `value`: String, @SerialName(value = "matchLevel") val matchLevel: MatchLevel, - /** List of words from the query that matched the object. */ + /** List of matched words from the search query. */ @SerialName(value = "matchedWords") val matchedWords: List, /** Whether the entire attribute value is highlighted. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IgnorePlurals.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IgnorePlurals.kt index 208381df32..2a0ab70321 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IgnorePlurals.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IgnorePlurals.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. * * Implementations: * - [Boolean] - *[IgnorePlurals.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IndexSettingsAsSearchParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IndexSettingsAsSearchParams.kt index c343059f04..41c8353891 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IndexSettingsAsSearchParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/IndexSettingsAsSearchParams.kt @@ -7,122 +7,118 @@ import kotlinx.serialization.json.* /** * IndexSettingsAsSearchParams * - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter */ @Serializable public data class IndexSettingsAsSearchParams( - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -133,49 +129,49 @@ public data class IndexSettingsAsSearchParams( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/MatchLevel.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/MatchLevel.kt index e4f79c1cd0..32bd883125 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/MatchLevel.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/MatchLevel.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * Indicates how well the attribute matched the search query. + * Whether the whole query string matches or only a part. */ @Serializable public enum class MatchLevel(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Mode.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Mode.kt index fa8e006b15..f56842d2e8 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Mode.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Mode.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * Search mode the index will use to query for results. + * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. */ @Serializable public enum class Mode(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/NumericFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/NumericFilters.kt index a5ffbf0e4a..95a3bb485b 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/NumericFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/NumericFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. * * Implementations: * - [List] - *[NumericFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/OptionalFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/OptionalFilters.kt index 6eb9da0ddb..869099b691 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/OptionalFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/OptionalFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. * * Implementations: * - [List] - *[OptionalFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Params.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Params.kt index c406f4871a..c8531b952c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Params.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Params.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Additional search parameters. + * Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. * * @param query * @param automaticFacetFilters diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectID.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectID.kt index ea2b6b911d..9dbc1c53af 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectID.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectID.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * Record to promote. * - * @param objectID Unique identifier of the record to promote. - * @param position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param objectID Unique record identifier. + * @param position Position in the search results where you want to show the promoted records. */ @Serializable public data class PromoteObjectID( - /** Unique identifier of the record to promote. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String, - /** The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. */ + /** Position in the search results where you want to show the promoted records. */ @SerialName(value = "position") val position: Int, ) : Promote diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectIDs.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectIDs.kt index 2f19dc4399..b0f9b9ac27 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectIDs.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/PromoteObjectIDs.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * Records to promote. * - * @param objectIDs Unique identifiers of the records to promote. - * @param position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param objectIDs Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. + * @param position Position in the search results where you want to show the promoted records. */ @Serializable public data class PromoteObjectIDs( - /** Unique identifiers of the records to promote. */ + /** Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. */ @SerialName(value = "objectIDs") val objectIDs: List, - /** The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. */ + /** Position in the search results where you want to show the promoted records. */ @SerialName(value = "position") val position: Int, ) : Promote diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/QueryType.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/QueryType.kt index 4df79fd6b2..efc9f9ba69 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/QueryType.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/QueryType.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ @Serializable public enum class QueryType(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RankingInfo.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RankingInfo.kt index 694ff5724e..b85ead4c8e 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RankingInfo.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RankingInfo.kt @@ -5,29 +5,29 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * RankingInfo + * Object with detailed information about the record's ranking. * - * @param filters This field is reserved for advanced usage. - * @param firstMatchedWord Position of the most important matched attribute in the attributes to index list. + * @param filters Whether a filter matched the query. + * @param firstMatchedWord Position of the first matched word in the best matching attribute of the record. * @param geoDistance Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). * @param nbExactWords Number of exactly matched words. * @param nbTypos Number of typos encountered when matching the record. - * @param promoted Present and set to true if a Rule promoted the hit. - * @param userScore Custom ranking for the object, expressed as a single integer value. - * @param words Number of matched words, including prefixes and typos. + * @param promoted Whether the record was promoted by a rule. + * @param userScore Overall ranking of the record, expressed as a single integer. This attribute is internal. + * @param words Number of matched words. * @param geoPrecision Precision used when computing the geo distance, in meters. * @param matchedGeoLocation * @param personalization - * @param proximityDistance When the query contains more than one word, the sum of the distances between matched words (in meters). - * @param promotedByReRanking Wether the record are promoted by the re-ranking strategy. + * @param proximityDistance Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. + * @param promotedByReRanking Whether the record is re-ranked. */ @Serializable public data class RankingInfo( - /** This field is reserved for advanced usage. */ + /** Whether a filter matched the query. */ @SerialName(value = "filters") val filters: Int, - /** Position of the most important matched attribute in the attributes to index list. */ + /** Position of the first matched word in the best matching attribute of the record. */ @SerialName(value = "firstMatchedWord") val firstMatchedWord: Int, /** Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). */ @@ -39,13 +39,13 @@ public data class RankingInfo( /** Number of typos encountered when matching the record. */ @SerialName(value = "nbTypos") val nbTypos: Int, - /** Present and set to true if a Rule promoted the hit. */ + /** Whether the record was promoted by a rule. */ @SerialName(value = "promoted") val promoted: Boolean, - /** Custom ranking for the object, expressed as a single integer value. */ + /** Overall ranking of the record, expressed as a single integer. This attribute is internal. */ @SerialName(value = "userScore") val userScore: Int, - /** Number of matched words, including prefixes and typos. */ + /** Number of matched words. */ @SerialName(value = "words") val words: Int, /** Precision used when computing the geo distance, in meters. */ @@ -55,9 +55,9 @@ public data class RankingInfo( @SerialName(value = "personalization") val personalization: Personalization? = null, - /** When the query contains more than one word, the sum of the distances between matched words (in meters). */ + /** Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. */ @SerialName(value = "proximityDistance") val proximityDistance: Int? = null, - /** Wether the record are promoted by the re-ranking strategy. */ + /** Whether the record is re-ranked. */ @SerialName(value = "promotedByReRanking") val promotedByReRanking: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ReRankingApplyFilter.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ReRankingApplyFilter.kt index 8183b9bb2a..29f57bf2a5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ReRankingApplyFilter.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/ReRankingApplyFilter.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. * * Implementations: * - [List] - *[ReRankingApplyFilter.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendHit.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendHit.kt index d90cbcf695..24d5fe9dec 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendHit.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendHit.kt @@ -10,26 +10,26 @@ import kotlinx.serialization.json.* /** * Recommend hit. * - * @param objectID Unique object identifier. + * @param objectID Unique record identifier. * @param score Recommendation score. - * @param highlightResult Show highlighted section and words matched on a query. - * @param snippetResult Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * @param highlightResult Surround words that match the query with HTML tags for highlighting. + * @param snippetResult Snippets that show the context around a matching search query. * @param rankingInfo * @param distinctSeqID */ @Serializable(RecommendHitSerializer::class) public data class RecommendHit( - /** Unique object identifier. */ + /** Unique record identifier. */ val objectID: String, /** Recommendation score. */ val score: Double, - /** Show highlighted section and words matched on a query. */ + /** Surround words that match the query with HTML tags for highlighting. */ val highlightResult: Map? = null, - /** Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. */ + /** Snippets that show the context around a matching search query. */ val snippetResult: Map? = null, val rankingInfo: RankingInfo? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsHits.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsHits.kt index c3aa4acffa..20227e23e9 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsHits.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsHits.kt @@ -8,7 +8,7 @@ import kotlinx.serialization.json.* * RecommendationsHits * * @param hits - * @param query Text to search for in an index. + * @param query Search query. * @param params URL-encoded string of all search parameters. */ @Serializable @@ -16,7 +16,7 @@ public data class RecommendationsHits( @SerialName(value = "hits") val hits: List, - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, /** URL-encoded string of all search parameters. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsQuery.kt index 815f827e10..816c204f04 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsQuery.kt @@ -7,9 +7,9 @@ import kotlinx.serialization.json.* /** * RecommendationsQuery * - * @param indexName Algolia index name. + * @param indexName Index name. * @param model - * @param objectID Unique object identifier. + * @param objectID Unique record identifier. * @param threshold Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. * @param maxRecommendations Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. * @param queryParameters @@ -18,12 +18,12 @@ import kotlinx.serialization.json.* @Serializable public data class RecommendationsQuery( - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, @SerialName(value = "model") val model: RecommendationModels, - /** Unique object identifier. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String, /** Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt index c51d7f012f..eec829939a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt @@ -8,20 +8,20 @@ import kotlinx.serialization.json.* * RecommendationsResults * * @param hitsPerPage Number of hits per page. - * @param nbHits Number of hits the search query matched. - * @param nbPages Number of pages of results for the current query. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param nbHits Number of results (hits). + * @param nbPages Number of pages of results. + * @param page Page of search results to retrieve. * @param processingTimeMS Time the server took to process the request, in milliseconds. * @param hits * @param abTestID A/B test ID. This is only included in the response for indices that are part of an A/B test. * @param abTestVariantID Variant ID. This is only included in the response for indices that are part of an A/B test. * @param aroundLatLng Computed geographical location. - * @param automaticRadius Automatically-computed radius. + * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. - * @param facets Mapping of each facet name to the corresponding facet counts. + * @param facets Facet counts. * @param facetsStats Statistics for numerical facets. * @param index Index name used for the query. * @param indexUsed Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query. @@ -34,9 +34,9 @@ import kotlinx.serialization.json.* * @param renderingContent * @param serverTimeMS Time the server took to process the request, in milliseconds. * @param serverUsed Host name of the server that processed the request. - * @param userData Lets you store custom data in your indices. + * @param userData An object with custom data. You can store up to 32 kB as custom data. * @param queryID Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). - * @param query Text to search for in an index. + * @param query Search query. * @param params URL-encoded string of all search parameters. */ @Serializable @@ -45,13 +45,13 @@ public data class RecommendationsResults( /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @SerialName(value = "nbHits") val nbHits: Int, - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @SerialName(value = "nbPages") val nbPages: Int, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int, /** Time the server took to process the request, in milliseconds. */ @@ -68,7 +68,7 @@ public data class RecommendationsResults( /** Computed geographical location. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ @SerialName(value = "automaticRadius") val automaticRadius: String? = null, @SerialName(value = "exhaustive") val exhaustive: Exhaustive? = null, @@ -85,7 +85,7 @@ public data class RecommendationsResults( @Deprecated(message = "This property is deprecated.") @SerialName(value = "exhaustiveTypo") val exhaustiveTypo: Boolean? = null, - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ @SerialName(value = "facets") val facets: Map>? = null, /** Statistics for numerical facets. */ @@ -122,13 +122,13 @@ public data class RecommendationsResults( /** Host name of the server that processed the request. */ @SerialName(value = "serverUsed") val serverUsed: String? = null, - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @SerialName(value = "userData") val userData: JsonObject? = null, /** Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ @SerialName(value = "queryID") val queryID: String? = null, - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, /** URL-encoded string of all search parameters. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQuery.kt index 2322bda32d..cab741086a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQuery.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.json.* /** * RecommendedForYouQuery * - * @param indexName Algolia index name. + * @param indexName Index name. * @param model * @param threshold Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. * @param maxRecommendations Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. @@ -17,7 +17,7 @@ import kotlinx.serialization.json.* @Serializable public data class RecommendedForYouQuery( - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, @SerialName(value = "model") val model: RecommendedForYouModel, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQueryParameters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQueryParameters.kt index e9d075d679..3043b61289 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQueryParameters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendedForYouQueryParameters.kt @@ -7,98 +7,96 @@ import kotlinx.serialization.json.* /** * RecommendedForYouQueryParameters * - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter */ @Serializable public data class RecommendedForYouQueryParameters( - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String, - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -109,146 +107,140 @@ public data class RecommendedForYouQueryParameters( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -259,49 +251,49 @@ public data class RecommendedForYouQueryParameters( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveStopWords.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveStopWords.kt index e2b2f4bc8f..48c9f08b0c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveStopWords.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveStopWords.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. * * Implementations: * - [Boolean] - *[RemoveStopWords.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveWordsIfNoResults.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveWordsIfNoResults.kt index b145ef038f..9e3707331d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveWordsIfNoResults.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RemoveWordsIfNoResults.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. + * Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ @Serializable public enum class RemoveWordsIfNoResults(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RenderingContent.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RenderingContent.kt index 36a247a63c..5eae76407a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RenderingContent.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RenderingContent.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. * * @param facetOrdering */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsObject.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsObject.kt index 547d476e75..b6baf323e6 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsObject.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsObject.kt @@ -7,95 +7,93 @@ import kotlinx.serialization.json.* /** * SearchParamsObject * - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter */ @Serializable public data class SearchParamsObject( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -106,149 +104,143 @@ public data class SearchParamsObject( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -259,49 +251,49 @@ public data class SearchParamsObject( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsQuery.kt index 36f7ec2022..a4907fbd0b 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchParamsQuery.kt @@ -7,11 +7,11 @@ import kotlinx.serialization.json.* /** * SearchParamsQuery * - * @param query Text to search for in an index. + * @param query Search query. */ @Serializable public data class SearchParamsQuery( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesParams.kt index 12dfd7d792..273db37217 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesParams.kt @@ -7,22 +7,22 @@ import kotlinx.serialization.json.* /** * Recommend rules search parameters. * - * @param query Full-text query. + * @param query Search query. * @param context Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). - * @param page Requested page (the first page is page 0). + * @param page Requested page of the API response. * @param hitsPerPage Maximum number of hits per page. * @param enabled Restricts responses to enabled rules. When absent (default), _all_ rules are retrieved. */ @Serializable public data class SearchRecommendRulesParams( - /** Full-text query. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, /** Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). */ @SerialName(value = "context") val context: String? = null, - /** Requested page (the first page is page 0). */ + /** Requested page of the API response. */ @SerialName(value = "page") val page: Int? = null, /** Maximum number of hits per page. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesResponse.kt index ab6a9865e3..a4dc89b2cd 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SearchRecommendRulesResponse.kt @@ -8,9 +8,9 @@ import kotlinx.serialization.json.* * SearchRecommendRulesResponse * * @param hits Fetched rules. - * @param nbHits Number of hits the search query matched. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param nbPages Number of pages of results for the current query. + * @param nbHits Number of results (hits). + * @param page Page of search results to retrieve. + * @param nbPages Number of pages of results. */ @Serializable public data class SearchRecommendRulesResponse( @@ -18,12 +18,12 @@ public data class SearchRecommendRulesResponse( /** Fetched rules. */ @SerialName(value = "hits") val hits: List, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @SerialName(value = "nbHits") val nbHits: Int, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int, - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @SerialName(value = "nbPages") val nbPages: Int, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SemanticSearch.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SemanticSearch.kt index 21368313a2..1655a6375c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SemanticSearch.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SemanticSearch.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. * - * @param eventSources Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + * @param eventSources Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. */ @Serializable public data class SemanticSearch( - /** Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. */ + /** Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. */ @SerialName(value = "eventSources") val eventSources: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SnippetResultOption.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SnippetResultOption.kt index 2b17714ae3..24617ed4ef 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SnippetResultOption.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SnippetResultOption.kt @@ -5,15 +5,15 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. * - * @param `value` Markup text with `facetQuery` matches highlighted. + * @param `value` Highlighted attribute value, including HTML tags. * @param matchLevel */ @Serializable public data class SnippetResultOption( - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @SerialName(value = "value") val `value`: String, @SerialName(value = "matchLevel") val matchLevel: MatchLevel, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SortRemainingBy.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SortRemainingBy.kt index 4a96bf8dfb..7bec366c6c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SortRemainingBy.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/SortRemainingBy.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + * Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. */ @Serializable public enum class SortRemainingBy(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TagFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TagFilters.kt index 4c89ebe10a..936cc9bafa 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TagFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TagFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. * * Implementations: * - [List] - *[TagFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TaskStatus.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TaskStatus.kt index 2b3ed85b57..071f1c2eae 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TaskStatus.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TaskStatus.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* /** - * _published_ if the task has been processed, _notPublished_ otherwise. + * Task status, `published` if the task is completed, `notPublished` otherwise. */ @Serializable public enum class TaskStatus(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingFacetsQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingFacetsQuery.kt index f0d7ce1036..64b69ff16a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingFacetsQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingFacetsQuery.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.json.* /** * TrendingFacetsQuery * - * @param indexName Algolia index name. + * @param indexName Index name. * @param facetName Facet name for trending models. * @param threshold Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. * @param maxRecommendations Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. @@ -16,7 +16,7 @@ import kotlinx.serialization.json.* @Serializable public data class TrendingFacetsQuery( - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, /** Facet name for trending models. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingItemsQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingItemsQuery.kt index b151d871b6..5c293edf6c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingItemsQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TrendingItemsQuery.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.json.* /** * TrendingItemsQuery * - * @param indexName Algolia index name. + * @param indexName Index name. * @param threshold Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. * @param maxRecommendations Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. * @param facetName Facet name for trending models. @@ -19,7 +19,7 @@ import kotlinx.serialization.json.* @Serializable public data class TrendingItemsQuery( - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, /** Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoTolerance.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoTolerance.kt index 26454915ab..6fbfd1f506 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoTolerance.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoTolerance.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. * * Implementations: * - [Boolean] - *[TypoTolerance.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoToleranceEnum.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoToleranceEnum.kt index f327e2d33c..cee643d26f 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoToleranceEnum.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/TypoToleranceEnum.kt @@ -3,6 +3,9 @@ package com.algolia.client.model.recommend import kotlinx.serialization.* +/** + * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. + */ @Serializable public enum class TypoToleranceEnum(public val value: kotlin.String) : TypoTolerance { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Value.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Value.kt index 370a4436d3..ca727eb9f4 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Value.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Value.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.json.* /** * Value * - * @param order Pinned order of facet lists. + * @param order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. * @param sortRemainingBy */ @Serializable public data class Value( - /** Pinned order of facet lists. */ + /** Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ @SerialName(value = "order") val order: List? = null, @SerialName(value = "sortRemainingBy") val sortRemainingBy: SortRemainingBy? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Acl.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Acl.kt index 791fa95047..2fc48ab716 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Acl.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Acl.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. + * Access control list permissions. */ @Serializable public enum class Acl(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Action.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Action.kt index 52419a16a6..a4afc40118 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Action.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Action.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Type of batch operation. + * Type of indexing operation. */ @Serializable public enum class Action(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AddApiKeyResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AddApiKeyResponse.kt index 22472d5193..18f3fa2c68 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AddApiKeyResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AddApiKeyResponse.kt @@ -8,7 +8,7 @@ import kotlinx.serialization.json.* * AddApiKeyResponse * * @param key API key. - * @param createdAt Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * @param createdAt Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @Serializable public data class AddApiKeyResponse( @@ -16,6 +16,6 @@ public data class AddApiKeyResponse( /** API key. */ @SerialName(value = "key") val key: String, - /** Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. */ + /** Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @SerialName(value = "createdAt") val createdAt: String, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Anchoring.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Anchoring.kt index dbb8a0f1a6..75035cf99d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Anchoring.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Anchoring.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + * Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. */ @Serializable public enum class Anchoring(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ApiKey.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ApiKey.kt index ad152703c3..d892c793b7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ApiKey.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ApiKey.kt @@ -7,39 +7,39 @@ import kotlinx.serialization.json.* /** * API key object. * - * @param acl [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. - * @param description Description of an API key for you and your team members. - * @param indexes Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". - * @param maxHitsPerQuery Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * @param maxQueriesPerIPPerHour Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * @param queryParameters Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. - * @param referers Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". - * @param validity Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + * @param acl Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). + * @param description Description of an API key to help you identify this API key. + * @param indexes Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". + * @param maxHitsPerQuery Maximum number of results this API key can retrieve in one query. By default, there's no limit. + * @param maxQueriesPerIPPerHour Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. + * @param queryParameters Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. + * @param referers Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). + * @param validity Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ @Serializable public data class ApiKey( - /** [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. */ + /** Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). */ @SerialName(value = "acl") val acl: List, - /** Description of an API key for you and your team members. */ + /** Description of an API key to help you identify this API key. */ @SerialName(value = "description") val description: String? = null, - /** Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". */ + /** Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ @SerialName(value = "indexes") val indexes: List? = null, - /** Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. */ + /** Maximum number of results this API key can retrieve in one query. By default, there's no limit. */ @SerialName(value = "maxHitsPerQuery") val maxHitsPerQuery: Int? = null, - /** Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. */ + /** Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. */ @SerialName(value = "maxQueriesPerIPPerHour") val maxQueriesPerIPPerHour: Int? = null, - /** Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. */ + /** Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. */ @SerialName(value = "queryParameters") val queryParameters: String? = null, - /** Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". */ + /** Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). */ @SerialName(value = "referers") val referers: List? = null, - /** Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. */ + /** Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ @SerialName(value = "validity") val validity: Int? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt index 0e717e69bb..4ae16ee3c3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. * * Implementations: * - [Int] - *[AroundPrecision.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecisionFromValueInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecisionFromValueInner.kt index 4159abe273..3998d4a386 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecisionFromValueInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecisionFromValueInner.kt @@ -5,15 +5,17 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * AroundPrecisionFromValueInner + * Range object with lower and upper values in meters to define custom ranges. * - * @param from - * @param `value` + * @param from Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + * @param `value` Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @Serializable public data class AroundPrecisionFromValueInner( + /** Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @SerialName(value = "from") val from: Int? = null, + /** Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @SerialName(value = "value") val `value`: Int? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadius.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadius.kt index 2b558ffefc..530681d080 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadius.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadius.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. * * Implementations: * - [AroundRadiusAll] diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadiusAll.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadiusAll.kt index e2cd09f21f..a83ed09fc3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadiusAll.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundRadiusAll.kt @@ -3,6 +3,9 @@ package com.algolia.client.model.search import kotlinx.serialization.* +/** + * Return all records with a valid `_geoloc` attribute. Don't filter by distance. + */ @Serializable public enum class AroundRadiusAll(public val value: kotlin.String) : AroundRadius { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilter.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilter.kt index 2da27a1b6d..6fe19272a3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilter.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilter.kt @@ -5,21 +5,21 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Automatic facet Filter. + * Filter or optional filter to be applied to the search. * - * @param facet Attribute to filter on. This must match a facet placeholder in the Rule's pattern. - * @param score Score for the filter. Typically used for optional or disjunctive filters. - * @param disjunctive Whether the filter is disjunctive (true) or conjunctive (false). + * @param facet Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. + * @param score Filter scores to give different weights to individual filters. + * @param disjunctive Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. */ @Serializable public data class AutomaticFacetFilter( - /** Attribute to filter on. This must match a facet placeholder in the Rule's pattern. */ + /** Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. */ @SerialName(value = "facet") val facet: String, - /** Score for the filter. Typically used for optional or disjunctive filters. */ + /** Filter scores to give different weights to individual filters. */ @SerialName(value = "score") val score: Int? = null, - /** Whether the filter is disjunctive (true) or conjunctive (false). */ + /** Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. */ @SerialName(value = "disjunctive") val disjunctive: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilters.kt index 25dca013eb..16af723ba0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AutomaticFacetFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. * * Implementations: * - [List] - *[AutomaticFacetFilters.ofListOfAutomaticFacetFilter]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseIndexSettings.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseIndexSettings.kt index 4f0e962390..0581e1961f 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseIndexSettings.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseIndexSettings.kt @@ -7,71 +7,75 @@ import kotlinx.serialization.json.* /** * BaseIndexSettings * - * @param replicas Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. - * @param paginationLimitedTo Maximum number of hits accessible through pagination. - * @param unretrievableAttributes Attributes that can't be retrieved at query time. - * @param disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * @param attributesToTransliterate Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. - * @param camelCaseAttributes Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. - * @param decompoundedAttributes Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. - * @param indexLanguages Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param disablePrefixOnAttributes Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). - * @param allowCompressionOfIntegerArray Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. - * @param numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). - * @param separatorsToIndex Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. - * @param searchableAttributes [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). - * @param userData Lets you store custom data in your indices. - * @param customNormalization A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param attributeForDistinct Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + * @param replicas Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). + * @param paginationLimitedTo Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. + * @param unretrievableAttributes Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. + * @param disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. + * @param attributesToTransliterate Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. + * @param camelCaseAttributes Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * @param decompoundedAttributes Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). + * @param indexLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param disablePrefixOnAttributes Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + * @param allowCompressionOfIntegerArray Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. + * @param numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. + * @param separatorsToIndex Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. + * @param searchableAttributes Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. + * @param userData An object with custom data. You can store up to 32 kB as custom data. + * @param customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param attributeForDistinct Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. */ @Serializable public data class BaseIndexSettings( - /** Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. */ + /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. */ + @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, + + /** Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). */ @SerialName(value = "replicas") val replicas: List? = null, - /** Maximum number of hits accessible through pagination. */ + /** Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. */ @SerialName(value = "paginationLimitedTo") val paginationLimitedTo: Int? = null, - /** Attributes that can't be retrieved at query time. */ + /** Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. */ @SerialName(value = "unretrievableAttributes") val unretrievableAttributes: List? = null, - /** Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. */ @SerialName(value = "disableTypoToleranceOnWords") val disableTypoToleranceOnWords: List? = null, - /** Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. */ + /** Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. */ @SerialName(value = "attributesToTransliterate") val attributesToTransliterate: List? = null, - /** Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ + /** Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ @SerialName(value = "camelCaseAttributes") val camelCaseAttributes: List? = null, - /** Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. */ + /** Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). */ @SerialName(value = "decompoundedAttributes") val decompoundedAttributes: JsonObject? = null, - /** Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "indexLanguages") val indexLanguages: List? = null, - /** Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ + /** Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ @SerialName(value = "disablePrefixOnAttributes") val disablePrefixOnAttributes: List? = null, - /** Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. */ + /** Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. */ @SerialName(value = "allowCompressionOfIntegerArray") val allowCompressionOfIntegerArray: Boolean? = null, - /** Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). */ + /** Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. */ @SerialName(value = "numericAttributesForFiltering") val numericAttributesForFiltering: List? = null, - /** Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. */ + /** Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. */ @SerialName(value = "separatorsToIndex") val separatorsToIndex: String? = null, - /** [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). */ + /** Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. */ @SerialName(value = "searchableAttributes") val searchableAttributes: List? = null, - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @SerialName(value = "userData") val userData: JsonElement? = null, - /** A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ @SerialName(value = "customNormalization") val customNormalization: Map>? = null, - /** Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). */ + /** Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. */ @SerialName(value = "attributeForDistinct") val attributeForDistinct: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParams.kt index 2484be0ed5..80f5cbf76a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParams.kt @@ -7,50 +7,49 @@ import kotlinx.serialization.json.* /** * BaseSearchParams * - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. */ @Serializable public data class BaseSearchParams( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -61,79 +60,76 @@ public data class BaseSearchParams( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParamsWithoutQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParamsWithoutQuery.kt index 3e449a1dfc..31ae426dd2 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParamsWithoutQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchParamsWithoutQuery.kt @@ -7,46 +7,45 @@ import kotlinx.serialization.json.* /** * BaseSearchParamsWithoutQuery * - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. */ @Serializable public data class BaseSearchParamsWithoutQuery( - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -57,79 +56,76 @@ public data class BaseSearchParamsWithoutQuery( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchResponse.kt index 4c016120bb..945c12808e 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BaseSearchResponse.kt @@ -11,19 +11,19 @@ import kotlinx.serialization.json.* * BaseSearchResponse * * @param hitsPerPage Number of hits per page. - * @param nbHits Number of hits the search query matched. - * @param nbPages Number of pages of results for the current query. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param nbHits Number of results (hits). + * @param nbPages Number of pages of results. + * @param page Page of search results to retrieve. * @param processingTimeMS Time the server took to process the request, in milliseconds. * @param abTestID A/B test ID. This is only included in the response for indices that are part of an A/B test. * @param abTestVariantID Variant ID. This is only included in the response for indices that are part of an A/B test. * @param aroundLatLng Computed geographical location. - * @param automaticRadius Automatically-computed radius. + * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. - * @param facets Mapping of each facet name to the corresponding facet counts. + * @param facets Facet counts. * @param facetsStats Statistics for numerical facets. * @param index Index name used for the query. * @param indexUsed Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query. @@ -36,7 +36,7 @@ import kotlinx.serialization.json.* * @param renderingContent * @param serverTimeMS Time the server took to process the request, in milliseconds. * @param serverUsed Host name of the server that processed the request. - * @param userData Lets you store custom data in your indices. + * @param userData An object with custom data. You can store up to 32 kB as custom data. * @param queryID Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ @Serializable(BaseSearchResponseSerializer::class) @@ -45,13 +45,13 @@ public data class BaseSearchResponse( /** Number of hits per page. */ val hitsPerPage: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ val nbHits: Int, - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ val nbPages: Int, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ val page: Int, /** Time the server took to process the request, in milliseconds. */ @@ -66,7 +66,7 @@ public data class BaseSearchResponse( /** Computed geographical location. */ val aroundLatLng: String? = null, - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ val automaticRadius: String? = null, val exhaustive: Exhaustive? = null, @@ -83,7 +83,7 @@ public data class BaseSearchResponse( @Deprecated(message = "This property is deprecated.") val exhaustiveTypo: Boolean? = null, - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ val facets: Map>? = null, /** Statistics for numerical facets. */ @@ -120,7 +120,7 @@ public data class BaseSearchResponse( /** Host name of the server that processed the request. */ val serverUsed: String? = null, - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ val userData: JsonElement? = null, /** Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchDictionaryEntriesParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchDictionaryEntriesParams.kt index b8c2e0034c..2128211e96 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchDictionaryEntriesParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchDictionaryEntriesParams.kt @@ -5,17 +5,17 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * `batchDictionaryEntries` parameters. + * Request body for updating dictionary entries. * - * @param requests Operations to batch. - * @param clearExistingDictionaryEntries Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + * @param requests List of additions and deletions to your dictionaries. + * @param clearExistingDictionaryEntries Whether to replace all custom entries in the dictionary with the ones sent with this request. */ @Serializable public data class BatchDictionaryEntriesParams( - /** Operations to batch. */ + /** List of additions and deletions to your dictionaries. */ @SerialName(value = "requests") val requests: List, - /** Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. */ + /** Whether to replace all custom entries in the dictionary with the ones sent with this request. */ @SerialName(value = "clearExistingDictionaryEntries") val clearExistingDictionaryEntries: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchResponse.kt index b1ab8040be..e49c598040 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BatchResponse.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * BatchResponse * - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. - * @param objectIDs Unique object (record) identifiers. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. + * @param objectIDs Unique record identifiers. */ @Serializable public data class BatchResponse( - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, - /** Unique object (record) identifiers. */ + /** Unique record identifiers. */ @SerialName(value = "objectIDs") val objectIDs: List, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt index d3f1db2ee3..98081c10f7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt @@ -7,96 +7,94 @@ import kotlinx.serialization.json.* /** * BrowseParamsObject * - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter - * @param cursor Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * @param cursor Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ @Serializable public data class BrowseParamsObject( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -107,149 +105,143 @@ public data class BrowseParamsObject( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -260,53 +252,53 @@ public data class BrowseParamsObject( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, - /** Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. */ + /** Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ @SerialName(value = "cursor") val cursor: String? = null, ) : BrowseParams diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt index 05df9a7735..07ac990e9d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt @@ -8,22 +8,22 @@ import kotlinx.serialization.json.* * BrowseResponse * * @param hitsPerPage Number of hits per page. - * @param nbHits Number of hits the search query matched. - * @param nbPages Number of pages of results for the current query. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param nbHits Number of results (hits). + * @param nbPages Number of pages of results. + * @param page Page of search results to retrieve. * @param processingTimeMS Time the server took to process the request, in milliseconds. - * @param hits - * @param query Text to search for in an index. + * @param hits Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. + * @param query Search query. * @param params URL-encoded string of all search parameters. * @param abTestID A/B test ID. This is only included in the response for indices that are part of an A/B test. * @param abTestVariantID Variant ID. This is only included in the response for indices that are part of an A/B test. * @param aroundLatLng Computed geographical location. - * @param automaticRadius Automatically-computed radius. + * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. - * @param facets Mapping of each facet name to the corresponding facet counts. + * @param facets Facet counts. * @param facetsStats Statistics for numerical facets. * @param index Index name used for the query. * @param indexUsed Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query. @@ -36,9 +36,9 @@ import kotlinx.serialization.json.* * @param renderingContent * @param serverTimeMS Time the server took to process the request, in milliseconds. * @param serverUsed Host name of the server that processed the request. - * @param userData Lets you store custom data in your indices. + * @param userData An object with custom data. You can store up to 32 kB as custom data. * @param queryID Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). - * @param cursor Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * @param cursor Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ @Serializable public data class BrowseResponse( @@ -46,21 +46,22 @@ public data class BrowseResponse( /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @SerialName(value = "nbHits") val nbHits: Int, - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ @SerialName(value = "nbPages") val nbPages: Int, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int, /** Time the server took to process the request, in milliseconds. */ @SerialName(value = "processingTimeMS") val processingTimeMS: Int, + /** Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. */ @SerialName(value = "hits") val hits: List, - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String, /** URL-encoded string of all search parameters. */ @@ -75,7 +76,7 @@ public data class BrowseResponse( /** Computed geographical location. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ @SerialName(value = "automaticRadius") val automaticRadius: String? = null, @SerialName(value = "exhaustive") val exhaustive: Exhaustive? = null, @@ -92,7 +93,7 @@ public data class BrowseResponse( @Deprecated(message = "This property is deprecated.") @SerialName(value = "exhaustiveTypo") val exhaustiveTypo: Boolean? = null, - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ @SerialName(value = "facets") val facets: Map>? = null, /** Statistics for numerical facets. */ @@ -129,12 +130,12 @@ public data class BrowseResponse( /** Host name of the server that processed the request. */ @SerialName(value = "serverUsed") val serverUsed: String? = null, - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @SerialName(value = "userData") val userData: JsonObject? = null, /** Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ @SerialName(value = "queryID") val queryID: String? = null, - /** Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. */ + /** Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ @SerialName(value = "cursor") val cursor: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperation.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperation.kt index 7c256278e4..35ac92852a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperation.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperation.kt @@ -5,16 +5,16 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * To update an attribute without pushing the entire record, you can use these built-in operations. + * Update to perform on the attribute. * * @param operation - * @param `value` Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + * @param `value` Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. */ @Serializable public data class BuiltInOperation( @SerialName(value = "_operation") val operation: BuiltInOperationType, - /** Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. */ + /** Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. */ @SerialName(value = "value") val `value`: String, ) : AttributeToUpdate diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperationType.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperationType.kt index 25efb8a61b..29d6a549cb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperationType.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BuiltInOperationType.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Operation to apply to the attribute. + * How to change the attribute. */ @Serializable public enum class BuiltInOperationType(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Condition.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Condition.kt index eacf0e4523..3225095f70 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Condition.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Condition.kt @@ -7,22 +7,26 @@ import kotlinx.serialization.json.* /** * Condition * - * @param pattern Query pattern syntax. + * @param pattern Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". * @param anchoring - * @param alternatives Whether the pattern matches on plurals, synonyms, and typos. - * @param context Rule context format: [A-Za-z0-9_-]+). + * @param alternatives Whether the pattern should match plurals, synonyms, and typos. + * @param context An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. + * @param filters Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. */ @Serializable public data class Condition( - /** Query pattern syntax. */ + /** Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". */ @SerialName(value = "pattern") val pattern: String? = null, @SerialName(value = "anchoring") val anchoring: Anchoring? = null, - /** Whether the pattern matches on plurals, synonyms, and typos. */ + /** Whether the pattern should match plurals, synonyms, and typos. */ @SerialName(value = "alternatives") val alternatives: Boolean? = null, - /** Rule context format: [A-Za-z0-9_-]+). */ + /** An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. */ @SerialName(value = "context") val context: String? = null, + + /** Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. */ + @SerialName(value = "filters") val filters: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Consequence.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Consequence.kt index 87a2e01732..fe1c7504e2 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Consequence.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Consequence.kt @@ -5,28 +5,28 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + * Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). * * @param params - * @param promote Records to promote. - * @param filterPromotes Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. - * @param hide Records to hide. By default, you can hide up to 50 records per rule. - * @param userData Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + * @param promote Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. + * @param filterPromotes Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. + * @param hide Records you want to hide from the search results. + * @param userData A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. */ @Serializable public data class Consequence( @SerialName(value = "params") val params: ConsequenceParams? = null, - /** Records to promote. */ + /** Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. */ @SerialName(value = "promote") val promote: List? = null, - /** Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. */ + /** Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. */ @SerialName(value = "filterPromotes") val filterPromotes: Boolean? = null, - /** Records to hide. By default, you can hide up to 50 records per rule. */ + /** Records you want to hide from the search results. */ @SerialName(value = "hide") val hide: List? = null, - /** Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. */ + /** A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. */ @SerialName(value = "userData") val userData: JsonElement? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceHide.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceHide.kt index 1987a4f385..f843e72ad2 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceHide.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceHide.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Unique identifier of the record to hide. + * Object ID of the record to hide. * - * @param objectID Unique object identifier. + * @param objectID Unique record identifier. */ @Serializable public data class ConsequenceHide( - /** Unique object identifier. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt index 45cacdb90a..711017a9a5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt @@ -7,82 +7,80 @@ import kotlinx.serialization.json.* /** * ConsequenceParams * - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter * @param query * @param automaticFacetFilters @@ -91,10 +89,10 @@ import kotlinx.serialization.json.* @Serializable public data class ConsequenceParams( - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -105,149 +103,143 @@ public data class ConsequenceParams( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -258,49 +250,49 @@ public data class ConsequenceParams( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQuery.kt index 4f7ee3b71b..903dcd7a0b 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQuery.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + * Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. * * Implementations: * - [ConsequenceQueryObject] diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQueryObject.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQueryObject.kt index 457cdfb0ed..4058732782 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQueryObject.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceQueryObject.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * ConsequenceQueryObject * - * @param remove Words to remove. - * @param edits Edits to apply. + * @param remove Words to remove from the search query. + * @param edits Changes to make to the search query. */ @Serializable public data class ConsequenceQueryObject( - /** Words to remove. */ + /** Words to remove from the search query. */ @SerialName(value = "remove") val remove: List? = null, - /** Edits to apply. */ + /** Changes to make to the search query. */ @SerialName(value = "edits") val edits: List? = null, ) : ConsequenceQuery diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/CreatedAtResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/CreatedAtResponse.kt index 4e5ec4cea6..b93e411aa7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/CreatedAtResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/CreatedAtResponse.kt @@ -7,11 +7,11 @@ import kotlinx.serialization.json.* /** * Response and creation timestamp. * - * @param createdAt Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * @param createdAt Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @Serializable public data class CreatedAtResponse( - /** Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. */ + /** Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @SerialName(value = "createdAt") val createdAt: String, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Cursor.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Cursor.kt index d418f29de2..b6f6199eac 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Cursor.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Cursor.kt @@ -7,11 +7,11 @@ import kotlinx.serialization.json.* /** * Cursor * - * @param cursor Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * @param cursor Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ @Serializable public data class Cursor( - /** Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. */ + /** Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. */ @SerialName(value = "cursor") val cursor: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeleteByParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeleteByParams.kt index ece9014e5d..023341f7d4 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeleteByParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeleteByParams.kt @@ -8,34 +8,34 @@ import kotlinx.serialization.json.* * DeleteByParams * * @param facetFilters - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param numericFilters * @param tagFilters - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * @param aroundRadius - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @Serializable public data class DeleteByParams( @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "numericFilters") val numericFilters: NumericFilters? = null, @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeletedAtResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeletedAtResponse.kt index 8af5951fde..128ec7b219 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeletedAtResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DeletedAtResponse.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.json.* /** * Response, taskID, and deletion timestamp. * - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * @param deletedAt Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @Serializable public data class DeletedAtResponse( - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, /** Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntry.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntry.kt index 51ac140334..ce81858144 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntry.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntry.kt @@ -10,29 +10,29 @@ import kotlinx.serialization.json.* /** * Dictionary entry. * - * @param objectID Unique identifier for a dictionary object. - * @param language [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). - * @param word Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". - * @param words Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. - * @param decomposition For compound entries, governs the behavior of the `word` parameter. + * @param objectID Unique identifier for the dictionary entry. + * @param language ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * @param word Matching dictionary word for `stopwords` and `compounds` dictionaries. + * @param words Matching words in the `plurals` dictionary including declensions. + * @param decomposition Invividual components of a compound word in the `compounds` dictionary. * @param state */ @Serializable(DictionaryEntrySerializer::class) public data class DictionaryEntry( - /** Unique identifier for a dictionary object. */ + /** Unique identifier for the dictionary entry. */ val objectID: String, - /** [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ + /** ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ val language: String, - /** Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". */ + /** Matching dictionary word for `stopwords` and `compounds` dictionaries. */ val word: String? = null, - /** Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. */ + /** Matching words in the `plurals` dictionary including declensions. */ val words: List? = null, - /** For compound entries, governs the behavior of the `word` parameter. */ + /** Invividual components of a compound word in the `compounds` dictionary. */ val decomposition: List? = null, val state: DictionaryEntryState? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntryState.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntryState.kt index 86579133b7..1c1f1fd843 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntryState.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryEntryState.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). + * Whether a dictionary entry is active. */ @Serializable public enum class DictionaryEntryState(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryLanguage.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryLanguage.kt index 00e3079ebf..f5bace8129 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryLanguage.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionaryLanguage.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Custom entries for a dictionary. + * Dictionary type. If `null`, this dictionary type isn't supported for the language. * - * @param nbCustomEntries If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + * @param nbCustomEntries Number of custom dictionary entries. */ @Serializable public data class DictionaryLanguage( - /** If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. */ + /** Number of custom dictionary entries. */ @SerialName(value = "nbCustomEntries") val nbCustomEntries: Int? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionarySettingsParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionarySettingsParams.kt index 6b170441d1..b4f97cec39 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionarySettingsParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/DictionarySettingsParams.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Enable or turn off the built-in Algolia stop words for a specific language. + * Turn on or off the built-in Algolia stop words for a specific language. * * @param disableStandardEntries */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Distinct.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Distinct.kt index 8447775473..60e5834196 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Distinct.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Distinct.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. * * Implementations: * - [Boolean] - *[Distinct.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Edit.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Edit.kt index f7626dfe03..ea36def234 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Edit.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Edit.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.* * * @param type * @param delete Text or patterns to remove from the query string. - * @param insert Text that should be inserted in place of the removed text inside the query string. + * @param insert Text to be added in place of the deleted text inside the query string. */ @Serializable public data class Edit( @@ -19,6 +19,6 @@ public data class Edit( /** Text or patterns to remove from the query string. */ @SerialName(value = "delete") val delete: String? = null, - /** Text that should be inserted in place of the removed text inside the query string. */ + /** Text to be added in place of the deleted text inside the query string. */ @SerialName(value = "insert") val insert: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ExactOnSingleWordQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ExactOnSingleWordQuery.kt index c9c5b50e70..49d32322d0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ExactOnSingleWordQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ExactOnSingleWordQuery.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + * Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. */ @Serializable public enum class ExactOnSingleWordQuery(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetFilters.kt index d99b10ab32..b7380de9e4 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. * * Implementations: * - [List] - *[FacetFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetHits.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetHits.kt index 087683d32c..56165673c5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetHits.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetHits.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.json.* * FacetHits * * @param `value` Facet value. - * @param highlighted Markup text with `facetQuery` matches highlighted. - * @param count Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + * @param highlighted Highlighted attribute value, including HTML tags. + * @param count Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). */ @Serializable public data class FacetHits( @@ -17,9 +17,9 @@ public data class FacetHits( /** Facet value. */ @SerialName(value = "value") val `value`: String, - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @SerialName(value = "highlighted") val highlighted: String, - /** Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). */ + /** Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). */ @SerialName(value = "count") val count: Int, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetOrdering.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetOrdering.kt index 5bf1247fb9..83227a4cc5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetOrdering.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/FacetOrdering.kt @@ -5,16 +5,16 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Defines the ordering of facets (widgets). + * Order of facet names and facet values in your UI. * * @param facets - * @param values Ordering of facet values within an individual facet. + * @param values Order of facet values. One object for each facet. */ @Serializable public data class FacetOrdering( @SerialName(value = "facets") val facets: Facets? = null, - /** Ordering of facet values within an individual facet. */ + /** Order of facet values. One object for each facet. */ @SerialName(value = "values") val values: Map? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Facets.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Facets.kt index 7b05daa9d6..369d412b57 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Facets.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Facets.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Ordering of facets (widgets). + * Order of facet names. * - * @param order Pinned order of facet lists. + * @param order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ @Serializable public data class Facets( - /** Pinned order of facet lists. */ + /** Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ @SerialName(value = "order") val order: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt index b43d402764..461613af3a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt @@ -8,15 +8,15 @@ import kotlinx.serialization.json.* * GetApiKeyResponse * * @param createdAt Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * @param acl [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + * @param acl Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). * @param `value` API key. - * @param description Description of an API key for you and your team members. - * @param indexes Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". - * @param maxHitsPerQuery Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * @param maxQueriesPerIPPerHour Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * @param queryParameters Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. - * @param referers Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". - * @param validity Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + * @param description Description of an API key to help you identify this API key. + * @param indexes Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". + * @param maxHitsPerQuery Maximum number of results this API key can retrieve in one query. By default, there's no limit. + * @param maxQueriesPerIPPerHour Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. + * @param queryParameters Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. + * @param referers Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). + * @param validity Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ @Serializable public data class GetApiKeyResponse( @@ -24,30 +24,30 @@ public data class GetApiKeyResponse( /** Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). */ @SerialName(value = "createdAt") val createdAt: Long, - /** [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. */ + /** Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). */ @SerialName(value = "acl") val acl: List, /** API key. */ @SerialName(value = "value") val `value`: String? = null, - /** Description of an API key for you and your team members. */ + /** Description of an API key to help you identify this API key. */ @SerialName(value = "description") val description: String? = null, - /** Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". */ + /** Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ @SerialName(value = "indexes") val indexes: List? = null, - /** Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. */ + /** Maximum number of results this API key can retrieve in one query. By default, there's no limit. */ @SerialName(value = "maxHitsPerQuery") val maxHitsPerQuery: Int? = null, - /** Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. */ + /** Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. */ @SerialName(value = "maxQueriesPerIPPerHour") val maxQueriesPerIPPerHour: Int? = null, - /** Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. */ + /** Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. */ @SerialName(value = "queryParameters") val queryParameters: String? = null, - /** Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". */ + /** Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). */ @SerialName(value = "referers") val referers: List? = null, - /** Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. */ + /** Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ @SerialName(value = "validity") val validity: Int? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsRequest.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsRequest.kt index 945c353630..5e223576f2 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsRequest.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsRequest.kt @@ -5,21 +5,21 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Record retrieval operation. + * Request body for retrieving records. * - * @param objectID Record's objectID. - * @param indexName Name of the index containing the required records. + * @param objectID Object ID for the record to retrieve. + * @param indexName Index from which to retrieve the records. * @param attributesToRetrieve Attributes to retrieve. If not specified, all retrievable attributes are returned. */ @Serializable public data class GetObjectsRequest( - /** Record's objectID. */ + /** Object ID for the record to retrieve. */ @SerialName(value = "objectID") val objectID: String, - /** Name of the index containing the required records. */ + /** Index from which to retrieve the records. */ @SerialName(value = "indexName") val indexName: String, - /** Attributes to retrieve. If not specified, all retrievable attributes are returned. */ + /** Attributes to retrieve. If not specified, all retrievable attributes are returned. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt index bc0adca082..0aee8291c0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt @@ -7,11 +7,11 @@ import kotlinx.serialization.json.* /** * GetObjectsResponse * - * @param results Retrieved results. + * @param results Retrieved records. */ @Serializable public data class GetObjectsResponse( - /** Retrieved results. */ + /** Retrieved records. */ @SerialName(value = "results") val results: List, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HasPendingMappingsResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HasPendingMappingsResponse.kt index 2a0efb10b2..d7d51e1152 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HasPendingMappingsResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HasPendingMappingsResponse.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.json.* /** * HasPendingMappingsResponse * - * @param pending Indicates whether there are clusters undergoing migration, creation, or deletion. + * @param pending Whether there are clusters undergoing migration, creation, or deletion. * @param clusters Cluster pending mapping state: migrating, creating, deleting. */ @Serializable public data class HasPendingMappingsResponse( - /** Indicates whether there are clusters undergoing migration, creation, or deletion. */ + /** Whether there are clusters undergoing migration, creation, or deletion. */ @SerialName(value = "pending") val pending: Boolean, /** Cluster pending mapping state: migrating, creating, deleting. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HighlightResultOption.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HighlightResultOption.kt index bd211054df..9db4649764 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HighlightResultOption.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/HighlightResultOption.kt @@ -5,22 +5,22 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. * - * @param `value` Markup text with `facetQuery` matches highlighted. + * @param `value` Highlighted attribute value, including HTML tags. * @param matchLevel - * @param matchedWords List of words from the query that matched the object. + * @param matchedWords List of matched words from the search query. * @param fullyHighlighted Whether the entire attribute value is highlighted. */ @Serializable public data class HighlightResultOption( - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @SerialName(value = "value") val `value`: String, @SerialName(value = "matchLevel") val matchLevel: MatchLevel, - /** List of words from the query that matched the object. */ + /** List of matched words from the search query. */ @SerialName(value = "matchedWords") val matchedWords: List, /** Whether the entire attribute value is highlighted. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Hit.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Hit.kt index fd9bfa1f8d..bf2b51280a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Hit.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Hit.kt @@ -8,24 +8,24 @@ import kotlinx.serialization.encoding.* import kotlinx.serialization.json.* /** - * A single hit. + * Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. * - * @param objectID Unique object identifier. - * @param highlightResult Show highlighted section and words matched on a query. - * @param snippetResult Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * @param objectID Unique record identifier. + * @param highlightResult Surround words that match the query with HTML tags for highlighting. + * @param snippetResult Snippets that show the context around a matching search query. * @param rankingInfo * @param distinctSeqID */ @Serializable(HitSerializer::class) public data class Hit( - /** Unique object identifier. */ + /** Unique record identifier. */ val objectID: String, - /** Show highlighted section and words matched on a query. */ + /** Surround words that match the query with HTML tags for highlighting. */ val highlightResult: Map? = null, - /** Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. */ + /** Snippets that show the context around a matching search query. */ val snippetResult: Map? = null, val rankingInfo: RankingInfo? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IgnorePlurals.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IgnorePlurals.kt index b99cbe56b0..439431fdc0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IgnorePlurals.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IgnorePlurals.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. * * Implementations: * - [Boolean] - *[IgnorePlurals.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt index 16ba12e506..97cf126959 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt @@ -5,188 +5,188 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Algolia index settings. + * Index settings. * - * @param replicas Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. - * @param paginationLimitedTo Maximum number of hits accessible through pagination. - * @param unretrievableAttributes Attributes that can't be retrieved at query time. - * @param disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * @param attributesToTransliterate Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. - * @param camelCaseAttributes Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. - * @param decompoundedAttributes Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. - * @param indexLanguages Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param disablePrefixOnAttributes Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). - * @param allowCompressionOfIntegerArray Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. - * @param numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). - * @param separatorsToIndex Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. - * @param searchableAttributes [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). - * @param userData Lets you store custom data in your indices. - * @param customNormalization A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param attributeForDistinct Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + * @param replicas Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). + * @param paginationLimitedTo Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. + * @param unretrievableAttributes Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. + * @param disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. + * @param attributesToTransliterate Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. + * @param camelCaseAttributes Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * @param decompoundedAttributes Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). + * @param indexLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param disablePrefixOnAttributes Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + * @param allowCompressionOfIntegerArray Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. + * @param numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. + * @param separatorsToIndex Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. + * @param searchableAttributes Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. + * @param userData An object with custom data. You can store up to 32 kB as custom data. + * @param customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param attributeForDistinct Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter */ @Serializable public data class IndexSettings( - /** Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. */ + /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. */ + @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, + + /** Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). */ @SerialName(value = "replicas") val replicas: List? = null, - /** Maximum number of hits accessible through pagination. */ + /** Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. */ @SerialName(value = "paginationLimitedTo") val paginationLimitedTo: Int? = null, - /** Attributes that can't be retrieved at query time. */ + /** Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. */ @SerialName(value = "unretrievableAttributes") val unretrievableAttributes: List? = null, - /** Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. */ @SerialName(value = "disableTypoToleranceOnWords") val disableTypoToleranceOnWords: List? = null, - /** Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. */ + /** Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. */ @SerialName(value = "attributesToTransliterate") val attributesToTransliterate: List? = null, - /** Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ + /** Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. */ @SerialName(value = "camelCaseAttributes") val camelCaseAttributes: List? = null, - /** Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. */ + /** Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). */ @SerialName(value = "decompoundedAttributes") val decompoundedAttributes: JsonObject? = null, - /** Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "indexLanguages") val indexLanguages: List? = null, - /** Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ + /** Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). */ @SerialName(value = "disablePrefixOnAttributes") val disablePrefixOnAttributes: List? = null, - /** Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. */ + /** Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. */ @SerialName(value = "allowCompressionOfIntegerArray") val allowCompressionOfIntegerArray: Boolean? = null, - /** Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). */ + /** Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. */ @SerialName(value = "numericAttributesForFiltering") val numericAttributesForFiltering: List? = null, - /** Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. */ + /** Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. */ @SerialName(value = "separatorsToIndex") val separatorsToIndex: String? = null, - /** [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). */ + /** Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. */ @SerialName(value = "searchableAttributes") val searchableAttributes: List? = null, - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ @SerialName(value = "userData") val userData: JsonObject? = null, - /** A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ @SerialName(value = "customNormalization") val customNormalization: Map>? = null, - /** Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). */ + /** Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. */ @SerialName(value = "attributeForDistinct") val attributeForDistinct: String? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -197,49 +197,49 @@ public data class IndexSettings( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettingsAsSearchParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettingsAsSearchParams.kt index 3fcecc5b9b..52e2cc693b 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettingsAsSearchParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettingsAsSearchParams.kt @@ -7,122 +7,118 @@ import kotlinx.serialization.json.* /** * IndexSettingsAsSearchParams * - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter */ @Serializable public data class IndexSettingsAsSearchParams( - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -133,49 +129,49 @@ public data class IndexSettingsAsSearchParams( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Log.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Log.kt index aa33123bd0..b4a73dda31 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Log.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Log.kt @@ -7,56 +7,56 @@ import kotlinx.serialization.json.* /** * Log * - * @param timestamp Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * @param method HTTP method of the performed request. - * @param answerCode HTTP response code. - * @param queryBody Request body. Truncated after 1,000 characters. - * @param answer Answer body. Truncated after 1,000 characters. - * @param url Request URL. + * @param timestamp Timestamp of the API request in ISO 8601 format. + * @param method HTTP method of the request. + * @param answerCode HTTP status code of the response. + * @param queryBody Request body. + * @param answer Response body. + * @param url URL of the API endpoint. * @param ip IP address of the client that performed the request. - * @param queryHeaders Request headers (API key is obfuscated). + * @param queryHeaders Request headers (API keys are obfuscated). * @param sha1 SHA1 signature of the log entry. - * @param nbApiCalls Number of API calls. - * @param processingTimeMs Processing time for the query. Doesn't include network time. + * @param nbApiCalls Number of API requests. + * @param processingTimeMs Processing time for the query in milliseconds. This doesn't include latency due to the network. * @param index Index targeted by the query. * @param queryParams Query parameters sent with the request. - * @param queryNbHits Number of hits returned for the query. - * @param innerQueries Performed queries for the given request. + * @param queryNbHits Number of search results (hits) returned for the query. + * @param innerQueries Queries performed for the given request. */ @Serializable public data class Log( - /** Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ + /** Timestamp of the API request in ISO 8601 format. */ @SerialName(value = "timestamp") val timestamp: String, - /** HTTP method of the performed request. */ + /** HTTP method of the request. */ @SerialName(value = "method") val method: String, - /** HTTP response code. */ + /** HTTP status code of the response. */ @SerialName(value = "answer_code") val answerCode: String, - /** Request body. Truncated after 1,000 characters. */ + /** Request body. */ @SerialName(value = "query_body") val queryBody: String, - /** Answer body. Truncated after 1,000 characters. */ + /** Response body. */ @SerialName(value = "answer") val answer: String, - /** Request URL. */ - @SerialName(value = "url") val url: String, + /** URL of the API endpoint. */ + @SerialName(value = "url") val url: kotlin.String, /** IP address of the client that performed the request. */ @SerialName(value = "ip") val ip: String, - /** Request headers (API key is obfuscated). */ + /** Request headers (API keys are obfuscated). */ @SerialName(value = "query_headers") val queryHeaders: String, /** SHA1 signature of the log entry. */ @SerialName(value = "sha1") val sha1: String, - /** Number of API calls. */ + /** Number of API requests. */ @SerialName(value = "nb_api_calls") val nbApiCalls: String, - /** Processing time for the query. Doesn't include network time. */ + /** Processing time for the query in milliseconds. This doesn't include latency due to the network. */ @SerialName(value = "processing_time_ms") val processingTimeMs: String, /** Index targeted by the query. */ @@ -65,9 +65,9 @@ public data class Log( /** Query parameters sent with the request. */ @SerialName(value = "query_params") val queryParams: String? = null, - /** Number of hits returned for the query. */ + /** Number of search results (hits) returned for the query. */ @SerialName(value = "query_nb_hits") val queryNbHits: String? = null, - /** Performed queries for the given request. */ + /** Queries performed for the given request. */ @SerialName(value = "inner_queries") val innerQueries: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/LogQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/LogQuery.kt index 971e665f7d..e3b2b51d45 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/LogQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/LogQuery.kt @@ -8,7 +8,7 @@ import kotlinx.serialization.json.* * LogQuery * * @param indexName Index targeted by the query. - * @param userToken User identifier. + * @param userToken A user identifier. * @param queryId Unique query identifier. */ @Serializable @@ -17,7 +17,7 @@ public data class LogQuery( /** Index targeted by the query. */ @SerialName(value = "index_name") val indexName: String? = null, - /** User identifier. */ + /** A user identifier. */ @SerialName(value = "user_token") val userToken: String? = null, /** Unique query identifier. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MatchLevel.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MatchLevel.kt index c99ca8e27a..0e8373e618 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MatchLevel.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MatchLevel.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Indicates how well the attribute matched the search query. + * Whether the whole query string matches or only a part. */ @Serializable public enum class MatchLevel(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Mode.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Mode.kt index ce3b74c79c..c0a696ab76 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Mode.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Mode.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Search mode the index will use to query for results. + * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. */ @Serializable public enum class Mode(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MultipleBatchResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MultipleBatchResponse.kt index 58f1fc6397..448c57da94 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MultipleBatchResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/MultipleBatchResponse.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * MultipleBatchResponse * - * @param taskID TaskIDs per index. - * @param objectIDs Unique object (record) identifiers. + * @param taskID Task IDs. One for each index. + * @param objectIDs Unique record identifiers. */ @Serializable public data class MultipleBatchResponse( - /** TaskIDs per index. */ + /** Task IDs. One for each index. */ @SerialName(value = "taskID") val taskID: Map, - /** Unique object (record) identifiers. */ + /** Unique record identifiers. */ @SerialName(value = "objectIDs") val objectIDs: List, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/NumericFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/NumericFilters.kt index 399a8a0bf0..4ed4f0268d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/NumericFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/NumericFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. * * Implementations: * - [List] - *[NumericFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationIndexParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationIndexParams.kt index 99be5ee0b2..064127fd9b 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationIndexParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationIndexParams.kt @@ -8,17 +8,17 @@ import kotlinx.serialization.json.* * OperationIndexParams * * @param operation - * @param destination Algolia index name. - * @param scope **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + * @param destination Index name. + * @param scope **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. */ @Serializable public data class OperationIndexParams( @SerialName(value = "operation") val operation: OperationType, - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "destination") val destination: String, - /** **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. */ + /** **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. */ @SerialName(value = "scope") val scope: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationType.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationType.kt index 9cefbd6cbd..b8bdbc8825 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationType.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OperationType.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Operation to perform (_move_ or _copy_). + * Operation to perform on the index. */ @Serializable public enum class OperationType(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OptionalFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OptionalFilters.kt index 9029e4bb8d..7ebf224e9a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OptionalFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/OptionalFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. * * Implementations: * - [List] - *[OptionalFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Params.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Params.kt index 2d88f40027..72b702dbfb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Params.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Params.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Additional search parameters. + * Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. * * @param query * @param automaticFacetFilters diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectID.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectID.kt index 90f25c9b10..839a91b529 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectID.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectID.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * Record to promote. * - * @param objectID Unique identifier of the record to promote. - * @param position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param objectID Unique record identifier. + * @param position Position in the search results where you want to show the promoted records. */ @Serializable public data class PromoteObjectID( - /** Unique identifier of the record to promote. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String, - /** The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. */ + /** Position in the search results where you want to show the promoted records. */ @SerialName(value = "position") val position: Int, ) : Promote diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectIDs.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectIDs.kt index f3d6591935..fe819c39b2 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectIDs.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/PromoteObjectIDs.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * Records to promote. * - * @param objectIDs Unique identifiers of the records to promote. - * @param position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param objectIDs Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. + * @param position Position in the search results where you want to show the promoted records. */ @Serializable public data class PromoteObjectIDs( - /** Unique identifiers of the records to promote. */ + /** Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. */ @SerialName(value = "objectIDs") val objectIDs: List, - /** The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. */ + /** Position in the search results where you want to show the promoted records. */ @SerialName(value = "position") val position: Int, ) : Promote diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/QueryType.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/QueryType.kt index 4499596a46..f47a0155f9 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/QueryType.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/QueryType.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ @Serializable public enum class QueryType(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RankingInfo.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RankingInfo.kt index b53130a080..d5385347b6 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RankingInfo.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RankingInfo.kt @@ -5,29 +5,29 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * RankingInfo + * Object with detailed information about the record's ranking. * - * @param filters This field is reserved for advanced usage. - * @param firstMatchedWord Position of the most important matched attribute in the attributes to index list. + * @param filters Whether a filter matched the query. + * @param firstMatchedWord Position of the first matched word in the best matching attribute of the record. * @param geoDistance Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). * @param nbExactWords Number of exactly matched words. * @param nbTypos Number of typos encountered when matching the record. - * @param promoted Present and set to true if a Rule promoted the hit. - * @param userScore Custom ranking for the object, expressed as a single integer value. - * @param words Number of matched words, including prefixes and typos. + * @param promoted Whether the record was promoted by a rule. + * @param userScore Overall ranking of the record, expressed as a single integer. This attribute is internal. + * @param words Number of matched words. * @param geoPrecision Precision used when computing the geo distance, in meters. * @param matchedGeoLocation * @param personalization - * @param proximityDistance When the query contains more than one word, the sum of the distances between matched words (in meters). - * @param promotedByReRanking Wether the record are promoted by the re-ranking strategy. + * @param proximityDistance Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. + * @param promotedByReRanking Whether the record is re-ranked. */ @Serializable public data class RankingInfo( - /** This field is reserved for advanced usage. */ + /** Whether a filter matched the query. */ @SerialName(value = "filters") val filters: Int, - /** Position of the most important matched attribute in the attributes to index list. */ + /** Position of the first matched word in the best matching attribute of the record. */ @SerialName(value = "firstMatchedWord") val firstMatchedWord: Int, /** Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). */ @@ -39,13 +39,13 @@ public data class RankingInfo( /** Number of typos encountered when matching the record. */ @SerialName(value = "nbTypos") val nbTypos: Int, - /** Present and set to true if a Rule promoted the hit. */ + /** Whether the record was promoted by a rule. */ @SerialName(value = "promoted") val promoted: Boolean, - /** Custom ranking for the object, expressed as a single integer value. */ + /** Overall ranking of the record, expressed as a single integer. This attribute is internal. */ @SerialName(value = "userScore") val userScore: Int, - /** Number of matched words, including prefixes and typos. */ + /** Number of matched words. */ @SerialName(value = "words") val words: Int, /** Precision used when computing the geo distance, in meters. */ @@ -55,9 +55,9 @@ public data class RankingInfo( @SerialName(value = "personalization") val personalization: Personalization? = null, - /** When the query contains more than one word, the sum of the distances between matched words (in meters). */ + /** Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. */ @SerialName(value = "proximityDistance") val proximityDistance: Int? = null, - /** Wether the record are promoted by the re-ranking strategy. */ + /** Whether the record is re-ranked. */ @SerialName(value = "promotedByReRanking") val promotedByReRanking: Boolean? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ReRankingApplyFilter.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ReRankingApplyFilter.kt index a887d1e936..30e84b8647 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ReRankingApplyFilter.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ReRankingApplyFilter.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. * * Implementations: * - [List] - *[ReRankingApplyFilter.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveStopWords.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveStopWords.kt index 81a9363d61..ef07aa4cfb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveStopWords.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveStopWords.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. * * Implementations: * - [Boolean] - *[RemoveStopWords.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveWordsIfNoResults.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveWordsIfNoResults.kt index 215414709b..e081aae350 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveWordsIfNoResults.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RemoveWordsIfNoResults.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. + * Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ @Serializable public enum class RemoveWordsIfNoResults(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RenderingContent.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RenderingContent.kt index 915098536a..18c0b0924f 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RenderingContent.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RenderingContent.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. * * @param facetOrdering */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Rule.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Rule.kt index bc9efc8da8..dadfb7d448 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Rule.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Rule.kt @@ -7,30 +7,30 @@ import kotlinx.serialization.json.* /** * Rule object. * - * @param objectID Unique identifier for a rule object. - * @param conditions [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + * @param objectID Unique identifier of a rule object. + * @param conditions Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). * @param consequence - * @param description Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. - * @param enabled Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. - * @param validity If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + * @param description Description of the rule's purpose to help you distinguish between different rules. + * @param enabled Whether the rule is active. + * @param validity Time periods when the rule is active. */ @Serializable public data class Rule( - /** Unique identifier for a rule object. */ + /** Unique identifier of a rule object. */ @SerialName(value = "objectID") val objectID: String, - /** [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. */ + /** Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). */ @SerialName(value = "conditions") val conditions: List? = null, @SerialName(value = "consequence") val consequence: Consequence? = null, - /** Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. */ + /** Description of the rule's purpose to help you distinguish between different rules. */ @SerialName(value = "description") val description: String? = null, - /** Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. */ + /** Whether the rule is active. */ @SerialName(value = "enabled") val enabled: Boolean? = null, - /** If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. */ + /** Time periods when the rule is active. */ @SerialName(value = "validity") val validity: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveObjectResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveObjectResponse.kt index 79e40e3fc0..267f998dcb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveObjectResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveObjectResponse.kt @@ -7,19 +7,19 @@ import kotlinx.serialization.json.* /** * SaveObjectResponse * - * @param createdAt Date of creation (ISO-8601 format). - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. - * @param objectID Unique object identifier. + * @param createdAt Timestamp when the record was added, in ISO 8601 format. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. + * @param objectID Unique record identifier. */ @Serializable public data class SaveObjectResponse( - /** Date of creation (ISO-8601 format). */ + /** Timestamp when the record was added, in ISO 8601 format. */ @SerialName(value = "createdAt") val createdAt: String, - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, - /** Unique object identifier. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveSynonymResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveSynonymResponse.kt index 477dd2e57f..52d5045d85 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveSynonymResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SaveSynonymResponse.kt @@ -7,14 +7,14 @@ import kotlinx.serialization.json.* /** * SaveSynonymResponse * - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * @param updatedAt Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. * @param id Unique identifier of a synonym object. */ @Serializable public data class SaveSynonymResponse( - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, /** Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesParams.kt index 45b3a8cbce..19a217dd9a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesParams.kt @@ -5,25 +5,25 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * `searchDictionaryEntries` parameters. + * Search parameter. * - * @param query Text to search for in an index. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param query Search query. + * @param page Page of search results to retrieve. * @param hitsPerPage Number of hits per page. - * @param language [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * @param language ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ @Serializable public data class SearchDictionaryEntriesParams( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ + /** ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ @SerialName(value = "language") val language: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesResponse.kt new file mode 100644 index 0000000000..07a1fa5cc0 --- /dev/null +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchDictionaryEntriesResponse.kt @@ -0,0 +1,29 @@ +/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */ +package com.algolia.client.model.search + +import kotlinx.serialization.* +import kotlinx.serialization.json.* + +/** + * SearchDictionaryEntriesResponse + * + * @param hits Dictionary entries matching the search criteria. + * @param page Requested page of the API response. + * @param nbHits Number of results (hits). + * @param nbPages Number of pages of results. + */ +@Serializable +public data class SearchDictionaryEntriesResponse( + + /** Dictionary entries matching the search criteria. */ + @SerialName(value = "hits") val hits: List, + + /** Requested page of the API response. */ + @SerialName(value = "page") val page: Int, + + /** Number of results (hits). */ + @SerialName(value = "nbHits") val nbHits: Int, + + /** Number of pages of results. */ + @SerialName(value = "nbPages") val nbPages: Int, +) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesRequest.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesRequest.kt index 9e515eec56..2ddb142f16 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesRequest.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesRequest.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.* * * @param params Search parameters as a URL-encoded query string. * @param facetQuery Text to search inside the facet's values. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @Serializable public data class SearchForFacetValuesRequest( @@ -20,6 +20,6 @@ public data class SearchForFacetValuesRequest( /** Text to search inside the facet's values. */ @SerialName(value = "facetQuery") val facetQuery: String? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesResponse.kt index 784566c6a6..ee4241058f 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetValuesResponse.kt @@ -7,13 +7,14 @@ import kotlinx.serialization.json.* /** * SearchForFacetValuesResponse * - * @param facetHits + * @param facetHits Matching facet values. * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param processingTimeMS Time the server took to process the request, in milliseconds. */ @Serializable public data class SearchForFacetValuesResponse( + /** Matching facet values. */ @SerialName(value = "facetHits") val facetHits: List, /** See the `facetsCount` field of the `exhaustive` object in the response. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt index f1a7e3889a..2fe138eb23 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt @@ -8,86 +8,84 @@ import kotlinx.serialization.json.* * SearchForFacets * * @param facet Facet name. - * @param indexName Algolia index name. + * @param indexName Index name. * @param type * @param params Search parameters as a URL-encoded query string. - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter * @param facetQuery Text to search inside the facet's values. */ @@ -97,7 +95,7 @@ public data class SearchForFacets( /** Facet name. */ @SerialName(value = "facet") val facet: String, - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, @SerialName(value = "type") val type: SearchTypeFacet, @@ -105,13 +103,13 @@ public data class SearchForFacets( /** Search parameters as a URL-encoded query string. */ @SerialName(value = "params") val params: String? = null, - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -122,149 +120,143 @@ public data class SearchForFacets( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -275,49 +267,49 @@ public data class SearchForFacets( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetsOptions.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetsOptions.kt index 9c459567a2..3cc7dd414a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetsOptions.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacetsOptions.kt @@ -8,10 +8,10 @@ import kotlinx.serialization.json.* * SearchForFacetsOptions * * @param facet Facet name. - * @param indexName Algolia index name. + * @param indexName Index name. * @param type * @param facetQuery Text to search inside the facet's values. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @Serializable public data class SearchForFacetsOptions( @@ -19,7 +19,7 @@ public data class SearchForFacetsOptions( /** Facet name. */ @SerialName(value = "facet") val facet: String, - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, @SerialName(value = "type") val type: SearchTypeFacet, @@ -27,6 +27,6 @@ public data class SearchForFacetsOptions( /** Text to search inside the facet's values. */ @SerialName(value = "facetQuery") val facetQuery: String? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt index 13ea3b7fa0..4dc3d060f7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt @@ -7,104 +7,102 @@ import kotlinx.serialization.json.* /** * SearchForHits * - * @param indexName Algolia index name. + * @param indexName Index name. * @param params Search parameters as a URL-encoded query string. - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter * @param type */ @Serializable public data class SearchForHits( - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, /** Search parameters as a URL-encoded query string. */ @SerialName(value = "params") val params: String? = null, - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -115,149 +113,143 @@ public data class SearchForHits( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -268,49 +260,49 @@ public data class SearchForHits( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHitsOptions.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHitsOptions.kt index 234da4a77b..192183aa8a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHitsOptions.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHitsOptions.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.json.* /** * SearchForHitsOptions * - * @param indexName Algolia index name. + * @param indexName Index name. * @param type */ @Serializable public data class SearchForHitsOptions( - /** Algolia index name. */ + /** Index name. */ @SerialName(value = "indexName") val indexName: String, @SerialName(value = "type") val type: SearchTypeDefault? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchHits.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchHits.kt index 8e346af94d..77314b7205 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchHits.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchHits.kt @@ -10,16 +10,17 @@ import kotlinx.serialization.json.* /** * SearchHits * - * @param hits - * @param query Text to search for in an index. + * @param hits Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. + * @param query Search query. * @param params URL-encoded string of all search parameters. */ @Serializable(SearchHitsSerializer::class) public data class SearchHits( + /** Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. */ val hits: List, - /** Text to search for in an index. */ + /** Search query. */ val query: String, /** URL-encoded string of all search parameters. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt index ca2b703aa0..5787b3bf9b 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt @@ -7,95 +7,93 @@ import kotlinx.serialization.json.* /** * SearchParamsObject * - * @param query Text to search for in an index. - * @param similarQuery Overrides the query parameter and performs a more generic search. - * @param filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param query Search query. + * @param similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. + * @param filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param facetFilters * @param optionalFilters * @param numericFilters * @param tagFilters - * @param sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. - * @param restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * @param facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. - * @param facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. - * @param page Page to retrieve (the first page is `0`, not `1`). - * @param offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * @param aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. - * @param aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + * @param restrictSearchableAttributes Restricts a search to a subset of your searchable attributes. + * @param facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + * @param facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. + * @param page Page of search results to retrieve. + * @param offset Position of the first hit to retrieve. + * @param length Number of hits to retrieve (used in combination with `offset`). + * @param aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. + * @param aroundLatLngViaIP Whether to obtain the coordinates from the request's IP address. * @param aroundRadius * @param aroundPrecision - * @param minimumAroundRadius Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * @param insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * @param naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. - * @param ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. - * @param personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * @param userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. - * @param getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain Enriches the API's response with information about how the query was processed. - * @param synonyms Whether to take into account an index's synonyms for a particular search. - * @param clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * @param analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param minimumAroundRadius Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. + * @param insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * @param insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. + * @param naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. + * @param ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. + * @param personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + * @param getRankingInfo Whether the search response should include detailed ranking information. + * @param synonyms Whether to take into account an index's synonyms for this search. + * @param clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). + * @param analytics Whether this search will be included in Analytics. * @param analyticsTags Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * @param percentileComputation Whether to include or exclude a query from the processing-time percentile computation. - * @param enableABTest Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. - * @param ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * @param customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. - * @param attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * @param attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. - * @param highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results. - * @param highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param percentileComputation Whether to include this search when calculating processing-time percentiles. + * @param enableABTest Whether to enable A/B testing for this search. + * @param attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. + * @param ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). + * @param customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + * @param relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. + * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). + * @param attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. + * @param highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets. + * @param highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. - * @param restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * @param hitsPerPage Number of hits per page. - * @param minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * @param minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param typoTolerance - * @param allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. + * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * @param queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. - * @param decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. - * @param enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * @param enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. + * @param queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). + * @param decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + * @param enableRules Whether to enable rules. + * @param enablePersonalization Whether to enable Personalization. * @param queryType * @param removeWordsIfNoResults * @param mode * @param semanticSearch - * @param advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * @param optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. - * @param disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. + * @param optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). + * @param disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param exactOnSingleWordQuery - * @param alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * @param advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * @param alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. + * @param advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * @param distinct - * @param replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. - * @param minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * @param responseFields Attributes to include in the API response for search and browse queries. - * @param maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. + * @param minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. + * @param responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. + * @param maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet Maximum number of facet values to return for each facet. - * @param sortFacetValuesBy Controls how facet values are fetched. - * @param attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). + * @param attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * @param renderingContent - * @param enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param reRankingApplyFilter */ @Serializable public data class SearchParamsObject( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, - /** Overrides the query parameter and performs a more generic search. */ + /** Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. */ @SerialName(value = "similarQuery") val similarQuery: String? = null, - /** [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. */ + /** Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). */ @SerialName(value = "filters") val filters: String? = null, @SerialName(value = "facetFilters") val facetFilters: FacetFilters? = null, @@ -106,149 +104,143 @@ public data class SearchParamsObject( @SerialName(value = "tagFilters") val tagFilters: TagFilters? = null, - /** Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. */ + /** Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). */ @SerialName(value = "sumOrFiltersScores") val sumOrFiltersScores: Boolean? = null, - /** Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). */ + /** Restricts a search to a subset of your searchable attributes. */ @SerialName(value = "restrictSearchableAttributes") val restrictSearchableAttributes: List? = null, - /** Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. */ + /** Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). */ @SerialName(value = "facets") val facets: List? = null, - /** Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. */ + /** Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. */ @SerialName(value = "facetingAfterDistinct") val facetingAfterDistinct: Boolean? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, - /** Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Position of the first hit to retrieve. */ @SerialName(value = "offset") val offset: Int? = null, - /** Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). */ + /** Number of hits to retrieve (used in combination with `offset`). */ @SerialName(value = "length") val length: Int? = null, - /** Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. */ + /** Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. */ @SerialName(value = "aroundLatLng") val aroundLatLng: String? = null, - /** Search for entries around a location. The location is automatically computed from the requester's IP address. */ + /** Whether to obtain the coordinates from the request's IP address. */ @SerialName(value = "aroundLatLngViaIP") val aroundLatLngViaIP: Boolean? = null, @SerialName(value = "aroundRadius") val aroundRadius: AroundRadius? = null, @SerialName(value = "aroundPrecision") val aroundPrecision: AroundPrecision? = null, - /** Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. */ + /** Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. */ @SerialName(value = "minimumAroundRadius") val minimumAroundRadius: Int? = null, - /** Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). */ @SerialName(value = "insideBoundingBox") val insideBoundingBox: List>? = null, - /** Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). */ + /** Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. */ @SerialName(value = "insidePolygon") val insidePolygon: List>? = null, - /** Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. */ + /** ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. */ @SerialName(value = "naturalLanguages") val naturalLanguages: List? = null, - /** Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. */ + /** Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. */ @SerialName(value = "ruleContexts") val ruleContexts: List? = null, - /** Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ + /** Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). */ @SerialName(value = "personalizationImpact") val personalizationImpact: Int? = null, - /** Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. */ + /** Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ @SerialName(value = "userToken") val userToken: String? = null, - /** Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). */ + /** Whether the search response should include detailed ranking information. */ @SerialName(value = "getRankingInfo") val getRankingInfo: Boolean? = null, - /** Enriches the API's response with information about how the query was processed. */ - @SerialName(value = "explain") val explain: List? = null, - - /** Whether to take into account an index's synonyms for a particular search. */ + /** Whether to take into account an index's synonyms for this search. */ @SerialName(value = "synonyms") val synonyms: Boolean? = null, - /** Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). */ + /** Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). */ @SerialName(value = "clickAnalytics") val clickAnalytics: Boolean? = null, - /** Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). */ + /** Whether this search will be included in Analytics. */ @SerialName(value = "analytics") val analytics: Boolean? = null, /** Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). */ @SerialName(value = "analyticsTags") val analyticsTags: List? = null, - /** Whether to include or exclude a query from the processing-time percentile computation. */ + /** Whether to include this search when calculating processing-time percentiles. */ @SerialName(value = "percentileComputation") val percentileComputation: Boolean? = null, - /** Incidates whether this search will be considered in A/B testing. */ + /** Whether to enable A/B testing for this search. */ @SerialName(value = "enableABTest") val enableABTest: Boolean? = null, - /** Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. */ - @SerialName(value = "attributesForFaceting") val attributesForFaceting: List? = null, - - /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. */ + /** Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, - /** Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). */ + /** Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. */ + /** Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. */ @SerialName(value = "customRanking") val customRanking: List? = null, - /** Relevancy threshold below which less relevant results aren't included in the results. */ + /** Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, - /** Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). */ + /** Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). */ @SerialName(value = "attributesToHighlight") val attributesToHighlight: List? = null, - /** Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. */ + /** Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. */ @SerialName(value = "attributesToSnippet") val attributesToSnippet: List? = null, - /** HTML string to insert before the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert before the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPreTag") val highlightPreTag: String? = null, - /** HTML string to insert after the highlighted parts in all highlight and snippet results. */ + /** HTML tag to insert after the highlighted parts in all highlighted results and snippets. */ @SerialName(value = "highlightPostTag") val highlightPostTag: String? = null, /** String used as an ellipsis indicator when a snippet is truncated. */ @SerialName(value = "snippetEllipsisText") val snippetEllipsisText: String? = null, - /** Restrict highlighting and snippeting to items that matched the query. */ + /** Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. */ @SerialName(value = "restrictHighlightAndSnippetArrays") val restrictHighlightAndSnippetArrays: Boolean? = null, /** Number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor1Typo") val minWordSizefor1Typo: Int? = null, - /** Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ + /** Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). */ @SerialName(value = "minWordSizefor2Typos") val minWordSizefor2Typos: Int? = null, @SerialName(value = "typoTolerance") val typoTolerance: TypoTolerance? = null, - /** Whether to allow typos on numbers (\"numeric tokens\") in the query string. */ + /** Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. */ @SerialName(value = "allowTyposOnNumericTokens") val allowTyposOnNumericTokens: Boolean? = null, - /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). */ + /** Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. */ @SerialName(value = "disableTypoToleranceOnAttributes") val disableTypoToleranceOnAttributes: List? = null, @SerialName(value = "ignorePlurals") val ignorePlurals: IgnorePlurals? = null, @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). */ + /** Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. */ @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. */ + /** [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, - /** [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. */ + /** Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. */ @SerialName(value = "decompoundQuery") val decompoundQuery: Boolean? = null, - /** Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. */ + /** Whether to enable rules. */ @SerialName(value = "enableRules") val enableRules: Boolean? = null, - /** Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. */ + /** Whether to enable Personalization. */ @SerialName(value = "enablePersonalization") val enablePersonalization: Boolean? = null, @SerialName(value = "queryType") val queryType: QueryType? = null, @@ -259,49 +251,49 @@ public data class SearchParamsObject( @SerialName(value = "semanticSearch") val semanticSearch: SemanticSearch? = null, - /** Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). */ + /** Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. */ @SerialName(value = "advancedSyntax") val advancedSyntax: Boolean? = null, - /** Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. */ + /** Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). */ @SerialName(value = "optionalWords") val optionalWords: List? = null, - /** Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. */ @SerialName(value = "disableExactOnAttributes") val disableExactOnAttributes: List? = null, @SerialName(value = "exactOnSingleWordQuery") val exactOnSingleWordQuery: ExactOnSingleWordQuery? = null, - /** Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). */ + /** Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. */ @SerialName(value = "alternativesAsExact") val alternativesAsExact: List? = null, - /** Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. */ + /** Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. */ @SerialName(value = "advancedSyntaxFeatures") val advancedSyntaxFeatures: List? = null, @SerialName(value = "distinct") val distinct: Distinct? = null, - /** Whether to highlight and snippet the original word that matches the synonym or the synonym itself. */ + /** Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. */ @SerialName(value = "replaceSynonymsInHighlight") val replaceSynonymsInHighlight: Boolean? = null, - /** Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). */ + /** Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. */ @SerialName(value = "minProximity") val minProximity: Int? = null, - /** Attributes to include in the API response for search and browse queries. */ + /** Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. */ @SerialName(value = "responseFields") val responseFields: List? = null, - /** Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ + /** Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, /** Maximum number of facet values to return for each facet. */ @SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null, - /** Controls how facet values are fetched. */ + /** Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). */ @SerialName(value = "sortFacetValuesBy") val sortFacetValuesBy: String? = null, - /** When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. */ + /** Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. */ @SerialName(value = "attributeCriteriaComputedByMinProximity") val attributeCriteriaComputedByMinProximity: Boolean? = null, @SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null, - /** Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). */ + /** Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ @SerialName(value = "enableReRanking") val enableReRanking: Boolean? = null, @SerialName(value = "reRankingApplyFilter") val reRankingApplyFilter: ReRankingApplyFilter? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsQuery.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsQuery.kt index 8124450134..aa4afee4f3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsQuery.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsQuery.kt @@ -7,11 +7,11 @@ import kotlinx.serialization.json.* /** * SearchParamsQuery * - * @param query Text to search for in an index. + * @param query Search query. */ @Serializable public data class SearchParamsQuery( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt index 4d50fa337f..8dd300ace4 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt @@ -11,22 +11,22 @@ import kotlinx.serialization.json.* * SearchResponse * * @param hitsPerPage Number of hits per page. - * @param nbHits Number of hits the search query matched. - * @param nbPages Number of pages of results for the current query. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param nbHits Number of results (hits). + * @param nbPages Number of pages of results. + * @param page Page of search results to retrieve. * @param processingTimeMS Time the server took to process the request, in milliseconds. - * @param hits - * @param query Text to search for in an index. + * @param hits Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. + * @param query Search query. * @param params URL-encoded string of all search parameters. * @param abTestID A/B test ID. This is only included in the response for indices that are part of an A/B test. * @param abTestVariantID Variant ID. This is only included in the response for indices that are part of an A/B test. * @param aroundLatLng Computed geographical location. - * @param automaticRadius Automatically-computed radius. + * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. - * @param facets Mapping of each facet name to the corresponding facet counts. + * @param facets Facet counts. * @param facetsStats Statistics for numerical facets. * @param index Index name used for the query. * @param indexUsed Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query. @@ -39,7 +39,7 @@ import kotlinx.serialization.json.* * @param renderingContent * @param serverTimeMS Time the server took to process the request, in milliseconds. * @param serverUsed Host name of the server that processed the request. - * @param userData Lets you store custom data in your indices. + * @param userData An object with custom data. You can store up to 32 kB as custom data. * @param queryID Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ @Serializable(SearchResponseSerializer::class) @@ -48,21 +48,22 @@ public data class SearchResponse( /** Number of hits per page. */ val hitsPerPage: Int, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ val nbHits: Int, - /** Number of pages of results for the current query. */ + /** Number of pages of results. */ val nbPages: Int, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ val page: Int, /** Time the server took to process the request, in milliseconds. */ val processingTimeMS: Int, + /** Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. */ val hits: List, - /** Text to search for in an index. */ + /** Search query. */ val query: String, /** URL-encoded string of all search parameters. */ @@ -77,7 +78,7 @@ public data class SearchResponse( /** Computed geographical location. */ val aroundLatLng: String? = null, - /** Automatically-computed radius. */ + /** Distance from a central coordinate provided by `aroundLatLng`. */ val automaticRadius: String? = null, val exhaustive: Exhaustive? = null, @@ -94,7 +95,7 @@ public data class SearchResponse( @Deprecated(message = "This property is deprecated.") val exhaustiveTypo: Boolean? = null, - /** Mapping of each facet name to the corresponding facet counts. */ + /** Facet counts. */ val facets: Map>? = null, /** Statistics for numerical facets. */ @@ -131,7 +132,7 @@ public data class SearchResponse( /** Host name of the server that processed the request. */ val serverUsed: String? = null, - /** Lets you store custom data in your indices. */ + /** An object with custom data. You can store up to 32 kB as custom data. */ val userData: JsonObject? = null, /** Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesParams.kt index 391be59cc6..b4a1f756bb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesParams.kt @@ -7,34 +7,30 @@ import kotlinx.serialization.json.* /** * Rules search parameters. * - * @param query Rule object query. + * @param query Search query for rules. * @param anchoring - * @param context Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). - * @param page Requested page (the first page is page 0). + * @param context Only return rules that match the context (exact match). + * @param page Requested page of the API response. * @param hitsPerPage Maximum number of hits per page. - * @param enabled Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. - * @param requestOptions Request options to send with the API call. + * @param enabled If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. */ @Serializable public data class SearchRulesParams( - /** Rule object query. */ + /** Search query for rules. */ @SerialName(value = "query") val query: String? = null, @SerialName(value = "anchoring") val anchoring: Anchoring? = null, - /** Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). */ + /** Only return rules that match the context (exact match). */ @SerialName(value = "context") val context: String? = null, - /** Requested page (the first page is page 0). */ + /** Requested page of the API response. */ @SerialName(value = "page") val page: Int? = null, /** Maximum number of hits per page. */ @SerialName(value = "hitsPerPage") val hitsPerPage: Int? = null, - /** Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. */ + /** If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. */ @SerialName(value = "enabled") val enabled: Boolean? = null, - - /** Request options to send with the API call. */ - @SerialName(value = "requestOptions") val requestOptions: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesResponse.kt index b89d229612..d5f358f9ba 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchRulesResponse.kt @@ -7,18 +7,18 @@ import kotlinx.serialization.json.* /** * SearchRulesResponse * - * @param hits Fetched rules. - * @param nbHits Number of fetched rules. + * @param hits Rules that matched the search criteria. + * @param nbHits Number of rules that matched the search criteria. * @param page Current page. * @param nbPages Number of pages. */ @Serializable public data class SearchRulesResponse( - /** Fetched rules. */ + /** Rules that matched the search criteria. */ @SerialName(value = "hits") val hits: List, - /** Number of fetched rules. */ + /** Number of rules that matched the search criteria. */ @SerialName(value = "nbHits") val nbHits: Int, /** Current page. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchStrategy.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchStrategy.kt index 316fca9f50..109a955016 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchStrategy.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchStrategy.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. + * Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. */ @Serializable public enum class SearchStrategy(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsParams.kt index 6022dc8033..5c8d220bab 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsParams.kt @@ -7,20 +7,20 @@ import kotlinx.serialization.json.* /** * SearchSynonymsParams * - * @param query Text to search for in an index. + * @param query Search query. * @param type - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param page Page of search results to retrieve. * @param hitsPerPage Number of hits per page. */ @Serializable public data class SearchSynonymsParams( - /** Text to search for in an index. */ + /** Search query. */ @SerialName(value = "query") val query: String? = null, @SerialName(value = "type") val type: SynonymType? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, /** Number of hits per page. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsResponse.kt index cff8914fec..6b8f89b87d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchSynonymsResponse.kt @@ -10,16 +10,16 @@ import kotlinx.serialization.json.* /** * SearchSynonymsResponse * - * @param hits Synonym objects. - * @param nbHits Number of hits the search query matched. + * @param hits Matching synonyms. + * @param nbHits Number of results (hits). */ @Serializable(SearchSynonymsResponseSerializer::class) public data class SearchSynonymsResponse( - /** Synonym objects. */ + /** Matching synonyms. */ val hits: List, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ val nbHits: Int, val additionalProperties: Map? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsParams.kt index 5e121fd1d1..a8253b4188 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsParams.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.* * * @param query Query to search. The search is a prefix search with [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) enabled. An empty query will retrieve all users. * @param clusterName Cluster name. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param page Page of search results to retrieve. * @param hitsPerPage Number of hits per page. */ @Serializable @@ -21,7 +21,7 @@ public data class SearchUserIdsParams( /** Cluster name. */ @SerialName(value = "clusterName") val clusterName: String? = null, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int? = null, /** Number of hits per page. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsResponse.kt index c9ea2bd1c7..6257aaa495 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchUserIdsResponse.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.json.* * userIDs data. * * @param hits User objects that match the query. - * @param nbHits Number of hits the search query matched. - * @param page Page to retrieve (the first page is `0`, not `1`). + * @param nbHits Number of results (hits). + * @param page Page of search results to retrieve. * @param hitsPerPage Maximum number of hits per page. * @param updatedAt Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @@ -19,10 +19,10 @@ public data class SearchUserIdsResponse( /** User objects that match the query. */ @SerialName(value = "hits") val hits: List, - /** Number of hits the search query matched. */ + /** Number of results (hits). */ @SerialName(value = "nbHits") val nbHits: Int, - /** Page to retrieve (the first page is `0`, not `1`). */ + /** Page of search results to retrieve. */ @SerialName(value = "page") val page: Int, /** Maximum number of hits per page. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SecuredAPIKeyRestrictions.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SecuredAPIKeyRestrictions.kt index 804afcac50..b1b60214c3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SecuredAPIKeyRestrictions.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SecuredAPIKeyRestrictions.kt @@ -8,29 +8,29 @@ import kotlinx.serialization.json.* * SecuredAPIKeyRestrictions * * @param searchParams - * @param filters Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). - * @param validUntil Unix timestamp used to set the expiration date of the API key. - * @param restrictIndices Index names that can be queried. - * @param restrictSources IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). - * @param userToken Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + * @param filters Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. + * @param validUntil Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. + * @param restrictIndices Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". + * @param restrictSources IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. + * @param userToken Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. */ @Serializable public data class SecuredAPIKeyRestrictions( @SerialName(value = "searchParams") val searchParams: SearchParamsObject? = null, - /** Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). */ + /** Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. */ @SerialName(value = "filters") val filters: String? = null, - /** Unix timestamp used to set the expiration date of the API key. */ + /** Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. */ @SerialName(value = "validUntil") val validUntil: Long? = null, - /** Index names that can be queried. */ + /** Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". */ @SerialName(value = "restrictIndices") val restrictIndices: List? = null, - /** IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). */ + /** IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. */ @SerialName(value = "restrictSources") val restrictSources: String? = null, - /** Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. */ + /** Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. */ @SerialName(value = "userToken") val userToken: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SemanticSearch.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SemanticSearch.kt index 673943935b..e98a9403d8 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SemanticSearch.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SemanticSearch.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. * - * @param eventSources Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + * @param eventSources Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. */ @Serializable public data class SemanticSearch( - /** Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. */ + /** Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. */ @SerialName(value = "eventSources") val eventSources: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SnippetResultOption.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SnippetResultOption.kt index f8d0684c2d..3963d1f0f7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SnippetResultOption.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SnippetResultOption.kt @@ -5,15 +5,15 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. * - * @param `value` Markup text with `facetQuery` matches highlighted. + * @param `value` Highlighted attribute value, including HTML tags. * @param matchLevel */ @Serializable public data class SnippetResultOption( - /** Markup text with `facetQuery` matches highlighted. */ + /** Highlighted attribute value, including HTML tags. */ @SerialName(value = "value") val `value`: String, @SerialName(value = "matchLevel") val matchLevel: MatchLevel, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SortRemainingBy.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SortRemainingBy.kt index 72ee1045ad..4ca03e5342 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SortRemainingBy.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SortRemainingBy.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + * Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. */ @Serializable public enum class SortRemainingBy(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TagFilters.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TagFilters.kt index 75e241506d..e8aa1c48cd 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TagFilters.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TagFilters.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. * * Implementations: * - [List] - *[TagFilters.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TaskStatus.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TaskStatus.kt index e6990478b0..f11af7ef82 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TaskStatus.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TaskStatus.kt @@ -4,7 +4,7 @@ package com.algolia.client.model.search import kotlinx.serialization.* /** - * _published_ if the task has been processed, _notPublished_ otherwise. + * Task status, `published` if the task is completed, `notPublished` otherwise. */ @Serializable public enum class TaskStatus(public val value: kotlin.String) { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TimeRange.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TimeRange.kt index 8411357173..e8449df0d3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TimeRange.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TimeRange.kt @@ -7,15 +7,15 @@ import kotlinx.serialization.json.* /** * TimeRange * - * @param from Lower bound of the time range (Unix timestamp). - * @param until Upper bound of the time range (Unix timestamp). + * @param from When the rule should start to be active, in Unix epoch time. + * @param until When the rule should stop to be active, in Unix epoch time. */ @Serializable public data class TimeRange( - /** Lower bound of the time range (Unix timestamp). */ + /** When the rule should start to be active, in Unix epoch time. */ @SerialName(value = "from") val from: Int, - /** Upper bound of the time range (Unix timestamp). */ + /** When the rule should stop to be active, in Unix epoch time. */ @SerialName(value = "until") val until: Int, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoTolerance.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoTolerance.kt index e798561a7f..84ea3d03c8 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoTolerance.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoTolerance.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* import kotlin.jvm.JvmInline /** - * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. * * Implementations: * - [Boolean] - *[TypoTolerance.of]* diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoToleranceEnum.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoToleranceEnum.kt index c3b802f921..b605e63ace 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoToleranceEnum.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/TypoToleranceEnum.kt @@ -3,6 +3,9 @@ package com.algolia.client.model.search import kotlinx.serialization.* +/** + * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. + */ @Serializable public enum class TypoToleranceEnum(public val value: kotlin.String) : TypoTolerance { diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtResponse.kt index 1e75961e1a..8e0bba0114 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtResponse.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.json.* /** * Response, taskID, and update timestamp. * - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * @param updatedAt Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @Serializable public data class UpdatedAtResponse( - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, /** Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtWithObjectIdResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtWithObjectIdResponse.kt index 2770869708..0f2c9113ce 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtWithObjectIdResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedAtWithObjectIdResponse.kt @@ -7,19 +7,19 @@ import kotlinx.serialization.json.* /** * Response, taskID, unique object identifier, and an update timestamp. * - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * @param updatedAt Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * @param objectID Unique object identifier. + * @param objectID Unique record identifier. */ @Serializable public data class UpdatedAtWithObjectIdResponse( - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long? = null, /** Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @SerialName(value = "updatedAt") val updatedAt: String? = null, - /** Unique object identifier. */ + /** Unique record identifier. */ @SerialName(value = "objectID") val objectID: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedRuleResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedRuleResponse.kt index 7fc137380f..a551d4a300 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedRuleResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UpdatedRuleResponse.kt @@ -7,19 +7,19 @@ import kotlinx.serialization.json.* /** * UpdatedRuleResponse * - * @param objectID Unique object identifier. + * @param objectID Unique identifier of a rule object. * @param updatedAt Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @Serializable public data class UpdatedRuleResponse( - /** Unique object identifier. */ + /** Unique identifier of a rule object. */ @SerialName(value = "objectID") val objectID: String, /** Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ @SerialName(value = "updatedAt") val updatedAt: String, - /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. */ + /** Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. */ @SerialName(value = "taskID") val taskID: Long, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserHit.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserHit.kt index 4dbcfeedd4..68ddf00024 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserHit.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserHit.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.json.* /** * UserHit * - * @param userID userID of the user. + * @param userID User ID. * @param clusterName Cluster name. * @param nbRecords Number of records in the cluster. * @param dataSize Data size taken by all the users assigned to the cluster. @@ -17,7 +17,7 @@ import kotlinx.serialization.json.* @Serializable public data class UserHit( - /** userID of the user. */ + /** User ID. */ @SerialName(value = "userID") val userID: String, /** Cluster name. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserId.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserId.kt index f33f105f83..800764c115 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserId.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/UserId.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.json.* /** * Unique user ID. * - * @param userID userID of the user. + * @param userID User ID. * @param clusterName Cluster to which the user is assigned. * @param nbRecords Number of records belonging to the user. * @param dataSize Data size used by the user. @@ -15,7 +15,7 @@ import kotlinx.serialization.json.* @Serializable public data class UserId( - /** userID of the user. */ + /** User ID. */ @SerialName(value = "userID") val userID: String, /** Cluster to which the user is assigned. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Value.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Value.kt index 9f501cb9b8..ca35a70d7e 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Value.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Value.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.json.* /** * Value * - * @param order Pinned order of facet lists. + * @param order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. * @param sortRemainingBy */ @Serializable public data class Value( - /** Pinned order of facet lists. */ + /** Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. */ @SerialName(value = "order") val order: List? = null, @SerialName(value = "sortRemainingBy") val sortRemainingBy: SortRemainingBy? = null, diff --git a/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php b/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php index 66252d3d8d..823d68cebb 100644 --- a/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php +++ b/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php @@ -368,8 +368,8 @@ public function getABTest($id, $requestOptions = []) * Required API Key ACLs: * - analytics * - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) - * @param int $limit Number of records to return (page size). (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) + * @param int $limit Number of items to return. (optional, default to 10) * @param string $indexPrefix Only return A/B tests for indices starting with this prefix. (optional) * @param string $indexSuffix Only return A/B tests for indices ending with this suffix. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions @@ -378,6 +378,10 @@ public function getABTest($id, $requestOptions = []) */ public function listABTests($offset = null, $limit = null, $indexPrefix = null, $indexSuffix = null, $requestOptions = []) { + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AbtestingClient.listABTests, must be bigger than or equal to 0.'); + } + $resourcePath = '/2/abtests'; $queryParameters = []; $headers = []; diff --git a/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php b/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php index c5203acfa3..2458d92790 100644 --- a/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php +++ b/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php @@ -260,9 +260,9 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -276,13 +276,6 @@ public function getAverageClickPosition($index, $startDate = null, $endDate = nu 'Parameter `index` is required when calling `getAverageClickPosition`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getAverageClickPosition, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getAverageClickPosition, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/clicks/averageClickPosition'; $queryParameters = []; @@ -314,9 +307,9 @@ public function getAverageClickPosition($index, $startDate = null, $endDate = nu * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -330,13 +323,6 @@ public function getClickPositions($index, $startDate = null, $endDate = null, $t 'Parameter `index` is required when calling `getClickPositions`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getClickPositions, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getClickPositions, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/clicks/positions'; $queryParameters = []; @@ -368,9 +354,9 @@ public function getClickPositions($index, $startDate = null, $endDate = null, $t * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -384,13 +370,6 @@ public function getClickThroughRate($index, $startDate = null, $endDate = null, 'Parameter `index` is required when calling `getClickThroughRate`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getClickThroughRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getClickThroughRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/clicks/clickThroughRate'; $queryParameters = []; @@ -422,9 +401,9 @@ public function getClickThroughRate($index, $startDate = null, $endDate = null, * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -438,13 +417,6 @@ public function getConversationRate($index, $startDate = null, $endDate = null, 'Parameter `index` is required when calling `getConversationRate`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getConversationRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getConversationRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/conversions/conversionRate'; $queryParameters = []; @@ -476,9 +448,9 @@ public function getConversationRate($index, $startDate = null, $endDate = null, * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -492,13 +464,6 @@ public function getNoClickRate($index, $startDate = null, $endDate = null, $tags 'Parameter `index` is required when calling `getNoClickRate`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getNoClickRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getNoClickRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/searches/noClickRate'; $queryParameters = []; @@ -530,9 +495,9 @@ public function getNoClickRate($index, $startDate = null, $endDate = null, $tags * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -546,13 +511,6 @@ public function getNoResultsRate($index, $startDate = null, $endDate = null, $ta 'Parameter `index` is required when calling `getNoResultsRate`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getNoResultsRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getNoResultsRate, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/searches/noResultRate'; $queryParameters = []; @@ -584,9 +542,9 @@ public function getNoResultsRate($index, $startDate = null, $endDate = null, $ta * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -600,13 +558,6 @@ public function getSearchesCount($index, $startDate = null, $endDate = null, $ta 'Parameter `index` is required when calling `getSearchesCount`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getSearchesCount, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getSearchesCount, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/searches/count'; $queryParameters = []; @@ -638,11 +589,11 @@ public function getSearchesCount($index, $startDate = null, $endDate = null, $ta * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -656,12 +607,8 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null, 'Parameter `index` is required when calling `getSearchesNoClicks`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getSearchesNoClicks, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getSearchesNoClicks, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoClicks, must be bigger than or equal to 0.'); } $resourcePath = '/2/searches/noClicks'; @@ -702,11 +649,11 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null, * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -720,12 +667,8 @@ public function getSearchesNoResults($index, $startDate = null, $endDate = null, 'Parameter `index` is required when calling `getSearchesNoResults`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getSearchesNoResults, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getSearchesNoResults, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoResults, must be bigger than or equal to 0.'); } $resourcePath = '/2/searches/noResults'; @@ -766,7 +709,7 @@ public function getSearchesNoResults($index, $startDate = null, $endDate = null, * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) + * @param string $index Index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Analytics\GetStatusResponse|array @@ -798,11 +741,11 @@ public function getStatus($index, $requestOptions = []) * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -816,12 +759,8 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim 'Parameter `index` is required when calling `getTopCountries`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getTopCountries, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getTopCountries, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopCountries, must be bigger than or equal to 0.'); } $resourcePath = '/2/countries'; @@ -862,12 +801,12 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) + * @param string $index Index name. (required) * @param string $search User query. (optional) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -881,12 +820,8 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null 'Parameter `index` is required when calling `getTopFilterAttributes`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getTopFilterAttributes, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getTopFilterAttributes, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterAttributes, must be bigger than or equal to 0.'); } $resourcePath = '/2/filters'; @@ -932,12 +867,12 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null * - analytics * * @param string $attribute Attribute name. (required) - * @param string $index Index name to target. (required) + * @param string $index Index name. (required) * @param string $search User query. (optional) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -957,12 +892,8 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st 'Parameter `index` is required when calling `getTopFilterForAttribute`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getTopFilterForAttribute, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getTopFilterForAttribute, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterForAttribute, must be bigger than or equal to 0.'); } $resourcePath = '/2/filters/{attribute}'; @@ -1016,12 +947,12 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) + * @param string $index Index name. (required) * @param string $search User query. (optional) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -1035,12 +966,8 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null 'Parameter `index` is required when calling `getTopFiltersNoResults`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getTopFiltersNoResults, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getTopFiltersNoResults, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFiltersNoResults, must be bigger than or equal to 0.'); } $resourcePath = '/2/filters/noResults'; @@ -1085,13 +1012,13 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) + * @param string $index Index name. (required) * @param string $search User query. (optional) * @param bool $clickAnalytics Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -1105,12 +1032,8 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $star 'Parameter `index` is required when calling `getTopHits`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getTopHits, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getTopHits, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopHits, must be bigger than or equal to 0.'); } $resourcePath = '/2/hits'; @@ -1159,14 +1082,14 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $star * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) + * @param string $index Index name. (required) * @param bool $clickAnalytics Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, default to false) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param array $orderBy Reorder the results. (optional) * @param array $direction Sorting direction of the results: ascending or descending. (optional) - * @param int $limit Number of records to return (page size). (optional, default to 10) - * @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0) + * @param int $limit Number of items to return. (optional, default to 10) + * @param int $offset Position of the first item to return. (optional, default to 0) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -1180,12 +1103,8 @@ public function getTopSearches($index, $clickAnalytics = null, $startDate = null 'Parameter `index` is required when calling `getTopSearches`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getTopSearches, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getTopSearches, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); + if (null !== $offset && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopSearches, must be bigger than or equal to 0.'); } $resourcePath = '/2/searches'; @@ -1238,9 +1157,9 @@ public function getTopSearches($index, $clickAnalytics = null, $startDate = null * Required API Key ACLs: * - analytics * - * @param string $index Index name to target. (required) - * @param string $startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) - * @param string $endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. (optional) + * @param string $index Index name. (required) + * @param array $startDate Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + * @param array $endDate End date (`YYYY-MM-DD`) of the period to analyze. (optional) * @param string $tags Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -1254,13 +1173,6 @@ public function getUsersCount($index, $startDate = null, $endDate = null, $tags 'Parameter `index` is required when calling `getUsersCount`.' ); } - if (null !== $startDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $startDate)) { - throw new \InvalidArgumentException('invalid value for "startDate" when calling AnalyticsClient.getUsersCount, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } - - if (null !== $endDate && !preg_match('/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/', $endDate)) { - throw new \InvalidArgumentException('invalid value for "endDate" when calling AnalyticsClient.getUsersCount, must conform to the pattern /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.'); - } $resourcePath = '/2/users/count'; $queryParameters = []; diff --git a/clients/algoliasearch-client-php/lib/Api/RecommendClient.php b/clients/algoliasearch-client-php/lib/Api/RecommendClient.php index 45900d7dec..5848ef3b32 100644 --- a/clients/algoliasearch-client-php/lib/Api/RecommendClient.php +++ b/clients/algoliasearch-client-php/lib/Api/RecommendClient.php @@ -260,9 +260,9 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) - * @param string $objectID Unique record (object) identifier. (required) + * @param string $objectID Unique record identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Recommend\DeletedAtResponse|array @@ -329,9 +329,9 @@ public function deleteRecommendRule($indexName, $model, $objectID, $requestOptio * Required API Key ACLs: * - settings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) - * @param string $objectID Unique record (object) identifier. (required) + * @param string $objectID Unique record identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Recommend\RuleResponse|array @@ -398,7 +398,7 @@ public function getRecommendRule($indexName, $model, $objectID, $requestOptions * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) * @param int $taskID Unique identifier of a task. Numeric value (up to 64bits). (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions @@ -499,12 +499,12 @@ public function getRecommendations($getRecommendationsParams, $requestOptions = * Required API Key ACLs: * - settings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $model [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) * @param array $searchRecommendRulesParams searchRecommendRulesParams (optional) - * - $searchRecommendRulesParams['query'] => (string) Full-text query. + * - $searchRecommendRulesParams['query'] => (string) Search query. * - $searchRecommendRulesParams['context'] => (string) Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). - * - $searchRecommendRulesParams['page'] => (int) Requested page (the first page is page 0). + * - $searchRecommendRulesParams['page'] => (int) Requested page of the API response. * - $searchRecommendRulesParams['hitsPerPage'] => (int) Maximum number of hits per page. * - $searchRecommendRulesParams['enabled'] => (bool) Restricts responses to enabled rules. When absent (default), _all_ rules are retrieved. * diff --git a/clients/algoliasearch-client-php/lib/Api/SearchClient.php b/clients/algoliasearch-client-php/lib/Api/SearchClient.php index 8591e224d8..eceef770b4 100644 --- a/clients/algoliasearch-client-php/lib/Api/SearchClient.php +++ b/clients/algoliasearch-client-php/lib/Api/SearchClient.php @@ -103,20 +103,20 @@ public function getClientConfig() } /** - * Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + * Creates a new API key with specific permissions and restrictions. * * Required API Key ACLs: * - admin * * @param array $apiKey apiKey (required) - * - $apiKey['acl'] => (array) [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. (required) - * - $apiKey['description'] => (string) Description of an API key for you and your team members. - * - $apiKey['indexes'] => (array) Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". - * - $apiKey['maxHitsPerQuery'] => (int) Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * - $apiKey['maxQueriesPerIPPerHour'] => (int) Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * - $apiKey['queryParameters'] => (string) Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. - * - $apiKey['referers'] => (array) Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". - * - $apiKey['validity'] => (int) Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + * - $apiKey['acl'] => (array) Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). (required) + * - $apiKey['description'] => (string) Description of an API key to help you identify this API key. + * - $apiKey['indexes'] => (array) Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". + * - $apiKey['maxHitsPerQuery'] => (int) Maximum number of results this API key can retrieve in one query. By default, there's no limit. + * - $apiKey['maxQueriesPerIPPerHour'] => (int) Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. + * - $apiKey['queryParameters'] => (string) Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. + * - $apiKey['referers'] => (array) Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). + * - $apiKey['validity'] => (int) Duration (in seconds) after which the API key expires. By default, API keys don't expire. * * @see \Algolia\AlgoliaSearch\Model\Search\ApiKey * @@ -142,14 +142,14 @@ public function addApiKey($apiKey, $requestOptions = []) } /** - * If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject * - * @param string $indexName Index on which to perform the request. (required) - * @param string $objectID Unique record (object) identifier. (required) - * @param array $body Algolia record. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param string $objectID Unique record identifier. (required) + * @param array $body The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtWithObjectIdResponse|array @@ -202,7 +202,7 @@ public function addOrUpdateObject($indexName, $objectID, $body, $requestOptions } /** - * Add a source to the list of allowed sources. + * Adds a source to the list of allowed sources. * * Required API Key ACLs: * - admin @@ -235,12 +235,12 @@ public function appendSource($source, $requestOptions = []) } /** - * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. * * Required API Key ACLs: * - admin * - * @param string $xAlgoliaUserID userID to assign. (required) + * @param string $xAlgoliaUserID User ID to assign. (required) * @param array $assignUserIdParams assignUserIdParams (required) * - $assignUserIdParams['cluster'] => (string) Cluster name. (required) * @@ -280,9 +280,9 @@ public function assignUserId($xAlgoliaUserID, $assignUserIdParams, $requestOptio } /** - * To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $batchWriteParams batchWriteParams (required) * - $batchWriteParams['requests'] => (array) (required) * @@ -325,12 +325,12 @@ public function batch($indexName, $batchWriteParams, $requestOptions = []) } /** - * Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + * Assigns multiple user IDs to a cluster. **You can't move users with this operation**. * * Required API Key ACLs: * - admin * - * @param string $xAlgoliaUserID userID to assign. (required) + * @param string $xAlgoliaUserID User ID to assign. (required) * @param array $batchAssignUserIdsParams batchAssignUserIdsParams (required) * - $batchAssignUserIdsParams['cluster'] => (string) Cluster name. (required) * - $batchAssignUserIdsParams['users'] => (array) User IDs to assign. (required) @@ -371,15 +371,15 @@ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsParams, $ } /** - * Add or remove a batch of dictionary entries. + * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. * * Required API Key ACLs: * - editSettings * - * @param array $dictionaryName Dictionary to search in. (required) + * @param array $dictionaryName Dictionary type in which to search. (required) * @param array $batchDictionaryEntriesParams batchDictionaryEntriesParams (required) - * - $batchDictionaryEntriesParams['clearExistingDictionaryEntries'] => (bool) Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. - * - $batchDictionaryEntriesParams['requests'] => (array) Operations to batch. (required) + * - $batchDictionaryEntriesParams['clearExistingDictionaryEntries'] => (bool) Whether to replace all custom entries in the dictionary with the ones sent with this request. + * - $batchDictionaryEntriesParams['requests'] => (array) List of additions and deletions to your dictionaries. (required) * * @see \Algolia\AlgoliaSearch\Model\Search\BatchDictionaryEntriesParams * @@ -420,12 +420,12 @@ public function batchDictionaryEntries($dictionaryName, $batchDictionaryEntriesP } /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. * * Required API Key ACLs: * - browse * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $browseParams browseParams (optional) * * @see \Algolia\AlgoliaSearch\Model\Search\BrowseParams @@ -461,12 +461,12 @@ public function browse($indexName, $browseParams = null, $requestOptions = []) } /** - * Delete the records but leave settings and index-specific API keys untouched. + * Deletes only the records from an index while keeping settings, synonyms, and rules. * * Required API Key ACLs: * - deleteIndex * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array @@ -498,13 +498,13 @@ public function clearObjects($indexName, $requestOptions = []) } /** - * Delete all rules in the index. + * Deletes all rules from the index. * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array @@ -540,13 +540,13 @@ public function clearRules($indexName, $forwardToReplicas = null, $requestOption } /** - * Delete all synonyms in the index. + * Deletes all synonyms from the index. * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array @@ -740,7 +740,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio } /** - * Delete an existing API key. The request must be authenticated with the admin API key. + * Deletes the API key. * * Required API Key ACLs: * - admin @@ -777,21 +777,21 @@ public function deleteApiKey($key, $requestOptions = []) } /** - * This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + * This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). * * Required API Key ACLs: * - deleteIndex * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $deleteByParams deleteByParams (required) * - $deleteByParams['facetFilters'] => (array) - * - $deleteByParams['filters'] => (string) [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * - $deleteByParams['filters'] => (string) Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * - $deleteByParams['numericFilters'] => (array) * - $deleteByParams['tagFilters'] => (array) - * - $deleteByParams['aroundLatLng'] => (string) Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * - $deleteByParams['aroundLatLng'] => (string) Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * - $deleteByParams['aroundRadius'] => (array) - * - $deleteByParams['insideBoundingBox'] => (array) Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). - * - $deleteByParams['insidePolygon'] => (array) Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * - $deleteByParams['insideBoundingBox'] => (array) Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * - $deleteByParams['insidePolygon'] => (array) Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @see \Algolia\AlgoliaSearch\Model\Search\DeleteByParams * @@ -832,12 +832,12 @@ public function deleteBy($indexName, $deleteByParams, $requestOptions = []) } /** - * Delete an existing index. + * Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * * Required API Key ACLs: * - deleteIndex * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse|array @@ -869,13 +869,13 @@ public function deleteIndex($indexName, $requestOptions = []) } /** - * To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). * * Required API Key ACLs: * - deleteObject * - * @param string $indexName Index on which to perform the request. (required) - * @param string $objectID Unique record (object) identifier. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param string $objectID Unique record identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse|array @@ -922,14 +922,14 @@ public function deleteObject($indexName, $objectID, $requestOptions = []) } /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param string $objectID Unique identifier of a rule object. (required) - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array @@ -980,7 +980,7 @@ public function deleteRule($indexName, $objectID, $forwardToReplicas = null, $re } /** - * Remove a source from the list of allowed sources. + * Deletes a source from the list of allowed sources. * * Required API Key ACLs: * - admin @@ -1017,14 +1017,14 @@ public function deleteSource($source, $requestOptions = []) } /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param string $objectID Unique identifier of a synonym object. (required) - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse|array @@ -1075,7 +1075,7 @@ public function deleteSynonym($indexName, $objectID, $forwardToReplicas = null, } /** - * Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. * * @param string $key API key. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions @@ -1109,7 +1109,7 @@ public function getApiKey($key, $requestOptions = []) } /** - * Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + * Lists supported languages with their supported dictionary types and number of custom entries. * * Required API Key ACLs: * - settings @@ -1129,7 +1129,7 @@ public function getDictionaryLanguages($requestOptions = []) } /** - * Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + * Retrieves the languages for which standard dictionary entries are turned off. * * Required API Key ACLs: * - settings @@ -1149,15 +1149,15 @@ public function getDictionarySettings($requestOptions = []) } /** - * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. * * Required API Key ACLs: * - logs * - * @param int $offset First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (optional, default to 0) + * @param int $offset First log entry to retrieve. The most recent entries are listed first. (optional, default to 0) * @param int $length Maximum number of entries to retrieve. (optional, default to 10) - * @param string $indexName Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. (optional) - * @param array $type Type of log entries to retrieve. When omitted, all log entries are retrieved. (optional) + * @param string $indexName Index for which to retrieve log entries. By default, log entries are retrieved for all indices. (optional) + * @param array $type Type of log entries to retrieve. By default, all log entries are retrieved. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\GetLogsResponse|array @@ -1193,14 +1193,14 @@ public function getLogs($offset = null, $length = null, $indexName = null, $type } /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). * * Required API Key ACLs: * - search * - * @param string $indexName Index on which to perform the request. (required) - * @param string $objectID Unique record (object) identifier. (required) - * @param array $attributesToRetrieve Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. (optional) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param string $objectID Unique record identifier. (required) + * @param array $attributesToRetrieve Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return array|array @@ -1251,7 +1251,7 @@ public function getObject($indexName, $objectID, $attributesToRetrieve = null, $ } /** - * Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. * * Required API Key ACLs: * - search @@ -1283,12 +1283,12 @@ public function getObjects($getObjectsParams, $requestOptions = []) } /** - * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - settings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param string $objectID Unique identifier of a rule object. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -1336,12 +1336,12 @@ public function getRule($indexName, $objectID, $requestOptions = []) } /** - * Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + * Retrieves an object with non-null index settings. * * Required API Key ACLs: * - search * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\IndexSettings|array @@ -1373,7 +1373,7 @@ public function getSettings($indexName, $requestOptions = []) } /** - * Get all allowed sources (IP addresses). + * Retrieves all allowed IP addresses with access to your application. * * Required API Key ACLs: * - admin @@ -1393,12 +1393,12 @@ public function getSources($requestOptions = []) } /** - * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - settings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param string $objectID Unique identifier of a synonym object. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -1446,12 +1446,12 @@ public function getSynonym($indexName, $objectID, $requestOptions = []) } /** - * Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. * * Required API Key ACLs: * - addObject * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param int $taskID Unique task identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * @@ -1499,7 +1499,7 @@ public function getTask($indexName, $taskID, $requestOptions = []) } /** - * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin @@ -1519,12 +1519,12 @@ public function getTopUserIds($requestOptions = []) } /** - * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin * - * @param string $userID userID to assign. (required) + * @param string $userID User ID to assign. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UserId|array @@ -1564,7 +1564,7 @@ public function getUserId($userID, $requestOptions = []) * Required API Key ACLs: * - admin * - * @param bool $getClusters Indicates whether to include the cluster's pending mapping state in the response. (optional) + * @param bool $getClusters Whether to include the cluster's pending mapping state in the response. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\HasPendingMappingsResponse|array @@ -1584,7 +1584,7 @@ public function hasPendingMappings($getClusters = null, $requestOptions = []) } /** - * List all API keys associated with your Algolia application, including their permissions and restrictions. + * Lists all API keys associated with your Algolia application, including their permissions and restrictions. * * Required API Key ACLs: * - admin @@ -1604,7 +1604,7 @@ public function listApiKeys($requestOptions = []) } /** - * List the available clusters in a multi-cluster setup. + * Lists the available clusters in a multi-cluster setup. * * Required API Key ACLs: * - admin @@ -1624,13 +1624,13 @@ public function listClusters($requestOptions = []) } /** - * List indices in an Algolia application. + * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. * * Required API Key ACLs: * - listIndexes * - * @param int $page Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - * @param int $hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param int $page Requested page of the API response. If `null`, the API response is not paginated. (optional) + * @param int $hitsPerPage Number of hits per page. (optional, default to 100) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\ListIndicesResponse|array @@ -1658,13 +1658,13 @@ public function listIndices($page = null, $hitsPerPage = null, $requestOptions = } /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin * - * @param int $page Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. (optional) - * @param int $hitsPerPage Maximum number of hits per page. (optional, default to 100) + * @param int $page Requested page of the API response. If `null`, the API response is not paginated. (optional) + * @param int $hitsPerPage Number of hits per page. (optional, default to 100) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\ListUserIdsResponse|array @@ -1692,7 +1692,7 @@ public function listUserIds($page = null, $hitsPerPage = null, $requestOptions = } /** - * To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. * * @param array $batchParams batchParams (required) * - $batchParams['requests'] => (array) (required) @@ -1721,16 +1721,16 @@ public function multipleBatch($batchParams, $requestOptions = []) } /** - * This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). * * Required API Key ACLs: * - addObject * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $operationIndexParams operationIndexParams (required) * - $operationIndexParams['operation'] => (array) (required) - * - $operationIndexParams['destination'] => (string) Algolia index name. (required) - * - $operationIndexParams['scope'] => (array) **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + * - $operationIndexParams['destination'] => (string) Index name. (required) + * - $operationIndexParams['scope'] => (array) **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. * * @see \Algolia\AlgoliaSearch\Model\Search\OperationIndexParams * @@ -1771,15 +1771,15 @@ public function operationIndex($indexName, $operationIndexParams, $requestOption } /** - * Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. * * Required API Key ACLs: * - addObject * - * @param string $indexName Index on which to perform the request. (required) - * @param string $objectID Unique record (object) identifier. (required) - * @param array $attributesToUpdate Object with attributes to update. (required) - * @param bool $createIfNotExists Indicates whether to create a new record if it doesn't exist yet. (optional, default to true) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param string $objectID Unique record identifier. (required) + * @param array $attributesToUpdate Attributes with their values. (required) + * @param bool $createIfNotExists Whether to create a new record if it doesn't exist. (optional, default to true) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtWithObjectIdResponse|array @@ -1836,12 +1836,12 @@ public function partialUpdateObject($indexName, $objectID, $attributesToUpdate, } /** - * Remove a userID and its associated data from the multi-clusters. + * Deletes a user ID and its associated data from the clusters. * * Required API Key ACLs: * - admin * - * @param string $userID userID to assign. (required) + * @param string $userID User ID to assign. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\RemoveUserIdResponse|array @@ -1876,7 +1876,7 @@ public function removeUserId($userID, $requestOptions = []) } /** - * Replace all allowed sources. + * Replaces the list of allowed sources. * * Required API Key ACLs: * - admin @@ -1904,7 +1904,7 @@ public function replaceSources($source, $requestOptions = []) } /** - * Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. * * Required API Key ACLs: * - admin @@ -1941,13 +1941,13 @@ public function restoreApiKey($key, $requestOptions = []) } /** - * Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + * Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject * - * @param string $indexName Index on which to perform the request. (required) - * @param array $body The Algolia record. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param array $body The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\SaveObjectResponse|array @@ -1985,24 +1985,24 @@ public function saveObject($indexName, $body, $requestOptions = []) } /** - * To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + * If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param string $objectID Unique identifier of a rule object. (required) * @param array $rule rule (required) - * - $rule['objectID'] => (string) Unique identifier for a rule object. (required) - * - $rule['conditions'] => (array) [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + * - $rule['objectID'] => (string) Unique identifier of a rule object. (required) + * - $rule['conditions'] => (array) Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). * - $rule['consequence'] => (array) - * - $rule['description'] => (string) Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. - * - $rule['enabled'] => (bool) Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. - * - $rule['validity'] => (array) If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + * - $rule['description'] => (string) Description of the rule's purpose to help you distinguish between different rules. + * - $rule['enabled'] => (bool) Whether the rule is active. + * - $rule['validity'] => (array) Time periods when the rule is active. * * @see \Algolia\AlgoliaSearch\Model\Search\Rule * - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedRuleResponse|array @@ -2059,15 +2059,15 @@ public function saveRule($indexName, $objectID, $rule, $forwardToReplicas = null } /** - * Create or update multiple rules. + * Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $rules rules (required) - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) - * @param bool $clearExistingRules Indicates whether existing rules should be deleted before adding this batch. (optional) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param bool $clearExistingRules Whether existing rules should be deleted before adding this batch. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array @@ -2113,12 +2113,12 @@ public function saveRules($indexName, $rules, $forwardToReplicas = null, $clearE } /** - * Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + * If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param string $objectID Unique identifier of a synonym object. (required) * @param array $synonymHit synonymHit (required) * - $synonymHit['objectID'] => (string) Unique identifier of a synonym object. (required) @@ -2132,7 +2132,7 @@ public function saveRules($indexName, $rules, $forwardToReplicas = null, $clearE * * @see \Algolia\AlgoliaSearch\Model\Search\SynonymHit * - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\SaveSynonymResponse|array @@ -2189,15 +2189,15 @@ public function saveSynonym($indexName, $objectID, $synonymHit, $forwardToReplic } /** - * Create or update multiple synonyms. + * If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $synonymHit synonymHit (required) - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) - * @param bool $replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the ones sent with this request. (optional) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) + * @param bool $replaceExistingSynonyms Whether to replace all synonyms in the index with the ones sent with this request. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array @@ -2243,12 +2243,12 @@ public function saveSynonyms($indexName, $synonymHit, $forwardToReplicas = null, } /** - * Send multiple search queries to one or more indices. + * Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. * * Required API Key ACLs: * - search * - * @param array $searchMethodParams Query requests and strategies. Results will be received in the same order as the queries. (required) + * @param array $searchMethodParams Muli-search request body. Results are returned in the same order as the requests. (required) * - $searchMethodParams['requests'] => (array) (required) * - $searchMethodParams['strategy'] => (array) * @@ -2276,23 +2276,23 @@ public function search($searchMethodParams, $requestOptions = []) } /** - * Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + * Searches for standard and custom dictionary entries. * * Required API Key ACLs: * - settings * - * @param array $dictionaryName Dictionary to search in. (required) + * @param array $dictionaryName Dictionary type in which to search. (required) * @param array $searchDictionaryEntriesParams searchDictionaryEntriesParams (required) - * - $searchDictionaryEntriesParams['query'] => (string) Text to search for in an index. (required) - * - $searchDictionaryEntriesParams['page'] => (int) Page to retrieve (the first page is `0`, not `1`). + * - $searchDictionaryEntriesParams['query'] => (string) Search query. (required) + * - $searchDictionaryEntriesParams['page'] => (int) Page of search results to retrieve. * - $searchDictionaryEntriesParams['hitsPerPage'] => (int) Number of hits per page. - * - $searchDictionaryEntriesParams['language'] => (string) [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * - $searchDictionaryEntriesParams['language'] => (string) ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). * * @see \Algolia\AlgoliaSearch\Model\Search\SearchDictionaryEntriesParams * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return \Algolia\AlgoliaSearch\Model\Search\SearchDictionaryEntriesResponse|array */ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntriesParams, $requestOptions = []) { @@ -2327,17 +2327,17 @@ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntrie } /** - * [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. * * Required API Key ACLs: * - search * - * @param string $indexName Index on which to perform the request. (required) - * @param string $facetName Facet name. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) + * @param string $facetName Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) * @param array $searchForFacetValuesRequest searchForFacetValuesRequest (optional) * - $searchForFacetValuesRequest['params'] => (string) Search parameters as a URL-encoded query string. * - $searchForFacetValuesRequest['facetQuery'] => (string) Text to search inside the facet's values. - * - $searchForFacetValuesRequest['maxFacetHits'] => (int) Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * - $searchForFacetValuesRequest['maxFacetHits'] => (int) Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @see \Algolia\AlgoliaSearch\Model\Search\SearchForFacetValuesRequest * @@ -2387,20 +2387,19 @@ public function searchForFacetValues($indexName, $facetName, $searchForFacetValu } /** - * Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + * Searches for rules in your index. * * Required API Key ACLs: * - settings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $searchRulesParams searchRulesParams (optional) - * - $searchRulesParams['query'] => (string) Rule object query. + * - $searchRulesParams['query'] => (string) Search query for rules. * - $searchRulesParams['anchoring'] => (array) - * - $searchRulesParams['context'] => (string) Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). - * - $searchRulesParams['page'] => (int) Requested page (the first page is page 0). + * - $searchRulesParams['context'] => (string) Only return rules that match the context (exact match). + * - $searchRulesParams['page'] => (int) Requested page of the API response. * - $searchRulesParams['hitsPerPage'] => (int) Maximum number of hits per page. - * - $searchRulesParams['enabled'] => (bool) Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. - * - $searchRulesParams['requestOptions'] => (array) Request options to send with the API call. + * - $searchRulesParams['enabled'] => (bool) If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. * * @see \Algolia\AlgoliaSearch\Model\Search\SearchRulesParams * @@ -2435,12 +2434,12 @@ public function searchRules($indexName, $searchRulesParams = null, $requestOptio } /** - * Return records that match the query. + * Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. * * Required API Key ACLs: * - search * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $searchParams searchParams (optional) * * @see \Algolia\AlgoliaSearch\Model\Search\SearchParams @@ -2476,16 +2475,16 @@ public function searchSingleIndex($indexName, $searchParams = null, $requestOpti } /** - * Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + * Searches for synonyms in your index. * * Required API Key ACLs: * - settings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $searchSynonymsParams Body of the `searchSynonyms` operation. (optional) - * - $searchSynonymsParams['query'] => (string) Text to search for in an index. + * - $searchSynonymsParams['query'] => (string) Search query. * - $searchSynonymsParams['type'] => (array) - * - $searchSynonymsParams['page'] => (int) Page to retrieve (the first page is `0`, not `1`). + * - $searchSynonymsParams['page'] => (int) Page of search results to retrieve. * - $searchSynonymsParams['hitsPerPage'] => (int) Number of hits per page. * * @see \Algolia\AlgoliaSearch\Model\Search\SearchSynonymsParams @@ -2521,7 +2520,7 @@ public function searchSynonyms($indexName, $searchSynonymsParams = null, $reques } /** - * Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + * Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). * * Required API Key ACLs: * - admin @@ -2529,7 +2528,7 @@ public function searchSynonyms($indexName, $searchSynonymsParams = null, $reques * @param array $searchUserIdsParams searchUserIdsParams (required) * - $searchUserIdsParams['query'] => (string) Query to search. The search is a prefix search with [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) enabled. An empty query will retrieve all users. (required) * - $searchUserIdsParams['clusterName'] => (string) Cluster name. - * - $searchUserIdsParams['page'] => (int) Page to retrieve (the first page is `0`, not `1`). + * - $searchUserIdsParams['page'] => (int) Page of search results to retrieve. * - $searchUserIdsParams['hitsPerPage'] => (int) Number of hits per page. * * @see \Algolia\AlgoliaSearch\Model\Search\SearchUserIdsParams @@ -2556,7 +2555,7 @@ public function searchUserIds($searchUserIdsParams, $requestOptions = []) } /** - * Set stop word settings for a specific language. + * Turns standard stop word dictionary entries on or off for a given language. * * Required API Key ACLs: * - editSettings @@ -2588,17 +2587,17 @@ public function setDictionarySettings($dictionarySettingsParams, $requestOptions } /** - * Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + * Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. * * Required API Key ACLs: * - editSettings * - * @param string $indexName Index on which to perform the request. (required) + * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $indexSettings indexSettings (required) * * @see \Algolia\AlgoliaSearch\Model\Search\IndexSettings * - * @param bool $forwardToReplicas Indicates whether changed index settings are forwarded to the replica indices. (optional) + * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array @@ -2640,21 +2639,21 @@ public function setSettings($indexName, $indexSettings, $forwardToReplicas = nul } /** - * Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. * * Required API Key ACLs: * - admin * * @param string $key API key. (required) * @param array $apiKey apiKey (required) - * - $apiKey['acl'] => (array) [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. (required) - * - $apiKey['description'] => (string) Description of an API key for you and your team members. - * - $apiKey['indexes'] => (array) Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". - * - $apiKey['maxHitsPerQuery'] => (int) Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * - $apiKey['maxQueriesPerIPPerHour'] => (int) Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. - * - $apiKey['queryParameters'] => (string) Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. - * - $apiKey['referers'] => (array) Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". - * - $apiKey['validity'] => (int) Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + * - $apiKey['acl'] => (array) Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). (required) + * - $apiKey['description'] => (string) Description of an API key to help you identify this API key. + * - $apiKey['indexes'] => (array) Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". + * - $apiKey['maxHitsPerQuery'] => (int) Maximum number of results this API key can retrieve in one query. By default, there's no limit. + * - $apiKey['maxQueriesPerIPPerHour'] => (int) Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. + * - $apiKey['queryParameters'] => (string) Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. + * - $apiKey['referers'] => (array) Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). + * - $apiKey['validity'] => (int) Duration (in seconds) after which the API key expires. By default, API keys don't expire. * * @see \Algolia\AlgoliaSearch\Model\Search\ApiKey * diff --git a/clients/algoliasearch-client-php/lib/Model/Abtesting/ABTestResponse.php b/clients/algoliasearch-client-php/lib/Model/Abtesting/ABTestResponse.php index 08021f26ed..0905da48a0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Abtesting/ABTestResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Abtesting/ABTestResponse.php @@ -237,7 +237,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Analytics/SearchNoResultEvent.php b/clients/algoliasearch-client-php/lib/Model/Analytics/SearchNoResultEvent.php index 06adca5350..890fd1e4f6 100644 --- a/clients/algoliasearch-client-php/lib/Model/Analytics/SearchNoResultEvent.php +++ b/clients/algoliasearch-client-php/lib/Model/Analytics/SearchNoResultEvent.php @@ -237,7 +237,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearch.php b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearch.php index 03b4138e97..57d548ac60 100644 --- a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearch.php +++ b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearch.php @@ -237,7 +237,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php index c270d9e5d5..94bc15acd1 100644 --- a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php +++ b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php @@ -462,7 +462,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Anchoring.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Anchoring.php index 0dd3571bab..1f3f07b5b7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Anchoring.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Anchoring.php @@ -8,7 +8,7 @@ * Anchoring Class Doc Comment. * * @category Class - * @description Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + * @description Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. */ class Anchoring { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecision.php b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecision.php index aaa7a9c4f5..e48829dab0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecision.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecision.php @@ -8,7 +8,7 @@ * AroundPrecision Class Doc Comment. * * @category Class - * @description Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * @description Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ class AroundPrecision extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecisionFromValueInner.php b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecisionFromValueInner.php index 691f84813b..fc86ac45f9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecisionFromValueInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecisionFromValueInner.php @@ -8,6 +8,7 @@ * AroundPrecisionFromValueInner Class Doc Comment. * * @category Class + * @description Range object with lower and upper values in meters to define custom ranges. */ class AroundPrecisionFromValueInner extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -169,7 +170,7 @@ public function getFrom() /** * Sets from. * - * @param null|int $from from + * @param null|int $from Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. * * @return self */ @@ -193,7 +194,7 @@ public function getValue() /** * Sets value. * - * @param null|int $value value + * @param null|int $value Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadius.php b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadius.php index ce29cac727..ae39959cc4 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadius.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadius.php @@ -8,7 +8,7 @@ * AroundRadius Class Doc Comment. * * @category Class - * @description [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + * @description Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. */ class AroundRadius extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadiusAll.php b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadiusAll.php index 5938b6537f..0d16e21ec5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadiusAll.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/AroundRadiusAll.php @@ -8,6 +8,7 @@ * AroundRadiusAll Class Doc Comment. * * @category Class + * @description Return all records with a valid `_geoloc` attribute. Don't filter by distance. */ class AroundRadiusAll { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilter.php b/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilter.php index 529ff8bf8a..0aeab8bfb0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilter.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilter.php @@ -8,7 +8,7 @@ * AutomaticFacetFilter Class Doc Comment. * * @category Class - * @description Automatic facet Filter. + * @description Filter or optional filter to be applied to the search. */ class AutomaticFacetFilter extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -184,7 +184,7 @@ public function getFacet() /** * Sets facet. * - * @param string $facet Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + * @param string $facet Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. * * @return self */ @@ -208,7 +208,7 @@ public function getScore() /** * Sets score. * - * @param null|int $score Score for the filter. Typically used for optional or disjunctive filters. + * @param null|int $score filter scores to give different weights to individual filters * * @return self */ @@ -232,7 +232,7 @@ public function getDisjunctive() /** * Sets disjunctive. * - * @param null|bool $disjunctive whether the filter is disjunctive (true) or conjunctive (false) + * @param null|bool $disjunctive Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilters.php b/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilters.php index 9c0c3a768f..4a630f6457 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/AutomaticFacetFilters.php @@ -8,7 +8,7 @@ * AutomaticFacetFilters Class Doc Comment. * * @category Class - * @description Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * @description Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. */ class AutomaticFacetFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendRequest.php b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendRequest.php index 3ac3a94654..4cd31c4311 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendRequest.php @@ -190,7 +190,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendationsQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendationsQuery.php index b75d5eac76..f9814e007f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendationsQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendationsQuery.php @@ -218,7 +218,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendedForYouQueryParameters.php b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendedForYouQueryParameters.php index bea6fc6c9e..5cf22a9fa9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendedForYouQueryParameters.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseRecommendedForYouQueryParameters.php @@ -167,7 +167,7 @@ public function getUserToken() /** * Sets userToken. * - * @param string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParams.php b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParams.php index bd7b6b8c62..8b8a6dc372 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParams.php @@ -43,7 +43,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', @@ -84,7 +83,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, @@ -126,7 +124,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', @@ -167,7 +164,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', @@ -208,7 +204,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', @@ -309,9 +304,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -392,6 +384,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -404,6 +400,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + return $invalidProperties; } @@ -431,7 +435,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -455,7 +459,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -479,7 +483,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -599,7 +603,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -623,7 +627,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -647,7 +651,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -671,7 +675,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -695,12 +699,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling BaseSearchParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -719,7 +727,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -743,7 +751,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -774,7 +782,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -798,7 +806,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -870,7 +878,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -898,7 +906,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -922,7 +930,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -946,7 +954,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -970,7 +978,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -994,12 +1002,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParams., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParams., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1018,7 +1033,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1042,7 +1057,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1053,30 +1068,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1090,7 +1081,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1114,7 +1105,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1138,7 +1129,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1186,7 +1177,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1210,7 +1201,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParamsWithoutQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParamsWithoutQuery.php index 8528290349..3821c2c91c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParamsWithoutQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchParamsWithoutQuery.php @@ -42,7 +42,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', @@ -82,7 +81,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, @@ -123,7 +121,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', @@ -163,7 +160,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', @@ -203,7 +199,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', @@ -301,9 +296,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -384,6 +376,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -396,6 +392,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + return $invalidProperties; } @@ -423,7 +427,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -447,7 +451,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -567,7 +571,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -591,7 +595,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -615,7 +619,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -639,7 +643,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -663,12 +667,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling BaseSearchParamsWithoutQuery., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -687,7 +695,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -711,7 +719,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -742,7 +750,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -766,7 +774,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -838,7 +846,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -866,7 +874,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -890,7 +898,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -914,7 +922,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -938,7 +946,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -962,12 +970,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParamsWithoutQuery., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParamsWithoutQuery., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -986,7 +1001,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1010,7 +1025,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1021,30 +1036,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1058,7 +1049,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1082,7 +1073,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1106,7 +1097,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1154,7 +1145,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1178,7 +1169,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchResponse.php b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchResponse.php index cb043acd4e..454e57d4f9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/BaseSearchResponse.php @@ -380,6 +380,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } @@ -491,7 +495,7 @@ public function getAutomaticRadius() /** * Sets automaticRadius. * - * @param null|string $automaticRadius automatically-computed radius + * @param null|string $automaticRadius distance from a central coordinate provided by `aroundLatLng` * * @return self */ @@ -623,7 +627,7 @@ public function getFacets() /** * Sets facets. * - * @param null|array> $facets mapping of each facet name to the corresponding facet counts + * @param null|array> $facets facet counts * * @return self */ @@ -774,7 +778,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -798,7 +802,7 @@ public function getNbPages() /** * Sets nbPages. * - * @param int $nbPages number of pages of results for the current query + * @param int $nbPages number of pages of results * * @return self */ @@ -846,12 +850,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling BaseSearchResponse., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1062,7 +1070,7 @@ public function getUserData() /** * Sets userData. * - * @param null|mixed $userData lets you store custom data in your indices + * @param null|mixed $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Condition.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Condition.php index fad5e7c56d..f485f0209d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Condition.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Condition.php @@ -21,6 +21,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => '\Algolia\AlgoliaSearch\Model\Recommend\Anchoring', 'alternatives' => 'bool', 'context' => 'string', + 'filters' => 'string', ]; /** @@ -33,6 +34,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => null, 'alternatives' => null, 'context' => null, + 'filters' => null, ]; /** @@ -46,6 +48,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => 'anchoring', 'alternatives' => 'alternatives', 'context' => 'context', + 'filters' => 'filters', ]; /** @@ -58,6 +61,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => 'setAnchoring', 'alternatives' => 'setAlternatives', 'context' => 'setContext', + 'filters' => 'setFilters', ]; /** @@ -70,6 +74,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => 'getAnchoring', 'alternatives' => 'getAlternatives', 'context' => 'getContext', + 'filters' => 'getFilters', ]; /** @@ -98,6 +103,9 @@ public function __construct(array $data = null) if (isset($data['context'])) { $this->container['context'] = $data['context']; } + if (isset($data['filters'])) { + $this->container['filters'] = $data['filters']; + } } /** @@ -158,7 +166,13 @@ public static function getters() */ public function listInvalidProperties() { - return []; + $invalidProperties = []; + + if (isset($this->container['context']) && !preg_match('/[A-Za-z0-9_-]+/', $this->container['context'])) { + $invalidProperties[] = "invalid value for 'context', must be conform to the pattern /[A-Za-z0-9_-]+/."; + } + + return $invalidProperties; } /** @@ -185,7 +199,7 @@ public function getPattern() /** * Sets pattern. * - * @param null|string $pattern query pattern syntax + * @param null|string $pattern Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". * * @return self */ @@ -233,7 +247,7 @@ public function getAlternatives() /** * Sets alternatives. * - * @param null|bool $alternatives whether the pattern matches on plurals, synonyms, and typos + * @param null|bool $alternatives whether the pattern should match plurals, synonyms, and typos * * @return self */ @@ -257,17 +271,45 @@ public function getContext() /** * Sets context. * - * @param null|string $context rule context format: [A-Za-z0-9_-]+) + * @param null|string $context An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. * * @return self */ public function setContext($context) { + if (!is_null($context) && (!preg_match('/[A-Za-z0-9_-]+/', $context))) { + throw new \InvalidArgumentException("invalid value for {$context} when calling Condition., must conform to the pattern /[A-Za-z0-9_-]+/."); + } + $this->container['context'] = $context; return $this; } + /** + * Gets filters. + * + * @return null|string + */ + public function getFilters() + { + return $this->container['filters'] ?? null; + } + + /** + * Sets filters. + * + * @param null|string $filters Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + * + * @return self + */ + public function setFilters($filters) + { + $this->container['filters'] = $filters; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Consequence.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Consequence.php index 90aa6be3ae..cfe52a48e5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Consequence.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Consequence.php @@ -8,7 +8,7 @@ * Consequence Class Doc Comment. * * @category Class - * @description [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + * @description Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). */ class Consequence extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -167,7 +167,17 @@ public static function getters() */ public function listInvalidProperties() { - return []; + $invalidProperties = []; + + if (isset($this->container['promote']) && (count($this->container['promote']) > 300)) { + $invalidProperties[] = "invalid value for 'promote', number of items must be less than or equal to 300."; + } + + if (isset($this->container['hide']) && (count($this->container['hide']) > 50)) { + $invalidProperties[] = "invalid value for 'hide', number of items must be less than or equal to 50."; + } + + return $invalidProperties; } /** @@ -218,12 +228,15 @@ public function getPromote() /** * Sets promote. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\Promote[] $promote records to promote + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\Promote[] $promote Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. * * @return self */ public function setPromote($promote) { + if (!is_null($promote) && (count($promote) > 300)) { + throw new \InvalidArgumentException('invalid value for $promote when calling Consequence., number of items must be less than or equal to 300.'); + } $this->container['promote'] = $promote; return $this; @@ -242,7 +255,7 @@ public function getFilterPromotes() /** * Sets filterPromotes. * - * @param null|bool $filterPromotes Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + * @param null|bool $filterPromotes Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. * * @return self */ @@ -266,12 +279,15 @@ public function getHide() /** * Sets hide. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\ConsequenceHide[] $hide Records to hide. By default, you can hide up to 50 records per rule. + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\ConsequenceHide[] $hide records you want to hide from the search results * * @return self */ public function setHide($hide) { + if (!is_null($hide) && (count($hide) > 50)) { + throw new \InvalidArgumentException('invalid value for $hide when calling Consequence., number of items must be less than or equal to 50.'); + } $this->container['hide'] = $hide; return $this; @@ -290,7 +306,7 @@ public function getUserData() /** * Sets userData. * - * @param null|mixed $userData Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + * @param null|mixed $userData A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceHide.php b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceHide.php index 08cda7c5da..4bc4c17f88 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceHide.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceHide.php @@ -8,7 +8,7 @@ * ConsequenceHide Class Doc Comment. * * @category Class - * @description Unique identifier of the record to hide. + * @description Object ID of the record to hide. */ class ConsequenceHide extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -168,7 +168,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceParams.php b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceParams.php index 110ac5cb57..7d2622703d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceParams.php @@ -42,14 +42,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -130,14 +128,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -219,14 +215,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -307,14 +301,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -395,14 +387,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -541,9 +531,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -562,9 +549,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -768,6 +752,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -780,6 +768,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -800,6 +796,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -827,7 +827,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -851,7 +851,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -971,7 +971,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -995,7 +995,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1019,7 +1019,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1043,7 +1043,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1067,12 +1067,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling ConsequenceParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1091,7 +1095,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1115,7 +1119,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1146,7 +1150,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1170,7 +1174,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1242,7 +1246,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1270,7 +1274,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1294,7 +1298,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1318,7 +1322,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1342,7 +1346,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1366,12 +1370,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling ConsequenceParams., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling ConsequenceParams., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1390,7 +1401,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1414,7 +1425,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1425,30 +1436,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1462,7 +1449,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1486,7 +1473,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1510,7 +1497,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1558,7 +1545,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1582,7 +1569,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1593,30 +1580,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1630,7 +1593,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1654,7 +1617,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1678,7 +1641,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1702,7 +1665,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1726,7 +1689,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1750,7 +1713,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1774,7 +1737,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1798,7 +1761,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1846,7 +1809,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1901,7 +1864,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1925,7 +1888,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1973,7 +1936,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -1997,7 +1960,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2069,7 +2032,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2093,7 +2056,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2117,7 +2080,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2141,7 +2104,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2165,7 +2128,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2285,7 +2248,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2309,7 +2272,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2333,7 +2296,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2381,7 +2344,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2405,7 +2368,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2453,7 +2416,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2477,7 +2440,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2508,7 +2471,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2532,7 +2495,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2566,6 +2529,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling ConsequenceParams., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2584,7 +2551,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2608,7 +2575,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2656,7 +2623,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQuery.php index c6251d009f..5c6e6cbaf5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQuery.php @@ -8,7 +8,7 @@ * ConsequenceQuery Class Doc Comment. * * @category Class - * @description When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + * @description Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. */ class ConsequenceQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -170,7 +170,7 @@ public function getRemove() /** * Sets remove. * - * @param null|string[] $remove words to remove + * @param null|string[] $remove words to remove from the search query * * @return self */ @@ -194,7 +194,7 @@ public function getEdits() /** * Sets edits. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\Edit[] $edits edits to apply + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\Edit[] $edits changes to make to the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQueryObject.php b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQueryObject.php index 7a47971ca5..521558028a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQueryObject.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/ConsequenceQueryObject.php @@ -169,7 +169,7 @@ public function getRemove() /** * Sets remove. * - * @param null|string[] $remove words to remove + * @param null|string[] $remove words to remove from the search query * * @return self */ @@ -193,7 +193,7 @@ public function getEdits() /** * Sets edits. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\Edit[] $edits edits to apply + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\Edit[] $edits changes to make to the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/DeletedAtResponse.php b/clients/algoliasearch-client-php/lib/Model/Recommend/DeletedAtResponse.php index ec5969eafe..3896ca8ea4 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/DeletedAtResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/DeletedAtResponse.php @@ -179,7 +179,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Distinct.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Distinct.php index b2f20f37e1..d71104794d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Distinct.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Distinct.php @@ -8,7 +8,7 @@ * Distinct Class Doc Comment. * * @category Class - * @description Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * @description Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. */ class Distinct extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Edit.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Edit.php index 03ebdf1f0e..e1aa8ae4b3 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Edit.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Edit.php @@ -225,7 +225,7 @@ public function getInsert() /** * Sets insert. * - * @param null|string $insert text that should be inserted in place of the removed text inside the query string + * @param null|string $insert text to be added in place of the deleted text inside the query string * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/ExactOnSingleWordQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/ExactOnSingleWordQuery.php index 3dc2835d4c..b765a62af2 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/ExactOnSingleWordQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/ExactOnSingleWordQuery.php @@ -8,7 +8,7 @@ * ExactOnSingleWordQuery Class Doc Comment. * * @category Class - * @description Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + * @description Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. */ class ExactOnSingleWordQuery { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/FacetFilters.php b/clients/algoliasearch-client-php/lib/Model/Recommend/FacetFilters.php index 027001e99f..b1815e55d0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/FacetFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/FacetFilters.php @@ -8,7 +8,7 @@ * FacetFilters Class Doc Comment. * * @category Class - * @description [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * @description Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ class FacetFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/FacetOrdering.php b/clients/algoliasearch-client-php/lib/Model/Recommend/FacetOrdering.php index 13275d21eb..d711869e43 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/FacetOrdering.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/FacetOrdering.php @@ -8,7 +8,7 @@ * FacetOrdering Class Doc Comment. * * @category Class - * @description Defines the ordering of facets (widgets). + * @description Order of facet names and facet values in your UI. */ class FacetOrdering extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -194,7 +194,7 @@ public function getValues() /** * Sets values. * - * @param null|array $values ordering of facet values within an individual facet + * @param null|array $values Order of facet values. One object for each facet. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Facets.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Facets.php index 6e1a24809b..e98cb514e1 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Facets.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Facets.php @@ -8,7 +8,7 @@ * Facets Class Doc Comment. * * @category Class - * @description Ordering of facets (widgets). + * @description Order of facet names. */ class Facets extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -162,7 +162,7 @@ public function getOrder() /** * Sets order. * - * @param null|string[] $order pinned order of facet lists + * @param null|string[] $order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResult.php b/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResult.php index 586bf64514..7ca7f5af0c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResult.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResult.php @@ -197,7 +197,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ @@ -245,7 +245,7 @@ public function getMatchedWords() /** * Sets matchedWords. * - * @param string[] $matchedWords list of words from the query that matched the object + * @param string[] $matchedWords list of matched words from the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResultOption.php b/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResultOption.php index 59fe7ce670..9ff7f03f47 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResultOption.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/HighlightResultOption.php @@ -8,7 +8,7 @@ * HighlightResultOption Class Doc Comment. * * @category Class - * @description Show highlighted section and words matched on a query. + * @description Surround words that match the query with HTML tags for highlighting. */ class HighlightResultOption extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -198,7 +198,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ @@ -246,7 +246,7 @@ public function getMatchedWords() /** * Sets matchedWords. * - * @param string[] $matchedWords list of words from the query that matched the object + * @param string[] $matchedWords list of matched words from the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/IgnorePlurals.php b/clients/algoliasearch-client-php/lib/Model/Recommend/IgnorePlurals.php index 6a04a7b145..dbe87beb34 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/IgnorePlurals.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/IgnorePlurals.php @@ -8,7 +8,7 @@ * IgnorePlurals Class Doc Comment. * * @category Class - * @description Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + * @description Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. */ class IgnorePlurals extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/IndexSettingsAsSearchParams.php b/clients/algoliasearch-client-php/lib/Model/Recommend/IndexSettingsAsSearchParams.php index 8487b89b00..7b9dc2f37d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/IndexSettingsAsSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/IndexSettingsAsSearchParams.php @@ -17,7 +17,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $modelTypes = [ - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -70,7 +69,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $modelFormats = [ - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -124,7 +122,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $attributeMap = [ - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -177,7 +174,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $setters = [ - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -230,7 +226,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $getters = [ - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -291,9 +286,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM */ public function __construct(array $data = null) { - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -508,6 +500,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -522,30 +518,6 @@ public function valid() return 0 === count($this->listInvalidProperties()); } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -559,7 +531,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -583,7 +555,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -607,7 +579,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -631,7 +603,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -655,7 +627,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -679,7 +651,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -703,7 +675,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -727,7 +699,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -775,7 +747,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -830,7 +802,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -854,7 +826,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -902,7 +874,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -926,7 +898,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -998,7 +970,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -1022,7 +994,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -1046,7 +1018,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -1070,7 +1042,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -1094,7 +1066,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -1214,7 +1186,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -1238,7 +1210,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -1262,7 +1234,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -1310,7 +1282,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -1334,7 +1306,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -1382,7 +1354,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -1406,7 +1378,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -1437,7 +1409,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -1461,7 +1433,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -1495,6 +1467,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling IndexSettingsAsSearchParams., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -1513,7 +1489,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -1537,7 +1513,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -1585,7 +1561,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/MatchLevel.php b/clients/algoliasearch-client-php/lib/Model/Recommend/MatchLevel.php index 91c527e342..7f334e679b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/MatchLevel.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/MatchLevel.php @@ -8,7 +8,7 @@ * MatchLevel Class Doc Comment. * * @category Class - * @description Indicates how well the attribute matched the search query. + * @description Whether the whole query string matches or only a part. */ class MatchLevel { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Mode.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Mode.php index 34fe7c09e8..8811dbca24 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Mode.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Mode.php @@ -8,7 +8,7 @@ * Mode Class Doc Comment. * * @category Class - * @description Search mode the index will use to query for results. + * @description Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. */ class Mode { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/NumericFilters.php b/clients/algoliasearch-client-php/lib/Model/Recommend/NumericFilters.php index d23ba0973c..a3d6232f21 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/NumericFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/NumericFilters.php @@ -8,7 +8,7 @@ * NumericFilters Class Doc Comment. * * @category Class - * @description [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * @description Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. */ class NumericFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/OptionalFilters.php b/clients/algoliasearch-client-php/lib/Model/Recommend/OptionalFilters.php index 587d264c45..9c89092324 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/OptionalFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/OptionalFilters.php @@ -8,7 +8,7 @@ * OptionalFilters Class Doc Comment. * * @category Class - * @description Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + * @description Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. */ class OptionalFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Params.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Params.php index 602fb2f52f..3acddcbe88 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Params.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Params.php @@ -8,7 +8,7 @@ * Params Class Doc Comment. * * @category Class - * @description Additional search parameters. + * @description Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. */ class Params extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Promote.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Promote.php index 5ebb62326e..4898498068 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Promote.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Promote.php @@ -155,6 +155,10 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } + if (count($this->container['objectIDs']) > 100) { + $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 100."; + } + if (!isset($this->container['position']) || null === $this->container['position']) { $invalidProperties[] = "'position' can't be null"; } @@ -189,12 +193,15 @@ public function getObjectIDs() /** * Sets objectIDs. * - * @param string[] $objectIDs unique identifiers of the records to promote + * @param string[] $objectIDs Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. * * @return self */ public function setObjectIDs($objectIDs) { + if (count($objectIDs) > 100) { + throw new \InvalidArgumentException('invalid value for $objectIDs when calling Promote., number of items must be less than or equal to 100.'); + } $this->container['objectIDs'] = $objectIDs; return $this; @@ -213,7 +220,7 @@ public function getPosition() /** * Sets position. * - * @param int $position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param int $position position in the search results where you want to show the promoted records * * @return self */ @@ -237,7 +244,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique identifier of the record to promote + * @param string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectID.php b/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectID.php index 1c167a1292..6cb6ba94cc 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectID.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectID.php @@ -179,7 +179,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique identifier of the record to promote + * @param string $objectID unique record identifier * * @return self */ @@ -203,7 +203,7 @@ public function getPosition() /** * Sets position. * - * @param int $position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param int $position position in the search results where you want to show the promoted records * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectIDs.php b/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectIDs.php index d9df279bf4..53560feb44 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectIDs.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/PromoteObjectIDs.php @@ -148,6 +148,10 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } + if (count($this->container['objectIDs']) > 100) { + $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 100."; + } + if (!isset($this->container['position']) || null === $this->container['position']) { $invalidProperties[] = "'position' can't be null"; } @@ -179,12 +183,15 @@ public function getObjectIDs() /** * Sets objectIDs. * - * @param string[] $objectIDs unique identifiers of the records to promote + * @param string[] $objectIDs Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. * * @return self */ public function setObjectIDs($objectIDs) { + if (count($objectIDs) > 100) { + throw new \InvalidArgumentException('invalid value for $objectIDs when calling PromoteObjectIDs., number of items must be less than or equal to 100.'); + } $this->container['objectIDs'] = $objectIDs; return $this; @@ -203,7 +210,7 @@ public function getPosition() /** * Sets position. * - * @param int $position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param int $position position in the search results where you want to show the promoted records * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/QueryType.php b/clients/algoliasearch-client-php/lib/Model/Recommend/QueryType.php index 2a61d0e670..e8735d2f7f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/QueryType.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/QueryType.php @@ -8,7 +8,7 @@ * QueryType Class Doc Comment. * * @category Class - * @description Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * @description Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ class QueryType { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RankingInfo.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RankingInfo.php index 35e148f90c..f5e350f3f6 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RankingInfo.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RankingInfo.php @@ -8,6 +8,7 @@ * RankingInfo Class Doc Comment. * * @category Class + * @description Object with detailed information about the record's ranking. */ class RankingInfo extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -235,27 +236,58 @@ public function listInvalidProperties() if (!isset($this->container['filters']) || null === $this->container['filters']) { $invalidProperties[] = "'filters' can't be null"; } + if ($this->container['filters'] < 0) { + $invalidProperties[] = "invalid value for 'filters', must be bigger than or equal to 0."; + } + if (!isset($this->container['firstMatchedWord']) || null === $this->container['firstMatchedWord']) { $invalidProperties[] = "'firstMatchedWord' can't be null"; } + if ($this->container['firstMatchedWord'] < 0) { + $invalidProperties[] = "invalid value for 'firstMatchedWord', must be bigger than or equal to 0."; + } + if (!isset($this->container['geoDistance']) || null === $this->container['geoDistance']) { $invalidProperties[] = "'geoDistance' can't be null"; } + if ($this->container['geoDistance'] < 0) { + $invalidProperties[] = "invalid value for 'geoDistance', must be bigger than or equal to 0."; + } + + if (isset($this->container['geoPrecision']) && ($this->container['geoPrecision'] < 1)) { + $invalidProperties[] = "invalid value for 'geoPrecision', must be bigger than or equal to 1."; + } + if (!isset($this->container['nbExactWords']) || null === $this->container['nbExactWords']) { $invalidProperties[] = "'nbExactWords' can't be null"; } + if ($this->container['nbExactWords'] < 0) { + $invalidProperties[] = "invalid value for 'nbExactWords', must be bigger than or equal to 0."; + } + if (!isset($this->container['nbTypos']) || null === $this->container['nbTypos']) { $invalidProperties[] = "'nbTypos' can't be null"; } + if ($this->container['nbTypos'] < 0) { + $invalidProperties[] = "invalid value for 'nbTypos', must be bigger than or equal to 0."; + } + if (!isset($this->container['promoted']) || null === $this->container['promoted']) { $invalidProperties[] = "'promoted' can't be null"; } + if (isset($this->container['proximityDistance']) && ($this->container['proximityDistance'] < 0)) { + $invalidProperties[] = "invalid value for 'proximityDistance', must be bigger than or equal to 0."; + } + if (!isset($this->container['userScore']) || null === $this->container['userScore']) { $invalidProperties[] = "'userScore' can't be null"; } if (!isset($this->container['words']) || null === $this->container['words']) { $invalidProperties[] = "'words' can't be null"; } + if ($this->container['words'] < 1) { + $invalidProperties[] = "invalid value for 'words', must be bigger than or equal to 1."; + } return $invalidProperties; } @@ -284,12 +316,16 @@ public function getFilters() /** * Sets filters. * - * @param int $filters this field is reserved for advanced usage + * @param int $filters whether a filter matched the query * * @return self */ public function setFilters($filters) { + if ($filters < 0) { + throw new \InvalidArgumentException('invalid value for $filters when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['filters'] = $filters; return $this; @@ -308,12 +344,16 @@ public function getFirstMatchedWord() /** * Sets firstMatchedWord. * - * @param int $firstMatchedWord position of the most important matched attribute in the attributes to index list + * @param int $firstMatchedWord position of the first matched word in the best matching attribute of the record * * @return self */ public function setFirstMatchedWord($firstMatchedWord) { + if ($firstMatchedWord < 0) { + throw new \InvalidArgumentException('invalid value for $firstMatchedWord when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['firstMatchedWord'] = $firstMatchedWord; return $this; @@ -338,6 +378,10 @@ public function getGeoDistance() */ public function setGeoDistance($geoDistance) { + if ($geoDistance < 0) { + throw new \InvalidArgumentException('invalid value for $geoDistance when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['geoDistance'] = $geoDistance; return $this; @@ -362,6 +406,10 @@ public function getGeoPrecision() */ public function setGeoPrecision($geoPrecision) { + if (!is_null($geoPrecision) && ($geoPrecision < 1)) { + throw new \InvalidArgumentException('invalid value for $geoPrecision when calling RankingInfo., must be bigger than or equal to 1.'); + } + $this->container['geoPrecision'] = $geoPrecision; return $this; @@ -434,6 +482,10 @@ public function getNbExactWords() */ public function setNbExactWords($nbExactWords) { + if ($nbExactWords < 0) { + throw new \InvalidArgumentException('invalid value for $nbExactWords when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['nbExactWords'] = $nbExactWords; return $this; @@ -458,6 +510,10 @@ public function getNbTypos() */ public function setNbTypos($nbTypos) { + if ($nbTypos < 0) { + throw new \InvalidArgumentException('invalid value for $nbTypos when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['nbTypos'] = $nbTypos; return $this; @@ -476,7 +532,7 @@ public function getPromoted() /** * Sets promoted. * - * @param bool $promoted present and set to true if a Rule promoted the hit + * @param bool $promoted whether the record was promoted by a rule * * @return self */ @@ -500,12 +556,16 @@ public function getProximityDistance() /** * Sets proximityDistance. * - * @param null|int $proximityDistance when the query contains more than one word, the sum of the distances between matched words (in meters) + * @param null|int $proximityDistance Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. * * @return self */ public function setProximityDistance($proximityDistance) { + if (!is_null($proximityDistance) && ($proximityDistance < 0)) { + throw new \InvalidArgumentException('invalid value for $proximityDistance when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['proximityDistance'] = $proximityDistance; return $this; @@ -524,7 +584,7 @@ public function getUserScore() /** * Sets userScore. * - * @param int $userScore custom ranking for the object, expressed as a single integer value + * @param int $userScore Overall ranking of the record, expressed as a single integer. This attribute is internal. * * @return self */ @@ -548,12 +608,16 @@ public function getWords() /** * Sets words. * - * @param int $words number of matched words, including prefixes and typos + * @param int $words number of matched words * * @return self */ public function setWords($words) { + if ($words < 1) { + throw new \InvalidArgumentException('invalid value for $words when calling RankingInfo., must be bigger than or equal to 1.'); + } + $this->container['words'] = $words; return $this; @@ -572,7 +636,7 @@ public function getPromotedByReRanking() /** * Sets promotedByReRanking. * - * @param null|bool $promotedByReRanking wether the record are promoted by the re-ranking strategy + * @param null|bool $promotedByReRanking whether the record is re-ranked * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/ReRankingApplyFilter.php b/clients/algoliasearch-client-php/lib/Model/Recommend/ReRankingApplyFilter.php index 859a521366..b27da5e37f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/ReRankingApplyFilter.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/ReRankingApplyFilter.php @@ -8,7 +8,7 @@ * ReRankingApplyFilter Class Doc Comment. * * @category Class - * @description When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + * @description Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. */ class ReRankingApplyFilter extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendHit.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendHit.php index 5b1dd84ba4..0e4130f18e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendHit.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendHit.php @@ -218,7 +218,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ @@ -242,7 +242,7 @@ public function getHighlightResult() /** * Sets highlightResult. * - * @param null|array $highlightResult show highlighted section and words matched on a query + * @param null|array $highlightResult surround words that match the query with HTML tags for highlighting * * @return self */ @@ -266,7 +266,7 @@ public function getSnippetResult() /** * Sets snippetResult. * - * @param null|array $snippetResult Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * @param null|array $snippetResult snippets that show the context around a matching search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHit.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHit.php index 0413566838..ef9f13e7d4 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHit.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHit.php @@ -240,7 +240,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ @@ -264,7 +264,7 @@ public function getHighlightResult() /** * Sets highlightResult. * - * @param null|array $highlightResult show highlighted section and words matched on a query + * @param null|array $highlightResult surround words that match the query with HTML tags for highlighting * * @return self */ @@ -288,7 +288,7 @@ public function getSnippetResult() /** * Sets snippetResult. * - * @param null|array $snippetResult Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * @param null|array $snippetResult snippets that show the context around a matching search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHits.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHits.php index bf7be132ae..8c198b1b1c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHits.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsHits.php @@ -207,7 +207,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsQuery.php index 980c963146..921982ab38 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsQuery.php @@ -229,7 +229,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ @@ -332,7 +332,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsRequest.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsRequest.php index 556a7ce6ef..3001a7ce4a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsRequest.php @@ -248,7 +248,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ @@ -447,7 +447,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsResults.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsResults.php index 740ccb483e..43bbbe740a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsResults.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendationsResults.php @@ -404,6 +404,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } @@ -518,7 +522,7 @@ public function getAutomaticRadius() /** * Sets automaticRadius. * - * @param null|string $automaticRadius automatically-computed radius + * @param null|string $automaticRadius distance from a central coordinate provided by `aroundLatLng` * * @return self */ @@ -650,7 +654,7 @@ public function getFacets() /** * Sets facets. * - * @param null|array> $facets mapping of each facet name to the corresponding facet counts + * @param null|array> $facets facet counts * * @return self */ @@ -801,7 +805,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -825,7 +829,7 @@ public function getNbPages() /** * Sets nbPages. * - * @param int $nbPages number of pages of results for the current query + * @param int $nbPages number of pages of results * * @return self */ @@ -873,12 +877,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling RecommendationsResults., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1089,7 +1097,7 @@ public function getUserData() /** * Sets userData. * - * @param null|object $userData lets you store custom data in your indices + * @param null|object $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ @@ -1161,7 +1169,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQuery.php index 7dbb45a213..ac7e9a42ce 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQuery.php @@ -218,7 +218,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQueryParameters.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQueryParameters.php index 798038b35e..775b196847 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQueryParameters.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendedForYouQueryParameters.php @@ -43,14 +43,12 @@ class RecommendedForYouQueryParameters extends \Algolia\AlgoliaSearch\Model\Abst 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -129,14 +127,12 @@ class RecommendedForYouQueryParameters extends \Algolia\AlgoliaSearch\Model\Abst 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -216,14 +212,12 @@ class RecommendedForYouQueryParameters extends \Algolia\AlgoliaSearch\Model\Abst 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -302,14 +296,12 @@ class RecommendedForYouQueryParameters extends \Algolia\AlgoliaSearch\Model\Abst 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -388,14 +380,12 @@ class RecommendedForYouQueryParameters extends \Algolia\AlgoliaSearch\Model\Abst 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -534,9 +524,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -555,9 +542,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -752,6 +736,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -764,6 +752,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } @@ -787,6 +783,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -814,7 +814,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -838,7 +838,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -862,7 +862,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -982,7 +982,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1006,7 +1006,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1030,7 +1030,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1054,7 +1054,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1078,12 +1078,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling RecommendedForYouQueryParameters., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1102,7 +1106,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1126,7 +1130,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1157,7 +1161,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1181,7 +1185,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1253,7 +1257,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1281,7 +1285,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1305,7 +1309,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1329,7 +1333,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1353,7 +1357,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1377,12 +1381,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling RecommendedForYouQueryParameters., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling RecommendedForYouQueryParameters., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1401,7 +1412,7 @@ public function getUserToken() /** * Sets userToken. * - * @param string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1425,7 +1436,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1436,30 +1447,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1473,7 +1460,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1497,7 +1484,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1521,7 +1508,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1569,7 +1556,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1593,7 +1580,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1604,30 +1591,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1641,7 +1604,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1665,7 +1628,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1689,7 +1652,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1713,7 +1676,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1737,7 +1700,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1761,7 +1724,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1785,7 +1748,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1809,7 +1772,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1857,7 +1820,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1912,7 +1875,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1936,7 +1899,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1984,7 +1947,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2008,7 +1971,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2080,7 +2043,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2104,7 +2067,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2128,7 +2091,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2152,7 +2115,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2176,7 +2139,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2296,7 +2259,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2320,7 +2283,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2344,7 +2307,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2392,7 +2355,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2416,7 +2379,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2464,7 +2427,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2488,7 +2451,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2519,7 +2482,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2543,7 +2506,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2577,6 +2540,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling RecommendedForYouQueryParameters., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2595,7 +2562,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2619,7 +2586,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2667,7 +2634,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveStopWords.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveStopWords.php index f211f66091..1216fb9527 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveStopWords.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveStopWords.php @@ -8,7 +8,7 @@ * RemoveStopWords Class Doc Comment. * * @category Class - * @description Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + * @description Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. */ class RemoveStopWords extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveWordsIfNoResults.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveWordsIfNoResults.php index cad2e8a5bc..7702e17f5a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveWordsIfNoResults.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RemoveWordsIfNoResults.php @@ -8,7 +8,7 @@ * RemoveWordsIfNoResults Class Doc Comment. * * @category Class - * @description Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. + * @description Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn't return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ class RemoveWordsIfNoResults { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RenderingContent.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RenderingContent.php index 62ff12c3b6..da6e237e50 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RenderingContent.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RenderingContent.php @@ -8,7 +8,7 @@ * RenderingContent Class Doc Comment. * * @category Class - * @description Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * @description Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. */ class RenderingContent extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsObject.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsObject.php index b47bccad3a..4196e859bb 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsObject.php @@ -43,14 +43,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -129,14 +127,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -216,14 +212,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -302,14 +296,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -388,14 +380,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -534,9 +524,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -555,9 +542,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -752,6 +736,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -764,6 +752,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -784,6 +780,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -811,7 +811,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -835,7 +835,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -859,7 +859,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -979,7 +979,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1003,7 +1003,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1027,7 +1027,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1051,7 +1051,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1075,12 +1075,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchParamsObject., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1099,7 +1103,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1123,7 +1127,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1154,7 +1158,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1178,7 +1182,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1250,7 +1254,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1278,7 +1282,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1302,7 +1306,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1326,7 +1330,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1350,7 +1354,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1374,12 +1378,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParamsObject., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParamsObject., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1398,7 +1409,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1422,7 +1433,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1433,30 +1444,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1470,7 +1457,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1494,7 +1481,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1518,7 +1505,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1566,7 +1553,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1590,7 +1577,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1601,30 +1588,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1638,7 +1601,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1662,7 +1625,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1686,7 +1649,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1710,7 +1673,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1734,7 +1697,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1758,7 +1721,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1782,7 +1745,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1806,7 +1769,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1854,7 +1817,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1909,7 +1872,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1933,7 +1896,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1981,7 +1944,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2005,7 +1968,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2077,7 +2040,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2101,7 +2064,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2125,7 +2088,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2149,7 +2112,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2173,7 +2136,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2293,7 +2256,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2317,7 +2280,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2341,7 +2304,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2389,7 +2352,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2413,7 +2376,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Recommend\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2461,7 +2424,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2485,7 +2448,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2516,7 +2479,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2540,7 +2503,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2574,6 +2537,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchParamsObject., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2592,7 +2559,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2616,7 +2583,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2664,7 +2631,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsQuery.php index f29d29eb5d..f4f92d17a7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchParamsQuery.php @@ -161,7 +161,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesParams.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesParams.php index e5286f93c4..7b66af0fbb 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesParams.php @@ -208,7 +208,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query full-text query + * @param null|string $query search query * * @return self */ @@ -256,7 +256,7 @@ public function getPage() /** * Sets page. * - * @param null|int $page requested page (the first page is page 0) + * @param null|int $page requested page of the API response * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesResponse.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesResponse.php index 88e15d1106..c7b85e2184 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SearchRecommendRulesResponse.php @@ -169,6 +169,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['nbPages']) || null === $this->container['nbPages']) { $invalidProperties[] = "'nbPages' can't be null"; } @@ -224,7 +228,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -248,12 +252,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchRecommendRulesResponse., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -272,7 +280,7 @@ public function getNbPages() /** * Sets nbPages. * - * @param int $nbPages number of pages of results for the current query + * @param int $nbPages number of pages of results * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SemanticSearch.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SemanticSearch.php index ed85d2edae..a0967c9ab7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SemanticSearch.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SemanticSearch.php @@ -8,7 +8,7 @@ * SemanticSearch Class Doc Comment. * * @category Class - * @description Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * @description Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. */ class SemanticSearch extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -162,7 +162,7 @@ public function getEventSources() /** * Sets eventSources. * - * @param null|string[] $eventSources Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + * @param null|string[] $eventSources Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResult.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResult.php index 67dcedffb1..3cf8bc65ca 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResult.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResult.php @@ -178,7 +178,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResultOption.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResultOption.php index d895c69a67..9707db21a6 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResultOption.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SnippetResultOption.php @@ -8,7 +8,7 @@ * SnippetResultOption Class Doc Comment. * * @category Class - * @description Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * @description Snippets that show the context around a matching search query. */ class SnippetResultOption extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -179,7 +179,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/SortRemainingBy.php b/clients/algoliasearch-client-php/lib/Model/Recommend/SortRemainingBy.php index 8e7dd67176..c1d0887cb3 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/SortRemainingBy.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/SortRemainingBy.php @@ -8,7 +8,7 @@ * SortRemainingBy Class Doc Comment. * * @category Class - * @description How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + * @description Order of facet values that aren't explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don't show facet values that aren't explicitly positioned.</dd> </dl>. */ class SortRemainingBy { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/TagFilters.php b/clients/algoliasearch-client-php/lib/Model/Recommend/TagFilters.php index b8a403f480..dd1eafc9da 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/TagFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/TagFilters.php @@ -8,7 +8,7 @@ * TagFilters Class Doc Comment. * * @category Class - * @description [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + * @description Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. */ class TagFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/TaskStatus.php b/clients/algoliasearch-client-php/lib/Model/Recommend/TaskStatus.php index 9a7963bd05..f784caa671 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/TaskStatus.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/TaskStatus.php @@ -8,7 +8,7 @@ * TaskStatus Class Doc Comment. * * @category Class - * @description _published_ if the task has been processed, _notPublished_ otherwise. + * @description Task status, `published` if the task is completed, `notPublished` otherwise. */ class TaskStatus { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingFacetsQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingFacetsQuery.php index cbfce20d12..bde9cb9cc4 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingFacetsQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingFacetsQuery.php @@ -210,7 +210,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingItemsQuery.php b/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingItemsQuery.php index 11736a78c9..50b88c1e8d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingItemsQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/TrendingItemsQuery.php @@ -230,7 +230,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/TypoTolerance.php b/clients/algoliasearch-client-php/lib/Model/Recommend/TypoTolerance.php index 3d174823e0..e54db0901e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/TypoTolerance.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/TypoTolerance.php @@ -8,7 +8,7 @@ * TypoTolerance Class Doc Comment. * * @category Class - * @description Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + * @description Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. */ class TypoTolerance extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/TypoToleranceEnum.php b/clients/algoliasearch-client-php/lib/Model/Recommend/TypoToleranceEnum.php index 619e630bed..6d223e7297 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/TypoToleranceEnum.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/TypoToleranceEnum.php @@ -8,6 +8,7 @@ * TypoToleranceEnum Class Doc Comment. * * @category Class + * @description - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. */ class TypoToleranceEnum { diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/Value.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Value.php index ec9eeaaeb8..1b6da0fcc8 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/Value.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Value.php @@ -169,7 +169,7 @@ public function getOrder() /** * Sets order. * - * @param null|string[] $order pinned order of facet lists + * @param null|string[] $order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Acl.php b/clients/algoliasearch-client-php/lib/Model/Search/Acl.php index 3667c7f99b..f850ecf5d6 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Acl.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Acl.php @@ -8,7 +8,7 @@ * Acl Class Doc Comment. * * @category Class - * @description API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. + * @description Access control list permissions. */ class Acl { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Action.php b/clients/algoliasearch-client-php/lib/Model/Search/Action.php index abf9fab46a..3517d9bea0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Action.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Action.php @@ -8,7 +8,7 @@ * Action Class Doc Comment. * * @category Class - * @description Type of batch operation. + * @description Type of indexing operation. */ class Action { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AddApiKeyResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/AddApiKeyResponse.php index cddf07ba1c..987a007d8a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AddApiKeyResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AddApiKeyResponse.php @@ -202,7 +202,7 @@ public function getCreatedAt() /** * Sets createdAt. * - * @param string $createdAt Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * @param string $createdAt Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Anchoring.php b/clients/algoliasearch-client-php/lib/Model/Search/Anchoring.php index 373ae08f55..e6202dcdb5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Anchoring.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Anchoring.php @@ -8,7 +8,7 @@ * Anchoring Class Doc Comment. * * @category Class - * @description Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + * @description Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. */ class Anchoring { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ApiKey.php b/clients/algoliasearch-client-php/lib/Model/Search/ApiKey.php index 7a64acbd2b..279f8a720e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ApiKey.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ApiKey.php @@ -224,7 +224,7 @@ public function getAcl() /** * Sets acl. * - * @param \Algolia\AlgoliaSearch\Model\Search\Acl[] $acl [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + * @param \Algolia\AlgoliaSearch\Model\Search\Acl[] $acl Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). * * @return self */ @@ -248,7 +248,7 @@ public function getDescription() /** * Sets description. * - * @param null|string $description description of an API key for you and your team members + * @param null|string $description description of an API key to help you identify this API key * * @return self */ @@ -272,7 +272,7 @@ public function getIndexes() /** * Sets indexes. * - * @param null|string[] $indexes Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + * @param null|string[] $indexes Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". * * @return self */ @@ -296,7 +296,7 @@ public function getMaxHitsPerQuery() /** * Sets maxHitsPerQuery. * - * @param null|int $maxHitsPerQuery Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * @param null|int $maxHitsPerQuery Maximum number of results this API key can retrieve in one query. By default, there's no limit. * * @return self */ @@ -320,7 +320,7 @@ public function getMaxQueriesPerIPPerHour() /** * Sets maxQueriesPerIPPerHour. * - * @param null|int $maxQueriesPerIPPerHour Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * @param null|int $maxQueriesPerIPPerHour Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. * * @return self */ @@ -344,7 +344,7 @@ public function getQueryParameters() /** * Sets queryParameters. * - * @param null|string $queryParameters Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + * @param null|string $queryParameters Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. * * @return self */ @@ -368,7 +368,7 @@ public function getReferers() /** * Sets referers. * - * @param null|string[] $referers Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + * @param null|string[] $referers Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). * * @return self */ @@ -392,7 +392,7 @@ public function getValidity() /** * Sets validity. * - * @param null|int $validity Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + * @param null|int $validity Duration (in seconds) after which the API key expires. By default, API keys don't expire. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecision.php b/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecision.php index 70745b48be..8203437d1f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecision.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecision.php @@ -8,7 +8,7 @@ * AroundPrecision Class Doc Comment. * * @category Class - * @description Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + * @description Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ class AroundPrecision extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecisionFromValueInner.php b/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecisionFromValueInner.php index d1a8b58440..ab43ce80d0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecisionFromValueInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecisionFromValueInner.php @@ -8,6 +8,7 @@ * AroundPrecisionFromValueInner Class Doc Comment. * * @category Class + * @description Range object with lower and upper values in meters to define custom ranges. */ class AroundPrecisionFromValueInner extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -169,7 +170,7 @@ public function getFrom() /** * Sets from. * - * @param null|int $from from + * @param null|int $from Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. * * @return self */ @@ -193,7 +194,7 @@ public function getValue() /** * Sets value. * - * @param null|int $value value + * @param null|int $value Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AroundRadius.php b/clients/algoliasearch-client-php/lib/Model/Search/AroundRadius.php index e846cab3f0..bd50035115 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AroundRadius.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AroundRadius.php @@ -8,7 +8,7 @@ * AroundRadius Class Doc Comment. * * @category Class - * @description [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + * @description Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. */ class AroundRadius extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AroundRadiusAll.php b/clients/algoliasearch-client-php/lib/Model/Search/AroundRadiusAll.php index 698c5ab5e1..5d2200d948 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AroundRadiusAll.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AroundRadiusAll.php @@ -8,6 +8,7 @@ * AroundRadiusAll Class Doc Comment. * * @category Class + * @description Return all records with a valid `_geoloc` attribute. Don't filter by distance. */ class AroundRadiusAll { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AttributeToUpdate.php b/clients/algoliasearch-client-php/lib/Model/Search/AttributeToUpdate.php index 9c6c112dd7..7bfc06135a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AttributeToUpdate.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AttributeToUpdate.php @@ -202,7 +202,7 @@ public function getValue() /** * Sets value. * - * @param string $value value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value + * @param string $value value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilter.php b/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilter.php index e7d90f0414..c1e9c623dd 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilter.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilter.php @@ -8,7 +8,7 @@ * AutomaticFacetFilter Class Doc Comment. * * @category Class - * @description Automatic facet Filter. + * @description Filter or optional filter to be applied to the search. */ class AutomaticFacetFilter extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -184,7 +184,7 @@ public function getFacet() /** * Sets facet. * - * @param string $facet Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + * @param string $facet Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. * * @return self */ @@ -208,7 +208,7 @@ public function getScore() /** * Sets score. * - * @param null|int $score Score for the filter. Typically used for optional or disjunctive filters. + * @param null|int $score filter scores to give different weights to individual filters * * @return self */ @@ -232,7 +232,7 @@ public function getDisjunctive() /** * Sets disjunctive. * - * @param null|bool $disjunctive whether the filter is disjunctive (true) or conjunctive (false) + * @param null|bool $disjunctive Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilters.php b/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilters.php index f728f04839..27b01351ab 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/AutomaticFacetFilters.php @@ -8,7 +8,7 @@ * AutomaticFacetFilters Class Doc Comment. * * @category Class - * @description Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * @description Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. */ class AutomaticFacetFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BaseIndexSettings.php b/clients/algoliasearch-client-php/lib/Model/Search/BaseIndexSettings.php index 4a6b290d86..f4501b04db 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BaseIndexSettings.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BaseIndexSettings.php @@ -17,6 +17,7 @@ class BaseIndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel imple * @var string[] */ protected static $modelTypes = [ + 'attributesForFaceting' => 'string[]', 'replicas' => 'string[]', 'paginationLimitedTo' => 'int', 'unretrievableAttributes' => 'string[]', @@ -41,6 +42,7 @@ class BaseIndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel imple * @var string[] */ protected static $modelFormats = [ + 'attributesForFaceting' => null, 'replicas' => null, 'paginationLimitedTo' => null, 'unretrievableAttributes' => null, @@ -66,6 +68,7 @@ class BaseIndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel imple * @var string[] */ protected static $attributeMap = [ + 'attributesForFaceting' => 'attributesForFaceting', 'replicas' => 'replicas', 'paginationLimitedTo' => 'paginationLimitedTo', 'unretrievableAttributes' => 'unretrievableAttributes', @@ -90,6 +93,7 @@ class BaseIndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel imple * @var string[] */ protected static $setters = [ + 'attributesForFaceting' => 'setAttributesForFaceting', 'replicas' => 'setReplicas', 'paginationLimitedTo' => 'setPaginationLimitedTo', 'unretrievableAttributes' => 'setUnretrievableAttributes', @@ -114,6 +118,7 @@ class BaseIndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel imple * @var string[] */ protected static $getters = [ + 'attributesForFaceting' => 'getAttributesForFaceting', 'replicas' => 'getReplicas', 'paginationLimitedTo' => 'getPaginationLimitedTo', 'unretrievableAttributes' => 'getUnretrievableAttributes', @@ -146,6 +151,9 @@ class BaseIndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel imple */ public function __construct(array $data = null) { + if (isset($data['attributesForFaceting'])) { + $this->container['attributesForFaceting'] = $data['attributesForFaceting']; + } if (isset($data['replicas'])) { $this->container['replicas'] = $data['replicas']; } @@ -254,7 +262,13 @@ public static function getters() */ public function listInvalidProperties() { - return []; + $invalidProperties = []; + + if (isset($this->container['paginationLimitedTo']) && ($this->container['paginationLimitedTo'] > 20000)) { + $invalidProperties[] = "invalid value for 'paginationLimitedTo', must be smaller than or equal to 20000."; + } + + return $invalidProperties; } /** @@ -268,6 +282,30 @@ public function valid() return 0 === count($this->listInvalidProperties()); } + /** + * Gets attributesForFaceting. + * + * @return null|string[] + */ + public function getAttributesForFaceting() + { + return $this->container['attributesForFaceting'] ?? null; + } + + /** + * Sets attributesForFaceting. + * + * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + * + * @return self + */ + public function setAttributesForFaceting($attributesForFaceting) + { + $this->container['attributesForFaceting'] = $attributesForFaceting; + + return $this; + } + /** * Gets replicas. * @@ -281,7 +319,7 @@ public function getReplicas() /** * Sets replicas. * - * @param null|string[] $replicas Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + * @param null|string[] $replicas Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). * * @return self */ @@ -305,12 +343,16 @@ public function getPaginationLimitedTo() /** * Sets paginationLimitedTo. * - * @param null|int $paginationLimitedTo maximum number of hits accessible through pagination + * @param null|int $paginationLimitedTo Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. * * @return self */ public function setPaginationLimitedTo($paginationLimitedTo) { + if (!is_null($paginationLimitedTo) && ($paginationLimitedTo > 20000)) { + throw new \InvalidArgumentException('invalid value for $paginationLimitedTo when calling BaseIndexSettings., must be smaller than or equal to 20000.'); + } + $this->container['paginationLimitedTo'] = $paginationLimitedTo; return $this; @@ -329,7 +371,7 @@ public function getUnretrievableAttributes() /** * Sets unretrievableAttributes. * - * @param null|string[] $unretrievableAttributes attributes that can't be retrieved at query time + * @param null|string[] $unretrievableAttributes Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. * * @return self */ @@ -353,7 +395,7 @@ public function getDisableTypoToleranceOnWords() /** * Sets disableTypoToleranceOnWords. * - * @param null|string[] $disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. * * @return self */ @@ -377,7 +419,7 @@ public function getAttributesToTransliterate() /** * Sets attributesToTransliterate. * - * @param null|string[] $attributesToTransliterate Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + * @param null|string[] $attributesToTransliterate Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. * * @return self */ @@ -401,7 +443,7 @@ public function getCamelCaseAttributes() /** * Sets camelCaseAttributes. * - * @param null|string[] $camelCaseAttributes Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * @param null|string[] $camelCaseAttributes Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. * * @return self */ @@ -425,7 +467,7 @@ public function getDecompoundedAttributes() /** * Sets decompoundedAttributes. * - * @param null|object $decompoundedAttributes Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + * @param null|object $decompoundedAttributes Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). * * @return self */ @@ -449,7 +491,7 @@ public function getIndexLanguages() /** * Sets indexLanguages. * - * @param null|string[] $indexLanguages Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string[] $indexLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -473,7 +515,7 @@ public function getDisablePrefixOnAttributes() /** * Sets disablePrefixOnAttributes. * - * @param null|string[] $disablePrefixOnAttributes Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + * @param null|string[] $disablePrefixOnAttributes Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). * * @return self */ @@ -497,7 +539,7 @@ public function getAllowCompressionOfIntegerArray() /** * Sets allowCompressionOfIntegerArray. * - * @param null|bool $allowCompressionOfIntegerArray Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + * @param null|bool $allowCompressionOfIntegerArray Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. * * @return self */ @@ -521,7 +563,7 @@ public function getNumericAttributesForFiltering() /** * Sets numericAttributesForFiltering. * - * @param null|string[] $numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * @param null|string[] $numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. * * @return self */ @@ -545,7 +587,7 @@ public function getSeparatorsToIndex() /** * Sets separatorsToIndex. * - * @param null|string $separatorsToIndex Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * @param null|string $separatorsToIndex Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. * * @return self */ @@ -569,7 +611,7 @@ public function getSearchableAttributes() /** * Sets searchableAttributes. * - * @param null|string[] $searchableAttributes [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * @param null|string[] $searchableAttributes Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. * * @return self */ @@ -593,7 +635,7 @@ public function getUserData() /** * Sets userData. * - * @param null|mixed $userData lets you store custom data in your indices + * @param null|mixed $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ @@ -617,7 +659,7 @@ public function getCustomNormalization() /** * Sets customNormalization. * - * @param null|array> $customNormalization A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|array> $customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * * @return self */ @@ -641,7 +683,7 @@ public function getAttributeForDistinct() /** * Sets attributeForDistinct. * - * @param null|string $attributeForDistinct Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * @param null|string $attributeForDistinct Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParams.php b/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParams.php index dcb43c735e..cbe74a28e0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParams.php @@ -43,7 +43,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', @@ -84,7 +83,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, @@ -126,7 +124,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', @@ -167,7 +164,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', @@ -208,7 +204,6 @@ class BaseSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implem 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', @@ -309,9 +304,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -392,6 +384,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -404,6 +400,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + return $invalidProperties; } @@ -431,7 +435,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -455,7 +459,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -479,7 +483,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -599,7 +603,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -623,7 +627,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -647,7 +651,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -671,7 +675,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -695,12 +699,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling BaseSearchParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -719,7 +727,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -743,7 +751,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -774,7 +782,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -798,7 +806,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -870,7 +878,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -898,7 +906,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -922,7 +930,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -946,7 +954,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -970,7 +978,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -994,12 +1002,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParams., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParams., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1018,7 +1033,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1042,7 +1057,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1053,30 +1068,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1090,7 +1081,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1114,7 +1105,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1138,7 +1129,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1186,7 +1177,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1210,7 +1201,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParamsWithoutQuery.php b/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParamsWithoutQuery.php index 53da355e3b..773cdaaa94 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParamsWithoutQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchParamsWithoutQuery.php @@ -42,7 +42,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', @@ -82,7 +81,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, @@ -123,7 +121,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', @@ -163,7 +160,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', @@ -203,7 +199,6 @@ class BaseSearchParamsWithoutQuery extends \Algolia\AlgoliaSearch\Model\Abstract 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', @@ -301,9 +296,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -384,6 +376,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -396,6 +392,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + return $invalidProperties; } @@ -423,7 +427,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -447,7 +451,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -567,7 +571,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -591,7 +595,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -615,7 +619,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -639,7 +643,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -663,12 +667,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling BaseSearchParamsWithoutQuery., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -687,7 +695,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -711,7 +719,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -742,7 +750,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -766,7 +774,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -838,7 +846,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -866,7 +874,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -890,7 +898,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -914,7 +922,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -938,7 +946,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -962,12 +970,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParamsWithoutQuery., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BaseSearchParamsWithoutQuery., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -986,7 +1001,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1010,7 +1025,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1021,30 +1036,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1058,7 +1049,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1082,7 +1073,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1106,7 +1097,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1154,7 +1145,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1178,7 +1169,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchResponse.php index fa46049489..083932cf17 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BaseSearchResponse.php @@ -380,6 +380,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } @@ -491,7 +495,7 @@ public function getAutomaticRadius() /** * Sets automaticRadius. * - * @param null|string $automaticRadius automatically-computed radius + * @param null|string $automaticRadius distance from a central coordinate provided by `aroundLatLng` * * @return self */ @@ -623,7 +627,7 @@ public function getFacets() /** * Sets facets. * - * @param null|array> $facets mapping of each facet name to the corresponding facet counts + * @param null|array> $facets facet counts * * @return self */ @@ -774,7 +778,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -798,7 +802,7 @@ public function getNbPages() /** * Sets nbPages. * - * @param int $nbPages number of pages of results for the current query + * @param int $nbPages number of pages of results * * @return self */ @@ -846,12 +850,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling BaseSearchResponse., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1062,7 +1070,7 @@ public function getUserData() /** * Sets userData. * - * @param null|mixed $userData lets you store custom data in your indices + * @param null|mixed $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BatchDictionaryEntriesParams.php b/clients/algoliasearch-client-php/lib/Model/Search/BatchDictionaryEntriesParams.php index 45c3c83f43..088b804f08 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BatchDictionaryEntriesParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BatchDictionaryEntriesParams.php @@ -8,7 +8,7 @@ * BatchDictionaryEntriesParams Class Doc Comment. * * @category Class - * @description `batchDictionaryEntries` parameters. + * @description Request body for updating dictionary entries. */ class BatchDictionaryEntriesParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -176,7 +176,7 @@ public function getClearExistingDictionaryEntries() /** * Sets clearExistingDictionaryEntries. * - * @param null|bool $clearExistingDictionaryEntries incidates whether to replace all custom entries in the dictionary with the ones sent with this request + * @param null|bool $clearExistingDictionaryEntries whether to replace all custom entries in the dictionary with the ones sent with this request * * @return self */ @@ -200,7 +200,7 @@ public function getRequests() /** * Sets requests. * - * @param \Algolia\AlgoliaSearch\Model\Search\BatchDictionaryEntriesRequest[] $requests operations to batch + * @param \Algolia\AlgoliaSearch\Model\Search\BatchDictionaryEntriesRequest[] $requests list of additions and deletions to your dictionaries * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BatchResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/BatchResponse.php index e1e505cf0f..2e9db65f1b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BatchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BatchResponse.php @@ -178,7 +178,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ @@ -202,7 +202,7 @@ public function getObjectIDs() /** * Sets objectIDs. * - * @param string[] $objectIDs unique object (record) identifiers + * @param string[] $objectIDs unique record identifiers * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php index 0e8ca95161..af8395e411 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php @@ -44,14 +44,12 @@ class BrowseParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -132,14 +130,12 @@ class BrowseParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -221,14 +217,12 @@ class BrowseParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -309,14 +303,12 @@ class BrowseParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -397,14 +389,12 @@ class BrowseParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -547,9 +537,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -568,9 +555,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -768,6 +752,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -780,6 +768,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -800,6 +796,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -851,7 +851,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -875,7 +875,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -899,7 +899,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -1019,7 +1019,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1043,7 +1043,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1067,7 +1067,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1091,7 +1091,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1115,12 +1115,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling BrowseParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1139,7 +1143,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1163,7 +1167,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1194,7 +1198,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1218,7 +1222,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1290,7 +1294,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1318,7 +1322,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1342,7 +1346,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1366,7 +1370,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1390,7 +1394,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1414,12 +1418,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParams., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParams., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1438,7 +1449,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1462,7 +1473,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1473,30 +1484,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1510,7 +1497,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1534,7 +1521,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1558,7 +1545,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1606,7 +1593,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1630,7 +1617,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1641,30 +1628,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1678,7 +1641,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1702,7 +1665,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1726,7 +1689,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1750,7 +1713,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1774,7 +1737,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1798,7 +1761,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1822,7 +1785,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1846,7 +1809,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1894,7 +1857,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1949,7 +1912,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1973,7 +1936,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -2021,7 +1984,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2045,7 +2008,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2117,7 +2080,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2141,7 +2104,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2165,7 +2128,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2189,7 +2152,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2213,7 +2176,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2333,7 +2296,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2357,7 +2320,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2381,7 +2344,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2429,7 +2392,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2453,7 +2416,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2501,7 +2464,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2525,7 +2488,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2556,7 +2519,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2580,7 +2543,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2614,6 +2577,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling BrowseParams., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2632,7 +2599,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2656,7 +2623,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2704,7 +2671,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ @@ -2752,7 +2719,7 @@ public function getCursor() /** * Sets cursor. * - * @param null|string $cursor Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * @param null|string $cursor Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php index af17a44d44..99b84c413c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php @@ -43,14 +43,12 @@ class BrowseParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -130,14 +128,12 @@ class BrowseParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -218,14 +214,12 @@ class BrowseParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -305,14 +299,12 @@ class BrowseParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -392,14 +384,12 @@ class BrowseParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -539,9 +529,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -560,9 +547,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -760,6 +744,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -772,6 +760,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -792,6 +788,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -819,7 +819,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -843,7 +843,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -867,7 +867,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -987,7 +987,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1011,7 +1011,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1035,7 +1035,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1059,7 +1059,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1083,12 +1083,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling BrowseParamsObject., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1107,7 +1111,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1131,7 +1135,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1162,7 +1166,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1186,7 +1190,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1258,7 +1262,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1286,7 +1290,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1310,7 +1314,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1334,7 +1338,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1358,7 +1362,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1382,12 +1386,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParamsObject., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParamsObject., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1406,7 +1417,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1430,7 +1441,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1441,30 +1452,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1478,7 +1465,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1502,7 +1489,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1526,7 +1513,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1574,7 +1561,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1598,7 +1585,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1609,30 +1596,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1646,7 +1609,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1670,7 +1633,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1694,7 +1657,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1718,7 +1681,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1742,7 +1705,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1766,7 +1729,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1790,7 +1753,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1814,7 +1777,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1862,7 +1825,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1917,7 +1880,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1941,7 +1904,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1989,7 +1952,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2013,7 +1976,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2085,7 +2048,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2109,7 +2072,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2133,7 +2096,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2157,7 +2120,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2181,7 +2144,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2301,7 +2264,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2325,7 +2288,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2349,7 +2312,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2397,7 +2360,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2421,7 +2384,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2469,7 +2432,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2493,7 +2456,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2524,7 +2487,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2548,7 +2511,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2582,6 +2545,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling BrowseParamsObject., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2600,7 +2567,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2624,7 +2591,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2672,7 +2639,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ @@ -2720,7 +2687,7 @@ public function getCursor() /** * Sets cursor. * - * @param null|string $cursor Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * @param null|string $cursor Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BrowseResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/BrowseResponse.php index 26e6c13778..d3805d2a4e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BrowseResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BrowseResponse.php @@ -412,6 +412,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } @@ -532,7 +536,7 @@ public function getAutomaticRadius() /** * Sets automaticRadius. * - * @param null|string $automaticRadius automatically-computed radius + * @param null|string $automaticRadius distance from a central coordinate provided by `aroundLatLng` * * @return self */ @@ -664,7 +668,7 @@ public function getFacets() /** * Sets facets. * - * @param null|array> $facets mapping of each facet name to the corresponding facet counts + * @param null|array> $facets facet counts * * @return self */ @@ -815,7 +819,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -839,7 +843,7 @@ public function getNbPages() /** * Sets nbPages. * - * @param int $nbPages number of pages of results for the current query + * @param int $nbPages number of pages of results * * @return self */ @@ -887,12 +891,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling BrowseResponse., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1103,7 +1111,7 @@ public function getUserData() /** * Sets userData. * - * @param null|object $userData lets you store custom data in your indices + * @param null|object $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ @@ -1151,7 +1159,7 @@ public function getHits() /** * Sets hits. * - * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits hits + * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. * * @return self */ @@ -1175,7 +1183,7 @@ public function getQuery() /** * Sets query. * - * @param string $query text to search for in an index + * @param string $query search query * * @return self */ @@ -1223,7 +1231,7 @@ public function getCursor() /** * Sets cursor. * - * @param null|string $cursor Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * @param null|string $cursor Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperation.php b/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperation.php index 8550187962..4166956ece 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperation.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperation.php @@ -8,7 +8,7 @@ * BuiltInOperation Class Doc Comment. * * @category Class - * @description To update an attribute without pushing the entire record, you can use these built-in operations. + * @description Update to perform on the attribute. */ class BuiltInOperation extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -203,7 +203,7 @@ public function getValue() /** * Sets value. * - * @param string $value value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value + * @param string $value value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperationType.php b/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperationType.php index d3fc45fef2..40c6025d72 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperationType.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BuiltInOperationType.php @@ -8,7 +8,7 @@ * BuiltInOperationType Class Doc Comment. * * @category Class - * @description Operation to apply to the attribute. + * @description How to change the attribute. */ class BuiltInOperationType { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Condition.php b/clients/algoliasearch-client-php/lib/Model/Search/Condition.php index db73497305..96981c34ba 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Condition.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Condition.php @@ -21,6 +21,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => '\Algolia\AlgoliaSearch\Model\Search\Anchoring', 'alternatives' => 'bool', 'context' => 'string', + 'filters' => 'string', ]; /** @@ -33,6 +34,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => null, 'alternatives' => null, 'context' => null, + 'filters' => null, ]; /** @@ -46,6 +48,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => 'anchoring', 'alternatives' => 'alternatives', 'context' => 'context', + 'filters' => 'filters', ]; /** @@ -58,6 +61,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => 'setAnchoring', 'alternatives' => 'setAlternatives', 'context' => 'setContext', + 'filters' => 'setFilters', ]; /** @@ -70,6 +74,7 @@ class Condition extends \Algolia\AlgoliaSearch\Model\AbstractModel implements Mo 'anchoring' => 'getAnchoring', 'alternatives' => 'getAlternatives', 'context' => 'getContext', + 'filters' => 'getFilters', ]; /** @@ -98,6 +103,9 @@ public function __construct(array $data = null) if (isset($data['context'])) { $this->container['context'] = $data['context']; } + if (isset($data['filters'])) { + $this->container['filters'] = $data['filters']; + } } /** @@ -158,7 +166,13 @@ public static function getters() */ public function listInvalidProperties() { - return []; + $invalidProperties = []; + + if (isset($this->container['context']) && !preg_match('/[A-Za-z0-9_-]+/', $this->container['context'])) { + $invalidProperties[] = "invalid value for 'context', must be conform to the pattern /[A-Za-z0-9_-]+/."; + } + + return $invalidProperties; } /** @@ -185,7 +199,7 @@ public function getPattern() /** * Sets pattern. * - * @param null|string $pattern query pattern syntax + * @param null|string $pattern Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". * * @return self */ @@ -233,7 +247,7 @@ public function getAlternatives() /** * Sets alternatives. * - * @param null|bool $alternatives whether the pattern matches on plurals, synonyms, and typos + * @param null|bool $alternatives whether the pattern should match plurals, synonyms, and typos * * @return self */ @@ -257,17 +271,45 @@ public function getContext() /** * Sets context. * - * @param null|string $context rule context format: [A-Za-z0-9_-]+) + * @param null|string $context An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. * * @return self */ public function setContext($context) { + if (!is_null($context) && (!preg_match('/[A-Za-z0-9_-]+/', $context))) { + throw new \InvalidArgumentException("invalid value for {$context} when calling Condition., must conform to the pattern /[A-Za-z0-9_-]+/."); + } + $this->container['context'] = $context; return $this; } + /** + * Gets filters. + * + * @return null|string + */ + public function getFilters() + { + return $this->container['filters'] ?? null; + } + + /** + * Sets filters. + * + * @param null|string $filters Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + * + * @return self + */ + public function setFilters($filters) + { + $this->container['filters'] = $filters; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Consequence.php b/clients/algoliasearch-client-php/lib/Model/Search/Consequence.php index 7dac94b843..acdb1edfbb 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Consequence.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Consequence.php @@ -8,7 +8,7 @@ * Consequence Class Doc Comment. * * @category Class - * @description [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + * @description Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). */ class Consequence extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -167,7 +167,17 @@ public static function getters() */ public function listInvalidProperties() { - return []; + $invalidProperties = []; + + if (isset($this->container['promote']) && (count($this->container['promote']) > 300)) { + $invalidProperties[] = "invalid value for 'promote', number of items must be less than or equal to 300."; + } + + if (isset($this->container['hide']) && (count($this->container['hide']) > 50)) { + $invalidProperties[] = "invalid value for 'hide', number of items must be less than or equal to 50."; + } + + return $invalidProperties; } /** @@ -218,12 +228,15 @@ public function getPromote() /** * Sets promote. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\Promote[] $promote records to promote + * @param null|\Algolia\AlgoliaSearch\Model\Search\Promote[] $promote Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. * * @return self */ public function setPromote($promote) { + if (!is_null($promote) && (count($promote) > 300)) { + throw new \InvalidArgumentException('invalid value for $promote when calling Consequence., number of items must be less than or equal to 300.'); + } $this->container['promote'] = $promote; return $this; @@ -242,7 +255,7 @@ public function getFilterPromotes() /** * Sets filterPromotes. * - * @param null|bool $filterPromotes Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + * @param null|bool $filterPromotes Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. * * @return self */ @@ -266,12 +279,15 @@ public function getHide() /** * Sets hide. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\ConsequenceHide[] $hide Records to hide. By default, you can hide up to 50 records per rule. + * @param null|\Algolia\AlgoliaSearch\Model\Search\ConsequenceHide[] $hide records you want to hide from the search results * * @return self */ public function setHide($hide) { + if (!is_null($hide) && (count($hide) > 50)) { + throw new \InvalidArgumentException('invalid value for $hide when calling Consequence., number of items must be less than or equal to 50.'); + } $this->container['hide'] = $hide; return $this; @@ -290,7 +306,7 @@ public function getUserData() /** * Sets userData. * - * @param null|mixed $userData Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + * @param null|mixed $userData A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceHide.php b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceHide.php index 1a84f29c99..91b5007d33 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceHide.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceHide.php @@ -8,7 +8,7 @@ * ConsequenceHide Class Doc Comment. * * @category Class - * @description Unique identifier of the record to hide. + * @description Object ID of the record to hide. */ class ConsequenceHide extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -168,7 +168,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php index e6d09a40ac..311c0b2ced 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php @@ -42,14 +42,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -130,14 +128,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -219,14 +215,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -307,14 +301,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -395,14 +387,12 @@ class ConsequenceParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -541,9 +531,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -562,9 +549,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -768,6 +752,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -780,6 +768,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -800,6 +796,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -827,7 +827,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -851,7 +851,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -971,7 +971,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -995,7 +995,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1019,7 +1019,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1043,7 +1043,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1067,12 +1067,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling ConsequenceParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1091,7 +1095,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1115,7 +1119,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1146,7 +1150,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1170,7 +1174,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1242,7 +1246,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1270,7 +1274,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1294,7 +1298,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1318,7 +1322,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1342,7 +1346,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1366,12 +1370,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling ConsequenceParams., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling ConsequenceParams., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1390,7 +1401,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1414,7 +1425,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1425,30 +1436,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1462,7 +1449,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1486,7 +1473,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1510,7 +1497,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1558,7 +1545,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1582,7 +1569,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1593,30 +1580,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1630,7 +1593,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1654,7 +1617,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1678,7 +1641,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1702,7 +1665,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1726,7 +1689,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1750,7 +1713,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1774,7 +1737,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1798,7 +1761,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1846,7 +1809,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1901,7 +1864,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1925,7 +1888,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1973,7 +1936,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -1997,7 +1960,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2069,7 +2032,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2093,7 +2056,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2117,7 +2080,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2141,7 +2104,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2165,7 +2128,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2285,7 +2248,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2309,7 +2272,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2333,7 +2296,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2381,7 +2344,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2405,7 +2368,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2453,7 +2416,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2477,7 +2440,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2508,7 +2471,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2532,7 +2495,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2566,6 +2529,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling ConsequenceParams., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2584,7 +2551,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2608,7 +2575,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2656,7 +2623,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQuery.php b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQuery.php index 7f1413e72d..ea38fad627 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQuery.php @@ -8,7 +8,7 @@ * ConsequenceQuery Class Doc Comment. * * @category Class - * @description When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + * @description Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. */ class ConsequenceQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -170,7 +170,7 @@ public function getRemove() /** * Sets remove. * - * @param null|string[] $remove words to remove + * @param null|string[] $remove words to remove from the search query * * @return self */ @@ -194,7 +194,7 @@ public function getEdits() /** * Sets edits. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\Edit[] $edits edits to apply + * @param null|\Algolia\AlgoliaSearch\Model\Search\Edit[] $edits changes to make to the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQueryObject.php b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQueryObject.php index a54666ef92..7903918c6e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQueryObject.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceQueryObject.php @@ -169,7 +169,7 @@ public function getRemove() /** * Sets remove. * - * @param null|string[] $remove words to remove + * @param null|string[] $remove words to remove from the search query * * @return self */ @@ -193,7 +193,7 @@ public function getEdits() /** * Sets edits. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\Edit[] $edits edits to apply + * @param null|\Algolia\AlgoliaSearch\Model\Search\Edit[] $edits changes to make to the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/CreatedAtResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/CreatedAtResponse.php index f598397dbe..1d79a253b3 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/CreatedAtResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/CreatedAtResponse.php @@ -168,7 +168,7 @@ public function getCreatedAt() /** * Sets createdAt. * - * @param string $createdAt Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * @param string $createdAt Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Cursor.php b/clients/algoliasearch-client-php/lib/Model/Search/Cursor.php index edf26ae353..ee37c612c2 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Cursor.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Cursor.php @@ -161,7 +161,7 @@ public function getCursor() /** * Sets cursor. * - * @param null|string $cursor Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + * @param null|string $cursor Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/DeleteByParams.php b/clients/algoliasearch-client-php/lib/Model/Search/DeleteByParams.php index ec6dbbc836..eaaae880e3 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/DeleteByParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/DeleteByParams.php @@ -241,7 +241,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -313,7 +313,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -361,7 +361,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -385,7 +385,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/DeletedAtResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/DeletedAtResponse.php index c5edac3e24..f48dc44aea 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/DeletedAtResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/DeletedAtResponse.php @@ -179,7 +179,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntry.php b/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntry.php index 946e9aa0b7..a4273cb95c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntry.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntry.php @@ -211,7 +211,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique identifier for a dictionary object + * @param string $objectID unique identifier for the dictionary entry * * @return self */ @@ -235,7 +235,7 @@ public function getLanguage() /** * Sets language. * - * @param string $language [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * @param string $language ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). * * @return self */ @@ -259,7 +259,7 @@ public function getWord() /** * Sets word. * - * @param null|string $word Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + * @param null|string $word matching dictionary word for `stopwords` and `compounds` dictionaries * * @return self */ @@ -283,7 +283,7 @@ public function getWords() /** * Sets words. * - * @param null|string[] $words Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + * @param null|string[] $words matching words in the `plurals` dictionary including declensions * * @return self */ @@ -307,7 +307,7 @@ public function getDecomposition() /** * Sets decomposition. * - * @param null|string[] $decomposition for compound entries, governs the behavior of the `word` parameter + * @param null|string[] $decomposition invividual components of a compound word in the `compounds` dictionary * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntryState.php b/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntryState.php index 7831112e28..12cad6567a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntryState.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/DictionaryEntryState.php @@ -8,7 +8,7 @@ * DictionaryEntryState Class Doc Comment. * * @category Class - * @description Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). + * @description Whether a dictionary entry is active. */ class DictionaryEntryState { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/DictionaryLanguage.php b/clients/algoliasearch-client-php/lib/Model/Search/DictionaryLanguage.php index 4c8d7a4c0c..8af2612b76 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/DictionaryLanguage.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/DictionaryLanguage.php @@ -8,7 +8,7 @@ * DictionaryLanguage Class Doc Comment. * * @category Class - * @description Custom entries for a dictionary. + * @description Dictionary type. If `null`, this dictionary type isn't supported for the language. */ class DictionaryLanguage extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -162,7 +162,7 @@ public function getNbCustomEntries() /** * Sets nbCustomEntries. * - * @param null|int $nbCustomEntries If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + * @param null|int $nbCustomEntries number of custom dictionary entries * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/DictionarySettingsParams.php b/clients/algoliasearch-client-php/lib/Model/Search/DictionarySettingsParams.php index 45b75f3dc4..58b122dab9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/DictionarySettingsParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/DictionarySettingsParams.php @@ -8,7 +8,7 @@ * DictionarySettingsParams Class Doc Comment. * * @category Class - * @description Enable or turn off the built-in Algolia stop words for a specific language. + * @description Turn on or off the built-in Algolia stop words for a specific language. */ class DictionarySettingsParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Distinct.php b/clients/algoliasearch-client-php/lib/Model/Search/Distinct.php index 47364631bc..7b8a8bead2 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Distinct.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Distinct.php @@ -8,7 +8,7 @@ * Distinct Class Doc Comment. * * @category Class - * @description Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + * @description Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. */ class Distinct extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Edit.php b/clients/algoliasearch-client-php/lib/Model/Search/Edit.php index 73cc90ba17..74dc950010 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Edit.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Edit.php @@ -225,7 +225,7 @@ public function getInsert() /** * Sets insert. * - * @param null|string $insert text that should be inserted in place of the removed text inside the query string + * @param null|string $insert text to be added in place of the deleted text inside the query string * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ExactOnSingleWordQuery.php b/clients/algoliasearch-client-php/lib/Model/Search/ExactOnSingleWordQuery.php index e467de0e96..52ae2e0198 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ExactOnSingleWordQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ExactOnSingleWordQuery.php @@ -8,7 +8,7 @@ * ExactOnSingleWordQuery Class Doc Comment. * * @category Class - * @description Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + * @description Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. */ class ExactOnSingleWordQuery { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/FacetFilters.php b/clients/algoliasearch-client-php/lib/Model/Search/FacetFilters.php index 32392ee736..a85be73cb7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/FacetFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/FacetFilters.php @@ -8,7 +8,7 @@ * FacetFilters Class Doc Comment. * * @category Class - * @description [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + * @description Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ class FacetFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/FacetHits.php b/clients/algoliasearch-client-php/lib/Model/Search/FacetHits.php index cd07599f4c..499a69a5c7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/FacetHits.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/FacetHits.php @@ -213,7 +213,7 @@ public function getHighlighted() /** * Sets highlighted. * - * @param string $highlighted markup text with `facetQuery` matches highlighted + * @param string $highlighted highlighted attribute value, including HTML tags * * @return self */ @@ -237,7 +237,7 @@ public function getCount() /** * Sets count. * - * @param int $count Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + * @param int $count Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/FacetOrdering.php b/clients/algoliasearch-client-php/lib/Model/Search/FacetOrdering.php index be9af8f054..b24d8438ee 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/FacetOrdering.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/FacetOrdering.php @@ -8,7 +8,7 @@ * FacetOrdering Class Doc Comment. * * @category Class - * @description Defines the ordering of facets (widgets). + * @description Order of facet names and facet values in your UI. */ class FacetOrdering extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -194,7 +194,7 @@ public function getValues() /** * Sets values. * - * @param null|array $values ordering of facet values within an individual facet + * @param null|array $values Order of facet values. One object for each facet. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Facets.php b/clients/algoliasearch-client-php/lib/Model/Search/Facets.php index d982545777..fc61a014ff 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Facets.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Facets.php @@ -8,7 +8,7 @@ * Facets Class Doc Comment. * * @category Class - * @description Ordering of facets (widgets). + * @description Order of facet names. */ class Facets extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -162,7 +162,7 @@ public function getOrder() /** * Sets order. * - * @param null|string[] $order pinned order of facet lists + * @param null|string[] $order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/GetApiKeyResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/GetApiKeyResponse.php index 2f05ef187e..61b94b2c6c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/GetApiKeyResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/GetApiKeyResponse.php @@ -290,7 +290,7 @@ public function getAcl() /** * Sets acl. * - * @param \Algolia\AlgoliaSearch\Model\Search\Acl[] $acl [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + * @param \Algolia\AlgoliaSearch\Model\Search\Acl[] $acl Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). * * @return self */ @@ -314,7 +314,7 @@ public function getDescription() /** * Sets description. * - * @param null|string $description description of an API key for you and your team members + * @param null|string $description description of an API key to help you identify this API key * * @return self */ @@ -338,7 +338,7 @@ public function getIndexes() /** * Sets indexes. * - * @param null|string[] $indexes Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + * @param null|string[] $indexes Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". * * @return self */ @@ -362,7 +362,7 @@ public function getMaxHitsPerQuery() /** * Sets maxHitsPerQuery. * - * @param null|int $maxHitsPerQuery Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * @param null|int $maxHitsPerQuery Maximum number of results this API key can retrieve in one query. By default, there's no limit. * * @return self */ @@ -386,7 +386,7 @@ public function getMaxQueriesPerIPPerHour() /** * Sets maxQueriesPerIPPerHour. * - * @param null|int $maxQueriesPerIPPerHour Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + * @param null|int $maxQueriesPerIPPerHour Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. * * @return self */ @@ -410,7 +410,7 @@ public function getQueryParameters() /** * Sets queryParameters. * - * @param null|string $queryParameters Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + * @param null|string $queryParameters Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. * * @return self */ @@ -434,7 +434,7 @@ public function getReferers() /** * Sets referers. * - * @param null|string[] $referers Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + * @param null|string[] $referers Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). * * @return self */ @@ -458,7 +458,7 @@ public function getValidity() /** * Sets validity. * - * @param null|int $validity Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + * @param null|int $validity Duration (in seconds) after which the API key expires. By default, API keys don't expire. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsRequest.php b/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsRequest.php index 05307c49a7..daa7af0a33 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsRequest.php @@ -8,7 +8,7 @@ * GetObjectsRequest Class Doc Comment. * * @category Class - * @description Record retrieval operation. + * @description Request body for retrieving records. */ class GetObjectsRequest extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -211,7 +211,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID record's objectID + * @param string $objectID object ID for the record to retrieve * * @return self */ @@ -235,7 +235,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName name of the index containing the required records + * @param string $indexName index from which to retrieve the records * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsResponse.php index da6abb5e29..700004e5db 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/GetObjectsResponse.php @@ -167,7 +167,7 @@ public function getResults() /** * Sets results. * - * @param object[] $results retrieved results + * @param object[] $results retrieved records * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/HasPendingMappingsResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/HasPendingMappingsResponse.php index 37d825621a..027e5c687f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/HasPendingMappingsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/HasPendingMappingsResponse.php @@ -175,7 +175,7 @@ public function getPending() /** * Sets pending. * - * @param bool $pending indicates whether there are clusters undergoing migration, creation, or deletion + * @param bool $pending whether there are clusters undergoing migration, creation, or deletion * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/HighlightResult.php b/clients/algoliasearch-client-php/lib/Model/Search/HighlightResult.php index b219b9d3b0..9dd1842559 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/HighlightResult.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/HighlightResult.php @@ -197,7 +197,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ @@ -245,7 +245,7 @@ public function getMatchedWords() /** * Sets matchedWords. * - * @param string[] $matchedWords list of words from the query that matched the object + * @param string[] $matchedWords list of matched words from the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/HighlightResultOption.php b/clients/algoliasearch-client-php/lib/Model/Search/HighlightResultOption.php index ea47fb4e26..9e58711e40 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/HighlightResultOption.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/HighlightResultOption.php @@ -8,7 +8,7 @@ * HighlightResultOption Class Doc Comment. * * @category Class - * @description Show highlighted section and words matched on a query. + * @description Surround words that match the query with HTML tags for highlighting. */ class HighlightResultOption extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -198,7 +198,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ @@ -246,7 +246,7 @@ public function getMatchedWords() /** * Sets matchedWords. * - * @param string[] $matchedWords list of words from the query that matched the object + * @param string[] $matchedWords list of matched words from the search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Hit.php b/clients/algoliasearch-client-php/lib/Model/Search/Hit.php index e8a5ab8edb..cb10fd8b34 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Hit.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Hit.php @@ -8,7 +8,7 @@ * Hit Class Doc Comment. * * @category Class - * @description A single hit. + * @description Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. */ class Hit extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -200,7 +200,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique record identifier * * @return self */ @@ -224,7 +224,7 @@ public function getHighlightResult() /** * Sets highlightResult. * - * @param null|array $highlightResult show highlighted section and words matched on a query + * @param null|array $highlightResult surround words that match the query with HTML tags for highlighting * * @return self */ @@ -248,7 +248,7 @@ public function getSnippetResult() /** * Sets snippetResult. * - * @param null|array $snippetResult Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * @param null|array $snippetResult snippets that show the context around a matching search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/IgnorePlurals.php b/clients/algoliasearch-client-php/lib/Model/Search/IgnorePlurals.php index 8180d90525..219e3c4b89 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/IgnorePlurals.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/IgnorePlurals.php @@ -8,7 +8,7 @@ * IgnorePlurals Class Doc Comment. * * @category Class - * @description Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + * @description Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. */ class IgnorePlurals extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php b/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php index 9e6c96d203..00bd8bca47 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php @@ -8,7 +8,7 @@ * IndexSettings Class Doc Comment. * * @category Class - * @description Algolia index settings. + * @description Index settings. */ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -18,6 +18,7 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement * @var string[] */ protected static $modelTypes = [ + 'attributesForFaceting' => 'string[]', 'replicas' => 'string[]', 'paginationLimitedTo' => 'int', 'unretrievableAttributes' => 'string[]', @@ -34,7 +35,6 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'userData' => 'object', 'customNormalization' => 'array>', 'attributeForDistinct' => 'string', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -87,6 +87,7 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement * @var string[] */ protected static $modelFormats = [ + 'attributesForFaceting' => null, 'replicas' => null, 'paginationLimitedTo' => null, 'unretrievableAttributes' => null, @@ -103,7 +104,6 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'userData' => null, 'customNormalization' => null, 'attributeForDistinct' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -157,6 +157,7 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement * @var string[] */ protected static $attributeMap = [ + 'attributesForFaceting' => 'attributesForFaceting', 'replicas' => 'replicas', 'paginationLimitedTo' => 'paginationLimitedTo', 'unretrievableAttributes' => 'unretrievableAttributes', @@ -173,7 +174,6 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'userData' => 'userData', 'customNormalization' => 'customNormalization', 'attributeForDistinct' => 'attributeForDistinct', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -226,6 +226,7 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement * @var string[] */ protected static $setters = [ + 'attributesForFaceting' => 'setAttributesForFaceting', 'replicas' => 'setReplicas', 'paginationLimitedTo' => 'setPaginationLimitedTo', 'unretrievableAttributes' => 'setUnretrievableAttributes', @@ -242,7 +243,6 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'userData' => 'setUserData', 'customNormalization' => 'setCustomNormalization', 'attributeForDistinct' => 'setAttributeForDistinct', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -295,6 +295,7 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement * @var string[] */ protected static $getters = [ + 'attributesForFaceting' => 'getAttributesForFaceting', 'replicas' => 'getReplicas', 'paginationLimitedTo' => 'getPaginationLimitedTo', 'unretrievableAttributes' => 'getUnretrievableAttributes', @@ -311,7 +312,6 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'userData' => 'getUserData', 'customNormalization' => 'getCustomNormalization', 'attributeForDistinct' => 'getAttributeForDistinct', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -372,6 +372,9 @@ class IndexSettings extends \Algolia\AlgoliaSearch\Model\AbstractModel implement */ public function __construct(array $data = null) { + if (isset($data['attributesForFaceting'])) { + $this->container['attributesForFaceting'] = $data['attributesForFaceting']; + } if (isset($data['replicas'])) { $this->container['replicas'] = $data['replicas']; } @@ -420,9 +423,6 @@ public function __construct(array $data = null) if (isset($data['attributeForDistinct'])) { $this->container['attributeForDistinct'] = $data['attributeForDistinct']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -617,6 +617,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['paginationLimitedTo']) && ($this->container['paginationLimitedTo'] > 20000)) { + $invalidProperties[] = "invalid value for 'paginationLimitedTo', must be smaller than or equal to 20000."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -637,6 +641,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -651,6 +659,30 @@ public function valid() return 0 === count($this->listInvalidProperties()); } + /** + * Gets attributesForFaceting. + * + * @return null|string[] + */ + public function getAttributesForFaceting() + { + return $this->container['attributesForFaceting'] ?? null; + } + + /** + * Sets attributesForFaceting. + * + * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + * + * @return self + */ + public function setAttributesForFaceting($attributesForFaceting) + { + $this->container['attributesForFaceting'] = $attributesForFaceting; + + return $this; + } + /** * Gets replicas. * @@ -664,7 +696,7 @@ public function getReplicas() /** * Sets replicas. * - * @param null|string[] $replicas Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + * @param null|string[] $replicas Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). * * @return self */ @@ -688,12 +720,16 @@ public function getPaginationLimitedTo() /** * Sets paginationLimitedTo. * - * @param null|int $paginationLimitedTo maximum number of hits accessible through pagination + * @param null|int $paginationLimitedTo Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. * * @return self */ public function setPaginationLimitedTo($paginationLimitedTo) { + if (!is_null($paginationLimitedTo) && ($paginationLimitedTo > 20000)) { + throw new \InvalidArgumentException('invalid value for $paginationLimitedTo when calling IndexSettings., must be smaller than or equal to 20000.'); + } + $this->container['paginationLimitedTo'] = $paginationLimitedTo; return $this; @@ -712,7 +748,7 @@ public function getUnretrievableAttributes() /** * Sets unretrievableAttributes. * - * @param null|string[] $unretrievableAttributes attributes that can't be retrieved at query time + * @param null|string[] $unretrievableAttributes Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. * * @return self */ @@ -736,7 +772,7 @@ public function getDisableTypoToleranceOnWords() /** * Sets disableTypoToleranceOnWords. * - * @param null|string[] $disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnWords Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. * * @return self */ @@ -760,7 +796,7 @@ public function getAttributesToTransliterate() /** * Sets attributesToTransliterate. * - * @param null|string[] $attributesToTransliterate Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + * @param null|string[] $attributesToTransliterate Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. * * @return self */ @@ -784,7 +820,7 @@ public function getCamelCaseAttributes() /** * Sets camelCaseAttributes. * - * @param null|string[] $camelCaseAttributes Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * @param null|string[] $camelCaseAttributes Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. * * @return self */ @@ -808,7 +844,7 @@ public function getDecompoundedAttributes() /** * Sets decompoundedAttributes. * - * @param null|object $decompoundedAttributes Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + * @param null|object $decompoundedAttributes Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). * * @return self */ @@ -832,7 +868,7 @@ public function getIndexLanguages() /** * Sets indexLanguages. * - * @param null|string[] $indexLanguages Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string[] $indexLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -856,7 +892,7 @@ public function getDisablePrefixOnAttributes() /** * Sets disablePrefixOnAttributes. * - * @param null|string[] $disablePrefixOnAttributes Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + * @param null|string[] $disablePrefixOnAttributes Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). * * @return self */ @@ -880,7 +916,7 @@ public function getAllowCompressionOfIntegerArray() /** * Sets allowCompressionOfIntegerArray. * - * @param null|bool $allowCompressionOfIntegerArray Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + * @param null|bool $allowCompressionOfIntegerArray Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. * * @return self */ @@ -904,7 +940,7 @@ public function getNumericAttributesForFiltering() /** * Sets numericAttributesForFiltering. * - * @param null|string[] $numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * @param null|string[] $numericAttributesForFiltering Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. * * @return self */ @@ -928,7 +964,7 @@ public function getSeparatorsToIndex() /** * Sets separatorsToIndex. * - * @param null|string $separatorsToIndex Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * @param null|string $separatorsToIndex Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. * * @return self */ @@ -952,7 +988,7 @@ public function getSearchableAttributes() /** * Sets searchableAttributes. * - * @param null|string[] $searchableAttributes [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * @param null|string[] $searchableAttributes Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. * * @return self */ @@ -976,7 +1012,7 @@ public function getUserData() /** * Sets userData. * - * @param null|object $userData lets you store custom data in your indices + * @param null|object $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ @@ -1000,7 +1036,7 @@ public function getCustomNormalization() /** * Sets customNormalization. * - * @param null|array> $customNormalization A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|array> $customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * * @return self */ @@ -1024,7 +1060,7 @@ public function getAttributeForDistinct() /** * Sets attributeForDistinct. * - * @param null|string $attributeForDistinct Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * @param null|string $attributeForDistinct Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. * * @return self */ @@ -1035,30 +1071,6 @@ public function setAttributeForDistinct($attributeForDistinct) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1072,7 +1084,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1096,7 +1108,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1120,7 +1132,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1144,7 +1156,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1168,7 +1180,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1192,7 +1204,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1216,7 +1228,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1240,7 +1252,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1288,7 +1300,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1343,7 +1355,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1367,7 +1379,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1415,7 +1427,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -1439,7 +1451,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -1511,7 +1523,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -1535,7 +1547,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -1559,7 +1571,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -1583,7 +1595,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -1607,7 +1619,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -1727,7 +1739,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -1751,7 +1763,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -1775,7 +1787,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -1823,7 +1835,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -1847,7 +1859,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -1895,7 +1907,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -1919,7 +1931,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -1950,7 +1962,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -1974,7 +1986,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2008,6 +2020,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling IndexSettings., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2026,7 +2042,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2050,7 +2066,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2098,7 +2114,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/IndexSettingsAsSearchParams.php b/clients/algoliasearch-client-php/lib/Model/Search/IndexSettingsAsSearchParams.php index 136af35b37..0de946e443 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/IndexSettingsAsSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/IndexSettingsAsSearchParams.php @@ -17,7 +17,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $modelTypes = [ - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -70,7 +69,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $modelFormats = [ - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -124,7 +122,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $attributeMap = [ - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -177,7 +174,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $setters = [ - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -230,7 +226,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM * @var string[] */ protected static $getters = [ - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -291,9 +286,6 @@ class IndexSettingsAsSearchParams extends \Algolia\AlgoliaSearch\Model\AbstractM */ public function __construct(array $data = null) { - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -508,6 +500,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -522,30 +518,6 @@ public function valid() return 0 === count($this->listInvalidProperties()); } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -559,7 +531,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -583,7 +555,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -607,7 +579,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -631,7 +603,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -655,7 +627,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -679,7 +651,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -703,7 +675,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -727,7 +699,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -775,7 +747,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -830,7 +802,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -854,7 +826,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -902,7 +874,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -926,7 +898,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -998,7 +970,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -1022,7 +994,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -1046,7 +1018,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -1070,7 +1042,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -1094,7 +1066,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -1214,7 +1186,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -1238,7 +1210,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -1262,7 +1234,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -1310,7 +1282,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -1334,7 +1306,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -1382,7 +1354,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -1406,7 +1378,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -1437,7 +1409,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -1461,7 +1433,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -1495,6 +1467,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling IndexSettingsAsSearchParams., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -1513,7 +1489,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -1537,7 +1513,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -1585,7 +1561,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Log.php b/clients/algoliasearch-client-php/lib/Model/Search/Log.php index 176348667f..a63b0fd8bc 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Log.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Log.php @@ -45,8 +45,8 @@ class Log extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInt 'answerCode' => null, 'queryBody' => null, 'answer' => null, - 'url' => null, - 'ip' => null, + 'url' => 'uri', + 'ip' => 'ipv4', 'queryHeaders' => null, 'sha1' => null, 'nbApiCalls' => null, @@ -260,9 +260,17 @@ public function listInvalidProperties() if (!isset($this->container['queryBody']) || null === $this->container['queryBody']) { $invalidProperties[] = "'queryBody' can't be null"; } + if (mb_strlen($this->container['queryBody']) > 1000) { + $invalidProperties[] = "invalid value for 'queryBody', the character length must be smaller than or equal to 1000."; + } + if (!isset($this->container['answer']) || null === $this->container['answer']) { $invalidProperties[] = "'answer' can't be null"; } + if (mb_strlen($this->container['answer']) > 1000) { + $invalidProperties[] = "invalid value for 'answer', the character length must be smaller than or equal to 1000."; + } + if (!isset($this->container['url']) || null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } @@ -309,7 +317,7 @@ public function getTimestamp() /** * Sets timestamp. * - * @param string $timestamp Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + * @param string $timestamp timestamp of the API request in ISO 8601 format * * @return self */ @@ -333,7 +341,7 @@ public function getMethod() /** * Sets method. * - * @param string $method HTTP method of the performed request + * @param string $method HTTP method of the request * * @return self */ @@ -357,7 +365,7 @@ public function getAnswerCode() /** * Sets answerCode. * - * @param string $answerCode HTTP response code + * @param string $answerCode HTTP status code of the response * * @return self */ @@ -381,12 +389,16 @@ public function getQueryBody() /** * Sets queryBody. * - * @param string $queryBody Request body. Truncated after 1,000 characters. + * @param string $queryBody request body * * @return self */ public function setQueryBody($queryBody) { + if (mb_strlen($queryBody) > 1000) { + throw new \InvalidArgumentException('invalid length for $queryBody when calling Log., must be smaller than or equal to 1000.'); + } + $this->container['queryBody'] = $queryBody; return $this; @@ -405,12 +417,16 @@ public function getAnswer() /** * Sets answer. * - * @param string $answer Answer body. Truncated after 1,000 characters. + * @param string $answer response body * * @return self */ public function setAnswer($answer) { + if (mb_strlen($answer) > 1000) { + throw new \InvalidArgumentException('invalid length for $answer when calling Log., must be smaller than or equal to 1000.'); + } + $this->container['answer'] = $answer; return $this; @@ -429,7 +445,7 @@ public function getUrl() /** * Sets url. * - * @param string $url request URL + * @param string $url URL of the API endpoint * * @return self */ @@ -477,7 +493,7 @@ public function getQueryHeaders() /** * Sets queryHeaders. * - * @param string $queryHeaders request headers (API key is obfuscated) + * @param string $queryHeaders request headers (API keys are obfuscated) * * @return self */ @@ -525,7 +541,7 @@ public function getNbApiCalls() /** * Sets nbApiCalls. * - * @param string $nbApiCalls number of API calls + * @param string $nbApiCalls number of API requests * * @return self */ @@ -549,7 +565,7 @@ public function getProcessingTimeMs() /** * Sets processingTimeMs. * - * @param string $processingTimeMs Processing time for the query. Doesn't include network time. + * @param string $processingTimeMs Processing time for the query in milliseconds. This doesn't include latency due to the network. * * @return self */ @@ -621,7 +637,7 @@ public function getQueryNbHits() /** * Sets queryNbHits. * - * @param null|string $queryNbHits number of hits returned for the query + * @param null|string $queryNbHits number of search results (hits) returned for the query * * @return self */ @@ -645,7 +661,7 @@ public function getInnerQueries() /** * Sets innerQueries. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\LogQuery[] $innerQueries performed queries for the given request + * @param null|\Algolia\AlgoliaSearch\Model\Search\LogQuery[] $innerQueries queries performed for the given request * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/LogQuery.php b/clients/algoliasearch-client-php/lib/Model/Search/LogQuery.php index eb243e019e..8ec7544901 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/LogQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/LogQuery.php @@ -201,7 +201,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken user identifier + * @param null|string $userToken a user identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/MatchLevel.php b/clients/algoliasearch-client-php/lib/Model/Search/MatchLevel.php index 7c8eed623e..4d13907727 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/MatchLevel.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/MatchLevel.php @@ -8,7 +8,7 @@ * MatchLevel Class Doc Comment. * * @category Class - * @description Indicates how well the attribute matched the search query. + * @description Whether the whole query string matches or only a part. */ class MatchLevel { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Mode.php b/clients/algoliasearch-client-php/lib/Model/Search/Mode.php index b0cc1df94d..ac651692de 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Mode.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Mode.php @@ -8,7 +8,7 @@ * Mode Class Doc Comment. * * @category Class - * @description Search mode the index will use to query for results. + * @description Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. */ class Mode { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/MultipleBatchResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/MultipleBatchResponse.php index 736a855042..9659be68a4 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/MultipleBatchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/MultipleBatchResponse.php @@ -178,7 +178,7 @@ public function getTaskID() /** * Sets taskID. * - * @param array $taskID taskIDs per index + * @param array $taskID Task IDs. One for each index. * * @return self */ @@ -202,7 +202,7 @@ public function getObjectIDs() /** * Sets objectIDs. * - * @param string[] $objectIDs unique object (record) identifiers + * @param string[] $objectIDs unique record identifiers * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/NumericFilters.php b/clients/algoliasearch-client-php/lib/Model/Search/NumericFilters.php index 9fc30bef48..c6422057b2 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/NumericFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/NumericFilters.php @@ -8,7 +8,7 @@ * NumericFilters Class Doc Comment. * * @category Class - * @description [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + * @description Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. */ class NumericFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/OperationIndexParams.php b/clients/algoliasearch-client-php/lib/Model/Search/OperationIndexParams.php index 5f76c9963e..e1f7c77265 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/OperationIndexParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/OperationIndexParams.php @@ -210,7 +210,7 @@ public function getDestination() /** * Sets destination. * - * @param string $destination algolia index name + * @param string $destination index name * * @return self */ @@ -234,7 +234,7 @@ public function getScope() /** * Sets scope. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\ScopeType[] $scope **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + * @param null|\Algolia\AlgoliaSearch\Model\Search\ScopeType[] $scope **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/OperationType.php b/clients/algoliasearch-client-php/lib/Model/Search/OperationType.php index e8220316a2..879f006e68 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/OperationType.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/OperationType.php @@ -8,7 +8,7 @@ * OperationType Class Doc Comment. * * @category Class - * @description Operation to perform (_move_ or _copy_). + * @description Operation to perform on the index. */ class OperationType { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/OptionalFilters.php b/clients/algoliasearch-client-php/lib/Model/Search/OptionalFilters.php index f062672ebc..ff66c9a1c9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/OptionalFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/OptionalFilters.php @@ -8,7 +8,7 @@ * OptionalFilters Class Doc Comment. * * @category Class - * @description Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + * @description Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. */ class OptionalFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Params.php b/clients/algoliasearch-client-php/lib/Model/Search/Params.php index 2fd6373dae..a4df5cd2b0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Params.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Params.php @@ -8,7 +8,7 @@ * Params Class Doc Comment. * * @category Class - * @description Additional search parameters. + * @description Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. */ class Params extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Promote.php b/clients/algoliasearch-client-php/lib/Model/Search/Promote.php index 18186be329..84aba562e5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Promote.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Promote.php @@ -155,6 +155,10 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } + if (count($this->container['objectIDs']) > 100) { + $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 100."; + } + if (!isset($this->container['position']) || null === $this->container['position']) { $invalidProperties[] = "'position' can't be null"; } @@ -189,12 +193,15 @@ public function getObjectIDs() /** * Sets objectIDs. * - * @param string[] $objectIDs unique identifiers of the records to promote + * @param string[] $objectIDs Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. * * @return self */ public function setObjectIDs($objectIDs) { + if (count($objectIDs) > 100) { + throw new \InvalidArgumentException('invalid value for $objectIDs when calling Promote., number of items must be less than or equal to 100.'); + } $this->container['objectIDs'] = $objectIDs; return $this; @@ -213,7 +220,7 @@ public function getPosition() /** * Sets position. * - * @param int $position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param int $position position in the search results where you want to show the promoted records * * @return self */ @@ -237,7 +244,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique identifier of the record to promote + * @param string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectID.php b/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectID.php index b0c4477d78..85272aecfc 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectID.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectID.php @@ -179,7 +179,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique identifier of the record to promote + * @param string $objectID unique record identifier * * @return self */ @@ -203,7 +203,7 @@ public function getPosition() /** * Sets position. * - * @param int $position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param int $position position in the search results where you want to show the promoted records * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectIDs.php b/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectIDs.php index 501b940861..b13de85b54 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectIDs.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/PromoteObjectIDs.php @@ -148,6 +148,10 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } + if (count($this->container['objectIDs']) > 100) { + $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 100."; + } + if (!isset($this->container['position']) || null === $this->container['position']) { $invalidProperties[] = "'position' can't be null"; } @@ -179,12 +183,15 @@ public function getObjectIDs() /** * Sets objectIDs. * - * @param string[] $objectIDs unique identifiers of the records to promote + * @param string[] $objectIDs Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. * * @return self */ public function setObjectIDs($objectIDs) { + if (count($objectIDs) > 100) { + throw new \InvalidArgumentException('invalid value for $objectIDs when calling PromoteObjectIDs., number of items must be less than or equal to 100.'); + } $this->container['objectIDs'] = $objectIDs; return $this; @@ -203,7 +210,7 @@ public function getPosition() /** * Sets position. * - * @param int $position The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * @param int $position position in the search results where you want to show the promoted records * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/QueryType.php b/clients/algoliasearch-client-php/lib/Model/Search/QueryType.php index a6fc72193e..a38554ed95 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/QueryType.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/QueryType.php @@ -8,7 +8,7 @@ * QueryType Class Doc Comment. * * @category Class - * @description Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + * @description Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ class QueryType { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/RankingInfo.php b/clients/algoliasearch-client-php/lib/Model/Search/RankingInfo.php index fbff01cccc..7fa9fc77e7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/RankingInfo.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/RankingInfo.php @@ -8,6 +8,7 @@ * RankingInfo Class Doc Comment. * * @category Class + * @description Object with detailed information about the record's ranking. */ class RankingInfo extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -235,27 +236,58 @@ public function listInvalidProperties() if (!isset($this->container['filters']) || null === $this->container['filters']) { $invalidProperties[] = "'filters' can't be null"; } + if ($this->container['filters'] < 0) { + $invalidProperties[] = "invalid value for 'filters', must be bigger than or equal to 0."; + } + if (!isset($this->container['firstMatchedWord']) || null === $this->container['firstMatchedWord']) { $invalidProperties[] = "'firstMatchedWord' can't be null"; } + if ($this->container['firstMatchedWord'] < 0) { + $invalidProperties[] = "invalid value for 'firstMatchedWord', must be bigger than or equal to 0."; + } + if (!isset($this->container['geoDistance']) || null === $this->container['geoDistance']) { $invalidProperties[] = "'geoDistance' can't be null"; } + if ($this->container['geoDistance'] < 0) { + $invalidProperties[] = "invalid value for 'geoDistance', must be bigger than or equal to 0."; + } + + if (isset($this->container['geoPrecision']) && ($this->container['geoPrecision'] < 1)) { + $invalidProperties[] = "invalid value for 'geoPrecision', must be bigger than or equal to 1."; + } + if (!isset($this->container['nbExactWords']) || null === $this->container['nbExactWords']) { $invalidProperties[] = "'nbExactWords' can't be null"; } + if ($this->container['nbExactWords'] < 0) { + $invalidProperties[] = "invalid value for 'nbExactWords', must be bigger than or equal to 0."; + } + if (!isset($this->container['nbTypos']) || null === $this->container['nbTypos']) { $invalidProperties[] = "'nbTypos' can't be null"; } + if ($this->container['nbTypos'] < 0) { + $invalidProperties[] = "invalid value for 'nbTypos', must be bigger than or equal to 0."; + } + if (!isset($this->container['promoted']) || null === $this->container['promoted']) { $invalidProperties[] = "'promoted' can't be null"; } + if (isset($this->container['proximityDistance']) && ($this->container['proximityDistance'] < 0)) { + $invalidProperties[] = "invalid value for 'proximityDistance', must be bigger than or equal to 0."; + } + if (!isset($this->container['userScore']) || null === $this->container['userScore']) { $invalidProperties[] = "'userScore' can't be null"; } if (!isset($this->container['words']) || null === $this->container['words']) { $invalidProperties[] = "'words' can't be null"; } + if ($this->container['words'] < 1) { + $invalidProperties[] = "invalid value for 'words', must be bigger than or equal to 1."; + } return $invalidProperties; } @@ -284,12 +316,16 @@ public function getFilters() /** * Sets filters. * - * @param int $filters this field is reserved for advanced usage + * @param int $filters whether a filter matched the query * * @return self */ public function setFilters($filters) { + if ($filters < 0) { + throw new \InvalidArgumentException('invalid value for $filters when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['filters'] = $filters; return $this; @@ -308,12 +344,16 @@ public function getFirstMatchedWord() /** * Sets firstMatchedWord. * - * @param int $firstMatchedWord position of the most important matched attribute in the attributes to index list + * @param int $firstMatchedWord position of the first matched word in the best matching attribute of the record * * @return self */ public function setFirstMatchedWord($firstMatchedWord) { + if ($firstMatchedWord < 0) { + throw new \InvalidArgumentException('invalid value for $firstMatchedWord when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['firstMatchedWord'] = $firstMatchedWord; return $this; @@ -338,6 +378,10 @@ public function getGeoDistance() */ public function setGeoDistance($geoDistance) { + if ($geoDistance < 0) { + throw new \InvalidArgumentException('invalid value for $geoDistance when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['geoDistance'] = $geoDistance; return $this; @@ -362,6 +406,10 @@ public function getGeoPrecision() */ public function setGeoPrecision($geoPrecision) { + if (!is_null($geoPrecision) && ($geoPrecision < 1)) { + throw new \InvalidArgumentException('invalid value for $geoPrecision when calling RankingInfo., must be bigger than or equal to 1.'); + } + $this->container['geoPrecision'] = $geoPrecision; return $this; @@ -434,6 +482,10 @@ public function getNbExactWords() */ public function setNbExactWords($nbExactWords) { + if ($nbExactWords < 0) { + throw new \InvalidArgumentException('invalid value for $nbExactWords when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['nbExactWords'] = $nbExactWords; return $this; @@ -458,6 +510,10 @@ public function getNbTypos() */ public function setNbTypos($nbTypos) { + if ($nbTypos < 0) { + throw new \InvalidArgumentException('invalid value for $nbTypos when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['nbTypos'] = $nbTypos; return $this; @@ -476,7 +532,7 @@ public function getPromoted() /** * Sets promoted. * - * @param bool $promoted present and set to true if a Rule promoted the hit + * @param bool $promoted whether the record was promoted by a rule * * @return self */ @@ -500,12 +556,16 @@ public function getProximityDistance() /** * Sets proximityDistance. * - * @param null|int $proximityDistance when the query contains more than one word, the sum of the distances between matched words (in meters) + * @param null|int $proximityDistance Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. * * @return self */ public function setProximityDistance($proximityDistance) { + if (!is_null($proximityDistance) && ($proximityDistance < 0)) { + throw new \InvalidArgumentException('invalid value for $proximityDistance when calling RankingInfo., must be bigger than or equal to 0.'); + } + $this->container['proximityDistance'] = $proximityDistance; return $this; @@ -524,7 +584,7 @@ public function getUserScore() /** * Sets userScore. * - * @param int $userScore custom ranking for the object, expressed as a single integer value + * @param int $userScore Overall ranking of the record, expressed as a single integer. This attribute is internal. * * @return self */ @@ -548,12 +608,16 @@ public function getWords() /** * Sets words. * - * @param int $words number of matched words, including prefixes and typos + * @param int $words number of matched words * * @return self */ public function setWords($words) { + if ($words < 1) { + throw new \InvalidArgumentException('invalid value for $words when calling RankingInfo., must be bigger than or equal to 1.'); + } + $this->container['words'] = $words; return $this; @@ -572,7 +636,7 @@ public function getPromotedByReRanking() /** * Sets promotedByReRanking. * - * @param null|bool $promotedByReRanking wether the record are promoted by the re-ranking strategy + * @param null|bool $promotedByReRanking whether the record is re-ranked * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ReRankingApplyFilter.php b/clients/algoliasearch-client-php/lib/Model/Search/ReRankingApplyFilter.php index 91af103a5e..4bcc912bb7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ReRankingApplyFilter.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ReRankingApplyFilter.php @@ -8,7 +8,7 @@ * ReRankingApplyFilter Class Doc Comment. * * @category Class - * @description When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + * @description Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. */ class ReRankingApplyFilter extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/RemoveStopWords.php b/clients/algoliasearch-client-php/lib/Model/Search/RemoveStopWords.php index ed51416310..9b7ac0d39c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/RemoveStopWords.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/RemoveStopWords.php @@ -8,7 +8,7 @@ * RemoveStopWords Class Doc Comment. * * @category Class - * @description Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + * @description Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. */ class RemoveStopWords extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/RemoveWordsIfNoResults.php b/clients/algoliasearch-client-php/lib/Model/Search/RemoveWordsIfNoResults.php index 7ec261b9bd..d45c0125d8 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/RemoveWordsIfNoResults.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/RemoveWordsIfNoResults.php @@ -8,7 +8,7 @@ * RemoveWordsIfNoResults Class Doc Comment. * * @category Class - * @description Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. + * @description Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn't return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ class RemoveWordsIfNoResults { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/RenderingContent.php b/clients/algoliasearch-client-php/lib/Model/Search/RenderingContent.php index 3138d8107f..85ee134179 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/RenderingContent.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/RenderingContent.php @@ -8,7 +8,7 @@ * RenderingContent Class Doc Comment. * * @category Class - * @description Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + * @description Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. */ class RenderingContent extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Rule.php b/clients/algoliasearch-client-php/lib/Model/Search/Rule.php index f87f1fcf7e..1cd617d63a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Rule.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Rule.php @@ -180,6 +180,13 @@ public function listInvalidProperties() if (!isset($this->container['objectID']) || null === $this->container['objectID']) { $invalidProperties[] = "'objectID' can't be null"; } + if (isset($this->container['conditions']) && (count($this->container['conditions']) > 25)) { + $invalidProperties[] = "invalid value for 'conditions', number of items must be less than or equal to 25."; + } + + if (isset($this->container['conditions']) && (count($this->container['conditions']) < 0)) { + $invalidProperties[] = "invalid value for 'conditions', number of items must be greater than or equal to 0."; + } return $invalidProperties; } @@ -208,7 +215,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique identifier for a rule object + * @param string $objectID unique identifier of a rule object * * @return self */ @@ -232,12 +239,18 @@ public function getConditions() /** * Sets conditions. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\Condition[] $conditions [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + * @param null|\Algolia\AlgoliaSearch\Model\Search\Condition[] $conditions Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). * * @return self */ public function setConditions($conditions) { + if (!is_null($conditions) && (count($conditions) > 25)) { + throw new \InvalidArgumentException('invalid value for $conditions when calling Rule., number of items must be less than or equal to 25.'); + } + if (!is_null($conditions) && (count($conditions) < 0)) { + throw new \InvalidArgumentException('invalid length for $conditions when calling Rule., number of items must be greater than or equal to 0.'); + } $this->container['conditions'] = $conditions; return $this; @@ -280,7 +293,7 @@ public function getDescription() /** * Sets description. * - * @param null|string $description Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + * @param null|string $description description of the rule's purpose to help you distinguish between different rules * * @return self */ @@ -304,7 +317,7 @@ public function getEnabled() /** * Sets enabled. * - * @param null|bool $enabled Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + * @param null|bool $enabled whether the rule is active * * @return self */ @@ -328,7 +341,7 @@ public function getValidity() /** * Sets validity. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\TimeRange[] $validity If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + * @param null|\Algolia\AlgoliaSearch\Model\Search\TimeRange[] $validity time periods when the rule is active * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SaveObjectResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SaveObjectResponse.php index b213334caf..e6472f4142 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SaveObjectResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SaveObjectResponse.php @@ -186,7 +186,7 @@ public function getCreatedAt() /** * Sets createdAt. * - * @param string $createdAt date of creation (ISO-8601 format) + * @param string $createdAt timestamp when the record was added, in ISO 8601 format * * @return self */ @@ -210,7 +210,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ @@ -234,7 +234,7 @@ public function getObjectID() /** * Sets objectID. * - * @param null|string $objectID unique object identifier + * @param null|string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SaveSynonymResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SaveSynonymResponse.php index e0e964d238..ba811c35f1 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SaveSynonymResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SaveSynonymResponse.php @@ -189,7 +189,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesParams.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesParams.php index 2fd98e7d7b..4785b0292b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesParams.php @@ -8,7 +8,7 @@ * SearchDictionaryEntriesParams Class Doc Comment. * * @category Class - * @description `searchDictionaryEntries` parameters. + * @description Search parameter. */ class SearchDictionaryEntriesParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -164,6 +164,10 @@ public function listInvalidProperties() if (!isset($this->container['query']) || null === $this->container['query']) { $invalidProperties[] = "'query' can't be null"; } + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -199,7 +203,7 @@ public function getQuery() /** * Sets query. * - * @param string $query text to search for in an index + * @param string $query search query * * @return self */ @@ -223,12 +227,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchDictionaryEntriesParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -278,7 +286,7 @@ public function getLanguage() /** * Sets language. * - * @param null|string $language [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * @param null|string $language ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesResponse.php new file mode 100644 index 0000000000..9da86468bc --- /dev/null +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchDictionaryEntriesResponse.php @@ -0,0 +1,342 @@ + '\Algolia\AlgoliaSearch\Model\Search\DictionaryEntry[]', + 'page' => 'int', + 'nbHits' => 'int', + 'nbPages' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'hits' => null, + 'page' => null, + 'nbHits' => null, + 'nbPages' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'hits' => 'hits', + 'page' => 'page', + 'nbHits' => 'nbHits', + 'nbPages' => 'nbPages', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'hits' => 'setHits', + 'page' => 'setPage', + 'nbHits' => 'setNbHits', + 'nbPages' => 'setNbPages', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'hits' => 'getHits', + 'page' => 'getPage', + 'nbHits' => 'getNbHits', + 'nbPages' => 'getNbPages', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(array $data = null) + { + if (isset($data['hits'])) { + $this->container['hits'] = $data['hits']; + } + if (isset($data['page'])) { + $this->container['page'] = $data['page']; + } + if (isset($data['nbHits'])) { + $this->container['nbHits'] = $data['nbHits']; + } + if (isset($data['nbPages'])) { + $this->container['nbPages'] = $data['nbPages']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!isset($this->container['hits']) || null === $this->container['hits']) { + $invalidProperties[] = "'hits' can't be null"; + } + if (!isset($this->container['page']) || null === $this->container['page']) { + $invalidProperties[] = "'page' can't be null"; + } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + + if (!isset($this->container['nbHits']) || null === $this->container['nbHits']) { + $invalidProperties[] = "'nbHits' can't be null"; + } + if (!isset($this->container['nbPages']) || null === $this->container['nbPages']) { + $invalidProperties[] = "'nbPages' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets hits. + * + * @return \Algolia\AlgoliaSearch\Model\Search\DictionaryEntry[] + */ + public function getHits() + { + return $this->container['hits'] ?? null; + } + + /** + * Sets hits. + * + * @param \Algolia\AlgoliaSearch\Model\Search\DictionaryEntry[] $hits dictionary entries matching the search criteria + * + * @return self + */ + public function setHits($hits) + { + $this->container['hits'] = $hits; + + return $this; + } + + /** + * Gets page. + * + * @return int + */ + public function getPage() + { + return $this->container['page'] ?? null; + } + + /** + * Sets page. + * + * @param int $page requested page of the API response + * + * @return self + */ + public function setPage($page) + { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchDictionaryEntriesResponse., must be bigger than or equal to 0.'); + } + + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets nbHits. + * + * @return int + */ + public function getNbHits() + { + return $this->container['nbHits'] ?? null; + } + + /** + * Sets nbHits. + * + * @param int $nbHits number of results (hits) + * + * @return self + */ + public function setNbHits($nbHits) + { + $this->container['nbHits'] = $nbHits; + + return $this; + } + + /** + * Gets nbPages. + * + * @return int + */ + public function getNbPages() + { + return $this->container['nbPages'] ?? null; + } + + /** + * Sets nbPages. + * + * @param int $nbPages number of pages of results + * + * @return self + */ + public function setNbPages($nbPages) + { + $this->container['nbPages'] = $nbPages; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } +} diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesRequest.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesRequest.php index 124d2ffc82..d5d3b52a98 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesRequest.php @@ -231,7 +231,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesResponse.php index 0510597eda..41158326c3 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetValuesResponse.php @@ -186,7 +186,7 @@ public function getFacetHits() /** * Sets facetHits. * - * @param \Algolia\AlgoliaSearch\Model\Search\FacetHits[] $facetHits facetHits + * @param \Algolia\AlgoliaSearch\Model\Search\FacetHits[] $facetHits matching facet values * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php index f8d5b12414..8528397e43 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php @@ -44,14 +44,12 @@ class SearchForFacets extends \Algolia\AlgoliaSearch\Model\AbstractModel impleme 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -135,14 +133,12 @@ class SearchForFacets extends \Algolia\AlgoliaSearch\Model\AbstractModel impleme 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -227,14 +223,12 @@ class SearchForFacets extends \Algolia\AlgoliaSearch\Model\AbstractModel impleme 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -318,14 +312,12 @@ class SearchForFacets extends \Algolia\AlgoliaSearch\Model\AbstractModel impleme 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -409,14 +401,12 @@ class SearchForFacets extends \Algolia\AlgoliaSearch\Model\AbstractModel impleme 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -562,9 +552,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -583,9 +570,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -792,6 +776,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -804,6 +792,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -824,6 +820,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + if (!isset($this->container['facet']) || null === $this->container['facet']) { $invalidProperties[] = "'facet' can't be null"; } @@ -885,7 +885,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -909,7 +909,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -933,7 +933,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -1053,7 +1053,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1077,7 +1077,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1101,7 +1101,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1125,7 +1125,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1149,12 +1149,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchForFacets., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1173,7 +1177,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1197,7 +1201,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1228,7 +1232,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1252,7 +1256,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1324,7 +1328,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1352,7 +1356,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1376,7 +1380,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1400,7 +1404,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1424,7 +1428,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1448,12 +1452,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForFacets., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForFacets., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1472,7 +1483,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1496,7 +1507,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1507,30 +1518,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1544,7 +1531,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1568,7 +1555,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1592,7 +1579,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1640,7 +1627,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1664,7 +1651,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1675,30 +1662,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1712,7 +1675,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1736,7 +1699,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1760,7 +1723,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1784,7 +1747,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1808,7 +1771,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1832,7 +1795,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1856,7 +1819,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1880,7 +1843,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1928,7 +1891,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1983,7 +1946,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -2007,7 +1970,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -2055,7 +2018,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2079,7 +2042,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2151,7 +2114,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2175,7 +2138,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2199,7 +2162,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2223,7 +2186,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2247,7 +2210,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2367,7 +2330,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2391,7 +2354,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2415,7 +2378,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2463,7 +2426,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2487,7 +2450,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2535,7 +2498,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2559,7 +2522,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2590,7 +2553,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2614,7 +2577,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2648,6 +2611,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchForFacets., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2666,7 +2633,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2690,7 +2657,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2738,7 +2705,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ @@ -2810,7 +2777,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetsOptions.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetsOptions.php index 660b42d844..402234a8ee 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetsOptions.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacetsOptions.php @@ -233,7 +233,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ @@ -281,7 +281,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php index f79ad88508..1493929c88 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php @@ -44,14 +44,12 @@ class SearchForHits extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -133,14 +131,12 @@ class SearchForHits extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -223,14 +219,12 @@ class SearchForHits extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -312,14 +306,12 @@ class SearchForHits extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -401,14 +393,12 @@ class SearchForHits extends \Algolia\AlgoliaSearch\Model\AbstractModel implement 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -552,9 +542,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -573,9 +560,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -776,6 +760,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -788,6 +776,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -808,6 +804,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + if (!isset($this->container['indexName']) || null === $this->container['indexName']) { $invalidProperties[] = "'indexName' can't be null"; } @@ -863,7 +863,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -887,7 +887,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -911,7 +911,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -1031,7 +1031,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1055,7 +1055,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1079,7 +1079,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1103,7 +1103,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1127,12 +1127,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchForHits., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1151,7 +1155,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1175,7 +1179,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1206,7 +1210,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1230,7 +1234,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1302,7 +1306,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1330,7 +1334,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1354,7 +1358,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1378,7 +1382,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1402,7 +1406,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1426,12 +1430,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForHits., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForHits., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1450,7 +1461,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1474,7 +1485,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1485,30 +1496,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1522,7 +1509,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1546,7 +1533,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1570,7 +1557,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1618,7 +1605,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1642,7 +1629,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1653,30 +1640,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1690,7 +1653,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1714,7 +1677,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1738,7 +1701,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1762,7 +1725,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1786,7 +1749,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1810,7 +1773,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1834,7 +1797,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1858,7 +1821,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1906,7 +1869,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1961,7 +1924,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1985,7 +1948,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -2033,7 +1996,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2057,7 +2020,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2129,7 +2092,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2153,7 +2116,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2177,7 +2140,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2201,7 +2164,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2225,7 +2188,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2345,7 +2308,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2369,7 +2332,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2393,7 +2356,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2441,7 +2404,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2465,7 +2428,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2513,7 +2476,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2537,7 +2500,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2568,7 +2531,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2592,7 +2555,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2626,6 +2589,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchForHits., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2644,7 +2611,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2668,7 +2635,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2716,7 +2683,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ @@ -2764,7 +2731,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForHitsOptions.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForHitsOptions.php index 56e1f68683..83f1e5325a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForHitsOptions.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForHitsOptions.php @@ -175,7 +175,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchHits.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchHits.php index 17f20938b2..36d36ea241 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchHits.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchHits.php @@ -189,7 +189,7 @@ public function getHits() /** * Sets hits. * - * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits hits + * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. * * @return self */ @@ -213,7 +213,7 @@ public function getQuery() /** * Sets query. * - * @param string $query text to search for in an index + * @param string $query search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php index 72f8e05d7c..d4c779f435 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php @@ -44,14 +44,12 @@ class SearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -131,14 +129,12 @@ class SearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -219,14 +215,12 @@ class SearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -306,14 +300,12 @@ class SearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -393,14 +385,12 @@ class SearchParams extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -542,9 +532,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -563,9 +550,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -760,6 +744,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -772,6 +760,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -792,6 +788,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -843,7 +843,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -867,7 +867,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -891,7 +891,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -1011,7 +1011,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1035,7 +1035,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1059,7 +1059,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1083,7 +1083,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1107,12 +1107,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1131,7 +1135,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1155,7 +1159,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1186,7 +1190,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1210,7 +1214,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1282,7 +1286,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1310,7 +1314,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1334,7 +1338,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1358,7 +1362,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1382,7 +1386,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1406,12 +1410,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParams., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParams., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1430,7 +1441,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1454,7 +1465,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1465,30 +1476,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1502,7 +1489,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1526,7 +1513,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1550,7 +1537,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1598,7 +1585,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1622,7 +1609,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1633,30 +1620,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1670,7 +1633,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1694,7 +1657,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1718,7 +1681,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1742,7 +1705,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1766,7 +1729,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1790,7 +1753,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1814,7 +1777,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1838,7 +1801,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1886,7 +1849,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1941,7 +1904,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1965,7 +1928,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -2013,7 +1976,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2037,7 +2000,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2109,7 +2072,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2133,7 +2096,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2157,7 +2120,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2181,7 +2144,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2205,7 +2168,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2325,7 +2288,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2349,7 +2312,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2373,7 +2336,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2421,7 +2384,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2445,7 +2408,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2493,7 +2456,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2517,7 +2480,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2548,7 +2511,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2572,7 +2535,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2606,6 +2569,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchParams., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2624,7 +2591,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2648,7 +2615,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2696,7 +2663,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php index 4ad581ddc2..3ba4aa1124 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php @@ -43,14 +43,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -129,14 +127,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -216,14 +212,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -302,14 +296,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -388,14 +380,12 @@ class SearchParamsObject extends \Algolia\AlgoliaSearch\Model\AbstractModel impl 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -534,9 +524,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -555,9 +542,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -752,6 +736,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -764,6 +752,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -784,6 +780,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + return $invalidProperties; } @@ -811,7 +811,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -835,7 +835,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -859,7 +859,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -979,7 +979,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1003,7 +1003,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1027,7 +1027,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1051,7 +1051,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1075,12 +1075,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchParamsObject., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1099,7 +1103,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1123,7 +1127,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1154,7 +1158,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1178,7 +1182,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1250,7 +1254,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1278,7 +1282,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1302,7 +1306,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1326,7 +1330,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1350,7 +1354,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1374,12 +1378,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParamsObject., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParamsObject., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1398,7 +1409,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1422,7 +1433,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1433,30 +1444,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1470,7 +1457,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1494,7 +1481,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1518,7 +1505,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1566,7 +1553,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1590,7 +1577,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1601,30 +1588,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1638,7 +1601,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1662,7 +1625,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1686,7 +1649,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1710,7 +1673,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1734,7 +1697,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1758,7 +1721,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1782,7 +1745,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1806,7 +1769,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1854,7 +1817,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1909,7 +1872,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1933,7 +1896,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -1981,7 +1944,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2005,7 +1968,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2077,7 +2040,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2101,7 +2064,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2125,7 +2088,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2149,7 +2112,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2173,7 +2136,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2293,7 +2256,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2317,7 +2280,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2341,7 +2304,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2389,7 +2352,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2413,7 +2376,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2461,7 +2424,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2485,7 +2448,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2516,7 +2479,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2540,7 +2503,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2574,6 +2537,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchParamsObject., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2592,7 +2559,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2616,7 +2583,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2664,7 +2631,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsQuery.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsQuery.php index e19a965ff8..432fcbbbfb 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsQuery.php @@ -161,7 +161,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php index 0d80d8e7f1..dd891fea3a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php @@ -44,14 +44,12 @@ class SearchQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'int', 'userToken' => 'string', 'getRankingInfo' => 'bool', - 'explain' => 'string[]', 'synonyms' => 'bool', 'clickAnalytics' => 'bool', 'analytics' => 'bool', 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'attributesForFaceting' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'customRanking' => 'string[]', @@ -135,14 +133,12 @@ class SearchQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => null, 'userToken' => null, 'getRankingInfo' => null, - 'explain' => null, 'synonyms' => null, 'clickAnalytics' => null, 'analytics' => null, 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'attributesForFaceting' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'customRanking' => null, @@ -227,14 +223,12 @@ class SearchQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'personalizationImpact', 'userToken' => 'userToken', 'getRankingInfo' => 'getRankingInfo', - 'explain' => 'explain', 'synonyms' => 'synonyms', 'clickAnalytics' => 'clickAnalytics', 'analytics' => 'analytics', 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'attributesForFaceting' => 'attributesForFaceting', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'customRanking' => 'customRanking', @@ -318,14 +312,12 @@ class SearchQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'setPersonalizationImpact', 'userToken' => 'setUserToken', 'getRankingInfo' => 'setGetRankingInfo', - 'explain' => 'setExplain', 'synonyms' => 'setSynonyms', 'clickAnalytics' => 'setClickAnalytics', 'analytics' => 'setAnalytics', 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'attributesForFaceting' => 'setAttributesForFaceting', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'customRanking' => 'setCustomRanking', @@ -409,14 +401,12 @@ class SearchQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements 'personalizationImpact' => 'getPersonalizationImpact', 'userToken' => 'getUserToken', 'getRankingInfo' => 'getGetRankingInfo', - 'explain' => 'getExplain', 'synonyms' => 'getSynonyms', 'clickAnalytics' => 'getClickAnalytics', 'analytics' => 'getAnalytics', 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'attributesForFaceting' => 'getAttributesForFaceting', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'customRanking' => 'getCustomRanking', @@ -562,9 +552,6 @@ public function __construct(array $data = null) if (isset($data['getRankingInfo'])) { $this->container['getRankingInfo'] = $data['getRankingInfo']; } - if (isset($data['explain'])) { - $this->container['explain'] = $data['explain']; - } if (isset($data['synonyms'])) { $this->container['synonyms'] = $data['synonyms']; } @@ -583,9 +570,6 @@ public function __construct(array $data = null) if (isset($data['enableABTest'])) { $this->container['enableABTest'] = $data['enableABTest']; } - if (isset($data['attributesForFaceting'])) { - $this->container['attributesForFaceting'] = $data['attributesForFaceting']; - } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -792,6 +776,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['length']) && ($this->container['length'] > 1000)) { $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; } @@ -804,6 +792,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; } + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; + } + + if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { + $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -824,6 +820,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; } + if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { + $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; + } + if (!isset($this->container['indexName']) || null === $this->container['indexName']) { $invalidProperties[] = "'indexName' can't be null"; } @@ -885,7 +885,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -909,7 +909,7 @@ public function getSimilarQuery() /** * Sets similarQuery. * - * @param null|string $similarQuery overrides the query parameter and performs a more generic search + * @param null|string $similarQuery Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. * * @return self */ @@ -933,7 +933,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + * @param null|string $filters Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * * @return self */ @@ -1053,7 +1053,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores. * - * @param null|bool $sumOrFiltersScores Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + * @param null|bool $sumOrFiltersScores Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). * * @return self */ @@ -1077,7 +1077,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes. * - * @param null|string[] $restrictSearchableAttributes Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * @param null|string[] $restrictSearchableAttributes restricts a search to a subset of your searchable attributes * * @return self */ @@ -1101,7 +1101,7 @@ public function getFacets() /** * Sets facets. * - * @param null|string[] $facets Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + * @param null|string[] $facets Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * * @return self */ @@ -1125,7 +1125,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct. * - * @param null|bool $facetingAfterDistinct Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + * @param null|bool $facetingAfterDistinct Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. * * @return self */ @@ -1149,12 +1149,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchQuery., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1173,7 +1177,7 @@ public function getOffset() /** * Sets offset. * - * @param null|int $offset Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $offset position of the first hit to retrieve * * @return self */ @@ -1197,7 +1201,7 @@ public function getLength() /** * Sets length. * - * @param null|int $length Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * @param null|int $length number of hits to retrieve (used in combination with `offset`) * * @return self */ @@ -1228,7 +1232,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng. * - * @param null|string $aroundLatLng Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + * @param null|string $aroundLatLng Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. * * @return self */ @@ -1252,7 +1256,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP. * - * @param null|bool $aroundLatLngViaIP Search for entries around a location. The location is automatically computed from the requester's IP address. + * @param null|bool $aroundLatLngViaIP whether to obtain the coordinates from the request's IP address * * @return self */ @@ -1324,7 +1328,7 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius. * - * @param null|int $minimumAroundRadius minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set + * @param null|int $minimumAroundRadius minimum radius (in meters) for a search around a location when `aroundRadius` isn't set * * @return self */ @@ -1352,7 +1356,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox. * - * @param null|float[][] $insideBoundingBox Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insideBoundingBox Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * * @return self */ @@ -1376,7 +1380,7 @@ public function getInsidePolygon() /** * Sets insidePolygon. * - * @param null|float[][] $insidePolygon Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + * @param null|float[][] $insidePolygon Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. * * @return self */ @@ -1400,7 +1404,7 @@ public function getNaturalLanguages() /** * Sets naturalLanguages. * - * @param null|string[] $naturalLanguages Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + * @param null|string[] $naturalLanguages ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. * * @return self */ @@ -1424,7 +1428,7 @@ public function getRuleContexts() /** * Sets ruleContexts. * - * @param null|string[] $ruleContexts Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + * @param null|string[] $ruleContexts Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. * * @return self */ @@ -1448,12 +1452,19 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact. * - * @param null|int $personalizationImpact Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * @param null|int $personalizationImpact Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * * @return self */ public function setPersonalizationImpact($personalizationImpact) { + if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchQuery., must be smaller than or equal to 100.'); + } + if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { + throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchQuery., must be bigger than or equal to 0.'); + } + $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1472,7 +1483,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + * @param null|string $userToken Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * * @return self */ @@ -1496,7 +1507,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo. * - * @param null|bool $getRankingInfo Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + * @param null|bool $getRankingInfo whether the search response should include detailed ranking information * * @return self */ @@ -1507,30 +1518,6 @@ public function setGetRankingInfo($getRankingInfo) return $this; } - /** - * Gets explain. - * - * @return null|string[] - */ - public function getExplain() - { - return $this->container['explain'] ?? null; - } - - /** - * Sets explain. - * - * @param null|string[] $explain enriches the API's response with information about how the query was processed - * - * @return self - */ - public function setExplain($explain) - { - $this->container['explain'] = $explain; - - return $this; - } - /** * Gets synonyms. * @@ -1544,7 +1531,7 @@ public function getSynonyms() /** * Sets synonyms. * - * @param null|bool $synonyms whether to take into account an index's synonyms for a particular search + * @param null|bool $synonyms whether to take into account an index's synonyms for this search * * @return self */ @@ -1568,7 +1555,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics. * - * @param null|bool $clickAnalytics Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * @param null|bool $clickAnalytics Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). * * @return self */ @@ -1592,7 +1579,7 @@ public function getAnalytics() /** * Sets analytics. * - * @param null|bool $analytics Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * @param null|bool $analytics whether this search will be included in Analytics * * @return self */ @@ -1640,7 +1627,7 @@ public function getPercentileComputation() /** * Sets percentileComputation. * - * @param null|bool $percentileComputation whether to include or exclude a query from the processing-time percentile computation + * @param null|bool $percentileComputation whether to include this search when calculating processing-time percentiles * * @return self */ @@ -1664,7 +1651,7 @@ public function getEnableABTest() /** * Sets enableABTest. * - * @param null|bool $enableABTest incidates whether this search will be considered in A/B testing + * @param null|bool $enableABTest whether to enable A/B testing for this search * * @return self */ @@ -1675,30 +1662,6 @@ public function setEnableABTest($enableABTest) return $this; } - /** - * Gets attributesForFaceting. - * - * @return null|string[] - */ - public function getAttributesForFaceting() - { - return $this->container['attributesForFaceting'] ?? null; - } - - /** - * Sets attributesForFaceting. - * - * @param null|string[] $attributesForFaceting Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return self - */ - public function setAttributesForFaceting($attributesForFaceting) - { - $this->container['attributesForFaceting'] = $attributesForFaceting; - - return $this; - } - /** * Gets attributesToRetrieve. * @@ -1712,7 +1675,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve. * - * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + * @param null|string[] $attributesToRetrieve Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * * @return self */ @@ -1736,7 +1699,7 @@ public function getRanking() /** * Sets ranking. * - * @param null|string[] $ranking Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * @param null|string[] $ranking Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * * @return self */ @@ -1760,7 +1723,7 @@ public function getCustomRanking() /** * Sets customRanking. * - * @param null|string[] $customRanking Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + * @param null|string[] $customRanking Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. * * @return self */ @@ -1784,7 +1747,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness. * - * @param null|int $relevancyStrictness relevancy threshold below which less relevant results aren't included in the results + * @param null|int $relevancyStrictness Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. * * @return self */ @@ -1808,7 +1771,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight. * - * @param null|string[] $attributesToHighlight Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + * @param null|string[] $attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * * @return self */ @@ -1832,7 +1795,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet. * - * @param null|string[] $attributesToSnippet Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + * @param null|string[] $attributesToSnippet Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. * * @return self */ @@ -1856,7 +1819,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag. * - * @param null|string $highlightPreTag HTML string to insert before the highlighted parts in all highlight and snippet results + * @param null|string $highlightPreTag HTML tag to insert before the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1880,7 +1843,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag. * - * @param null|string $highlightPostTag HTML string to insert after the highlighted parts in all highlight and snippet results + * @param null|string $highlightPostTag HTML tag to insert after the highlighted parts in all highlighted results and snippets * * @return self */ @@ -1928,7 +1891,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays. * - * @param null|bool $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query + * @param null|bool $restrictHighlightAndSnippetArrays Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. * * @return self */ @@ -1983,7 +1946,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo. * - * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor1Typo Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -2007,7 +1970,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos. * - * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + * @param null|int $minWordSizefor2Typos Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * * @return self */ @@ -2055,7 +2018,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens. * - * @param null|bool $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string + * @param null|bool $allowTyposOnNumericTokens Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. * * @return self */ @@ -2079,7 +2042,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes. * - * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * @param null|string[] $disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. * * @return self */ @@ -2151,7 +2114,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters. * - * @param null|string $keepDiacriticsOnCharacters Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * @param null|string $keepDiacriticsOnCharacters Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. * * @return self */ @@ -2175,7 +2138,7 @@ public function getQueryLanguages() /** * Sets queryLanguages. * - * @param null|string[] $queryLanguages Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + * @param null|string[] $queryLanguages [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * * @return self */ @@ -2199,7 +2162,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery. * - * @param null|bool $decompoundQuery [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + * @param null|bool $decompoundQuery Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * * @return self */ @@ -2223,7 +2186,7 @@ public function getEnableRules() /** * Sets enableRules. * - * @param null|bool $enableRules Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * @param null|bool $enableRules whether to enable rules * * @return self */ @@ -2247,7 +2210,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization. * - * @param null|bool $enablePersonalization Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + * @param null|bool $enablePersonalization whether to enable Personalization * * @return self */ @@ -2367,7 +2330,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax. * - * @param null|bool $advancedSyntax Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * @param null|bool $advancedSyntax Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. * * @return self */ @@ -2391,7 +2354,7 @@ public function getOptionalWords() /** * Sets optionalWords. * - * @param null|string[] $optionalWords Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + * @param null|string[] $optionalWords Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * * @return self */ @@ -2415,7 +2378,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes. * - * @param null|string[] $disableExactOnAttributes Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|string[] $disableExactOnAttributes Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. * * @return self */ @@ -2463,7 +2426,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * @param null|\Algolia\AlgoliaSearch\Model\Search\AlternativesAsExact[] $alternativesAsExact Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. * * @return self */ @@ -2487,7 +2450,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures. * - * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled + * @param null|\Algolia\AlgoliaSearch\Model\Search\AdvancedSyntaxFeatures[] $advancedSyntaxFeatures Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. * * @return self */ @@ -2535,7 +2498,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight. * - * @param null|bool $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself + * @param null|bool $replaceSynonymsInHighlight Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * * @return self */ @@ -2559,7 +2522,7 @@ public function getMinProximity() /** * Sets minProximity. * - * @param null|int $minProximity Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * @param null|int $minProximity Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. * * @return self */ @@ -2590,7 +2553,7 @@ public function getResponseFields() /** * Sets responseFields. * - * @param null|string[] $responseFields attributes to include in the API response for search and browse queries + * @param null|string[] $responseFields Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. * * @return self */ @@ -2614,7 +2577,7 @@ public function getMaxFacetHits() /** * Sets maxFacetHits. * - * @param null|int $maxFacetHits Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + * @param null|int $maxFacetHits Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * * @return self */ @@ -2648,6 +2611,10 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { + if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { + throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchQuery., must be smaller than or equal to 1000.'); + } + $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; @@ -2666,7 +2633,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy. * - * @param null|string $sortFacetValuesBy controls how facet values are fetched + * @param null|string $sortFacetValuesBy Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * * @return self */ @@ -2690,7 +2657,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity. * - * @param null|bool $attributeCriteriaComputedByMinProximity When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + * @param null|bool $attributeCriteriaComputedByMinProximity Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. * * @return self */ @@ -2738,7 +2705,7 @@ public function getEnableReRanking() /** * Sets enableReRanking. * - * @param null|bool $enableReRanking Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * @param null|bool $enableReRanking Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * * @return self */ @@ -2786,7 +2753,7 @@ public function getIndexName() /** * Sets indexName. * - * @param string $indexName algolia index name + * @param string $indexName index name * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchResponse.php index 93e70ce460..ee1d4ad2f1 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchResponse.php @@ -404,6 +404,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } @@ -524,7 +528,7 @@ public function getAutomaticRadius() /** * Sets automaticRadius. * - * @param null|string $automaticRadius automatically-computed radius + * @param null|string $automaticRadius distance from a central coordinate provided by `aroundLatLng` * * @return self */ @@ -656,7 +660,7 @@ public function getFacets() /** * Sets facets. * - * @param null|array> $facets mapping of each facet name to the corresponding facet counts + * @param null|array> $facets facet counts * * @return self */ @@ -807,7 +811,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -831,7 +835,7 @@ public function getNbPages() /** * Sets nbPages. * - * @param int $nbPages number of pages of results for the current query + * @param int $nbPages number of pages of results * * @return self */ @@ -879,12 +883,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchResponse., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1095,7 +1103,7 @@ public function getUserData() /** * Sets userData. * - * @param null|object $userData lets you store custom data in your indices + * @param null|object $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ @@ -1143,7 +1151,7 @@ public function getHits() /** * Sets hits. * - * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits hits + * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. * * @return self */ @@ -1167,7 +1175,7 @@ public function getQuery() /** * Sets query. * - * @param string $query text to search for in an index + * @param string $query search query * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchResult.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchResult.php index 73211d28b6..a4af9db96a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchResult.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchResult.php @@ -415,6 +415,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } @@ -538,7 +542,7 @@ public function getAutomaticRadius() /** * Sets automaticRadius. * - * @param null|string $automaticRadius automatically-computed radius + * @param null|string $automaticRadius distance from a central coordinate provided by `aroundLatLng` * * @return self */ @@ -670,7 +674,7 @@ public function getFacets() /** * Sets facets. * - * @param null|array> $facets mapping of each facet name to the corresponding facet counts + * @param null|array> $facets facet counts * * @return self */ @@ -821,7 +825,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -845,7 +849,7 @@ public function getNbPages() /** * Sets nbPages. * - * @param int $nbPages number of pages of results for the current query + * @param int $nbPages number of pages of results * * @return self */ @@ -893,12 +897,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchResult., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; @@ -1109,7 +1117,7 @@ public function getUserData() /** * Sets userData. * - * @param null|object $userData lets you store custom data in your indices + * @param null|object $userData An object with custom data. You can store up to 32 kB as custom data. * * @return self */ @@ -1157,7 +1165,7 @@ public function getHits() /** * Sets hits. * - * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits hits + * @param \Algolia\AlgoliaSearch\Model\Search\Hit[] $hits Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. * * @return self */ @@ -1181,7 +1189,7 @@ public function getQuery() /** * Sets query. * - * @param string $query text to search for in an index + * @param string $query search query * * @return self */ @@ -1229,7 +1237,7 @@ public function getFacetHits() /** * Sets facetHits. * - * @param \Algolia\AlgoliaSearch\Model\Search\FacetHits[] $facetHits facetHits + * @param \Algolia\AlgoliaSearch\Model\Search\FacetHits[] $facetHits matching facet values * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesParams.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesParams.php index b28ff8c656..f751560d26 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesParams.php @@ -24,7 +24,6 @@ class SearchRulesParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'page' => 'int', 'hitsPerPage' => 'int', 'enabled' => 'bool', - 'requestOptions' => 'object[]', ]; /** @@ -39,7 +38,6 @@ class SearchRulesParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'page' => null, 'hitsPerPage' => null, 'enabled' => null, - 'requestOptions' => null, ]; /** @@ -55,7 +53,6 @@ class SearchRulesParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'page' => 'page', 'hitsPerPage' => 'hitsPerPage', 'enabled' => 'enabled', - 'requestOptions' => 'requestOptions', ]; /** @@ -70,7 +67,6 @@ class SearchRulesParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'page' => 'setPage', 'hitsPerPage' => 'setHitsPerPage', 'enabled' => 'setEnabled', - 'requestOptions' => 'setRequestOptions', ]; /** @@ -85,7 +81,6 @@ class SearchRulesParams extends \Algolia\AlgoliaSearch\Model\AbstractModel imple 'page' => 'getPage', 'hitsPerPage' => 'getHitsPerPage', 'enabled' => 'getEnabled', - 'requestOptions' => 'getRequestOptions', ]; /** @@ -120,9 +115,6 @@ public function __construct(array $data = null) if (isset($data['enabled'])) { $this->container['enabled'] = $data['enabled']; } - if (isset($data['requestOptions'])) { - $this->container['requestOptions'] = $data['requestOptions']; - } } /** @@ -224,7 +216,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query rule object query + * @param null|string $query search query for rules * * @return self */ @@ -272,7 +264,7 @@ public function getContext() /** * Sets context. * - * @param null|string $context Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + * @param null|string $context only return rules that match the context (exact match) * * @return self */ @@ -296,7 +288,7 @@ public function getPage() /** * Sets page. * - * @param null|int $page requested page (the first page is page 0) + * @param null|int $page requested page of the API response * * @return self */ @@ -355,7 +347,7 @@ public function getEnabled() /** * Sets enabled. * - * @param null|bool $enabled Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + * @param null|bool $enabled If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. * * @return self */ @@ -366,30 +358,6 @@ public function setEnabled($enabled) return $this; } - /** - * Gets requestOptions. - * - * @return null|object[] - */ - public function getRequestOptions() - { - return $this->container['requestOptions'] ?? null; - } - - /** - * Sets requestOptions. - * - * @param null|object[] $requestOptions request options to send with the API call - * - * @return self - */ - public function setRequestOptions($requestOptions) - { - $this->container['requestOptions'] = $requestOptions; - - return $this; - } - /** * Returns true if offset exists. False otherwise. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesResponse.php index cd1d1ef860..a84de428c0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchRulesResponse.php @@ -200,7 +200,7 @@ public function getHits() /** * Sets hits. * - * @param \Algolia\AlgoliaSearch\Model\Search\Rule[] $hits fetched rules + * @param \Algolia\AlgoliaSearch\Model\Search\Rule[] $hits rules that matched the search criteria * * @return self */ @@ -224,7 +224,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of fetched rules + * @param int $nbHits number of rules that matched the search criteria * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchStrategy.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchStrategy.php index 3ca6f23902..be350bf4e6 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchStrategy.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchStrategy.php @@ -8,7 +8,7 @@ * SearchStrategy Class Doc Comment. * * @category Class - * @description - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. + * @description Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. */ class SearchStrategy { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsParams.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsParams.php index 3e89050609..76779d8010 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsParams.php @@ -160,6 +160,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -195,7 +199,7 @@ public function getQuery() /** * Sets query. * - * @param null|string $query text to search for in an index + * @param null|string $query search query * * @return self */ @@ -243,12 +247,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchSynonymsParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsResponse.php index 1bf442d751..dfb4f5a6f8 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchSynonymsResponse.php @@ -178,7 +178,7 @@ public function getHits() /** * Sets hits. * - * @param \Algolia\AlgoliaSearch\Model\Search\SynonymHit[] $hits synonym objects + * @param \Algolia\AlgoliaSearch\Model\Search\SynonymHit[] $hits matching synonyms * * @return self */ @@ -202,7 +202,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsParams.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsParams.php index 6c2b2c5641..47a2473297 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsParams.php @@ -164,6 +164,10 @@ public function listInvalidProperties() if (!isset($this->container['query']) || null === $this->container['query']) { $invalidProperties[] = "'query' can't be null"; } + if (isset($this->container['page']) && ($this->container['page'] < 0)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; } @@ -247,12 +251,16 @@ public function getPage() /** * Sets page. * - * @param null|int $page page to retrieve (the first page is `0`, not `1`) + * @param null|int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if (!is_null($page) && ($page < 0)) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchUserIdsParams., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsResponse.php index 6f58e9107a..add798eaee 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchUserIdsResponse.php @@ -178,6 +178,10 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } + if ($this->container['page'] < 0) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; + } + if (!isset($this->container['hitsPerPage']) || null === $this->container['hitsPerPage']) { $invalidProperties[] = "'hitsPerPage' can't be null"; } @@ -244,7 +248,7 @@ public function getNbHits() /** * Sets nbHits. * - * @param int $nbHits number of hits the search query matched + * @param int $nbHits number of results (hits) * * @return self */ @@ -268,12 +272,16 @@ public function getPage() /** * Sets page. * - * @param int $page page to retrieve (the first page is `0`, not `1`) + * @param int $page page of search results to retrieve * * @return self */ public function setPage($page) { + if ($page < 0) { + throw new \InvalidArgumentException('invalid value for $page when calling SearchUserIdsResponse., must be bigger than or equal to 0.'); + } + $this->container['page'] = $page; return $this; diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SecuredAPIKeyRestrictions.php b/clients/algoliasearch-client-php/lib/Model/Search/SecuredAPIKeyRestrictions.php index 367becf4fb..20b7853c2d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SecuredAPIKeyRestrictions.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SecuredAPIKeyRestrictions.php @@ -225,7 +225,7 @@ public function getFilters() /** * Sets filters. * - * @param null|string $filters Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + * @param null|string $filters Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. * * @return self */ @@ -249,7 +249,7 @@ public function getValidUntil() /** * Sets validUntil. * - * @param null|int $validUntil unix timestamp used to set the expiration date of the API key + * @param null|int $validUntil Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. * * @return self */ @@ -273,7 +273,7 @@ public function getRestrictIndices() /** * Sets restrictIndices. * - * @param null|string[] $restrictIndices index names that can be queried + * @param null|string[] $restrictIndices Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". * * @return self */ @@ -297,7 +297,7 @@ public function getRestrictSources() /** * Sets restrictSources. * - * @param null|string $restrictSources IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + * @param null|string $restrictSources IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. * * @return self */ @@ -321,7 +321,7 @@ public function getUserToken() /** * Sets userToken. * - * @param null|string $userToken Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + * @param null|string $userToken Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SemanticSearch.php b/clients/algoliasearch-client-php/lib/Model/Search/SemanticSearch.php index c23dbe130d..a72cf6dcc3 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SemanticSearch.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SemanticSearch.php @@ -8,7 +8,7 @@ * SemanticSearch Class Doc Comment. * * @category Class - * @description Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + * @description Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. */ class SemanticSearch extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -162,7 +162,7 @@ public function getEventSources() /** * Sets eventSources. * - * @param null|string[] $eventSources Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + * @param null|string[] $eventSources Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SnippetResult.php b/clients/algoliasearch-client-php/lib/Model/Search/SnippetResult.php index 309150cc26..bdb160c63f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SnippetResult.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SnippetResult.php @@ -178,7 +178,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SnippetResultOption.php b/clients/algoliasearch-client-php/lib/Model/Search/SnippetResultOption.php index 0e8b114fe2..76683adb2e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SnippetResultOption.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SnippetResultOption.php @@ -8,7 +8,7 @@ * SnippetResultOption Class Doc Comment. * * @category Class - * @description Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * @description Snippets that show the context around a matching search query. */ class SnippetResultOption extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { @@ -179,7 +179,7 @@ public function getValue() /** * Sets value. * - * @param string $value markup text with `facetQuery` matches highlighted + * @param string $value highlighted attribute value, including HTML tags * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SortRemainingBy.php b/clients/algoliasearch-client-php/lib/Model/Search/SortRemainingBy.php index b9ebc05cf1..3488238c0e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SortRemainingBy.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SortRemainingBy.php @@ -8,7 +8,7 @@ * SortRemainingBy Class Doc Comment. * * @category Class - * @description How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + * @description Order of facet values that aren't explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don't show facet values that aren't explicitly positioned.</dd> </dl>. */ class SortRemainingBy { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/TagFilters.php b/clients/algoliasearch-client-php/lib/Model/Search/TagFilters.php index 3c2b02dab3..249ce77a4d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/TagFilters.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/TagFilters.php @@ -8,7 +8,7 @@ * TagFilters Class Doc Comment. * * @category Class - * @description [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + * @description Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. */ class TagFilters extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/TaskStatus.php b/clients/algoliasearch-client-php/lib/Model/Search/TaskStatus.php index 9192b7995a..342f9ead03 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/TaskStatus.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/TaskStatus.php @@ -8,7 +8,7 @@ * TaskStatus Class Doc Comment. * * @category Class - * @description _published_ if the task has been processed, _notPublished_ otherwise. + * @description Task status, `published` if the task is completed, `notPublished` otherwise. */ class TaskStatus { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/TimeRange.php b/clients/algoliasearch-client-php/lib/Model/Search/TimeRange.php index 9c0e9a344e..a1f5afb97c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/TimeRange.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/TimeRange.php @@ -178,7 +178,7 @@ public function getFrom() /** * Sets from. * - * @param int $from lower bound of the time range (Unix timestamp) + * @param int $from when the rule should start to be active, in Unix epoch time * * @return self */ @@ -202,7 +202,7 @@ public function getUntil() /** * Sets until. * - * @param int $until upper bound of the time range (Unix timestamp) + * @param int $until when the rule should stop to be active, in Unix epoch time * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/TypoTolerance.php b/clients/algoliasearch-client-php/lib/Model/Search/TypoTolerance.php index 161071394a..7b01e2c815 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/TypoTolerance.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/TypoTolerance.php @@ -8,7 +8,7 @@ * TypoTolerance Class Doc Comment. * * @category Class - * @description Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + * @description Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. */ class TypoTolerance extends \Algolia\AlgoliaSearch\Model\AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/TypoToleranceEnum.php b/clients/algoliasearch-client-php/lib/Model/Search/TypoToleranceEnum.php index b6e0a14b2e..3e595e5487 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/TypoToleranceEnum.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/TypoToleranceEnum.php @@ -8,6 +8,7 @@ * TypoToleranceEnum Class Doc Comment. * * @category Class + * @description - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. */ class TypoToleranceEnum { diff --git a/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtResponse.php index 553140df25..d8acbea77a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtResponse.php @@ -179,7 +179,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtWithObjectIdResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtWithObjectIdResponse.php index f9f3552d33..4b778b241e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtWithObjectIdResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtWithObjectIdResponse.php @@ -178,7 +178,7 @@ public function getTaskID() /** * Sets taskID. * - * @param null|int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param null|int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ @@ -226,7 +226,7 @@ public function getObjectID() /** * Sets objectID. * - * @param null|string $objectID unique object identifier + * @param null|string $objectID unique record identifier * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/UpdatedRuleResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/UpdatedRuleResponse.php index 999e9e2080..15b291b8bd 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/UpdatedRuleResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/UpdatedRuleResponse.php @@ -189,7 +189,7 @@ public function getObjectID() /** * Sets objectID. * - * @param string $objectID unique object identifier + * @param string $objectID unique identifier of a rule object * * @return self */ @@ -237,7 +237,7 @@ public function getTaskID() /** * Sets taskID. * - * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + * @param int $taskID Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/UserHit.php b/clients/algoliasearch-client-php/lib/Model/Search/UserHit.php index 274c7672c6..ab436c62bc 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/UserHit.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/UserHit.php @@ -226,7 +226,7 @@ public function getUserID() /** * Sets userID. * - * @param string $userID userID of the user + * @param string $userID user ID * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/UserId.php b/clients/algoliasearch-client-php/lib/Model/Search/UserId.php index 915300ca41..83a2b2b567 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/UserId.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/UserId.php @@ -205,7 +205,7 @@ public function getUserID() /** * Sets userID. * - * @param string $userID userID of the user + * @param string $userID user ID * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/Value.php b/clients/algoliasearch-client-php/lib/Model/Search/Value.php index d12c9ba7bb..552f0b0dfc 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/Value.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Value.php @@ -169,7 +169,7 @@ public function getOrder() /** * Sets order. * - * @param null|string[] $order pinned order of facet lists + * @param null|string[] $order Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. * * @return self */ diff --git a/clients/algoliasearch-client-python/algoliasearch/abtesting/client.py b/clients/algoliasearch-client-python/algoliasearch/abtesting/client.py index 68e251d513..dd0d94949f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/abtesting/client.py +++ b/clients/algoliasearch-client-python/algoliasearch/abtesting/client.py @@ -600,14 +600,11 @@ async def get_ab_test( async def list_ab_tests_with_http_info( self, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, index_prefix: Annotated[ Optional[StrictStr], @@ -629,9 +626,9 @@ async def list_ab_tests_with_http_info( Required API Key ACLs: - analytics - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int :param index_prefix: Only return A/B tests for indices starting with this prefix. :type index_prefix: str @@ -665,14 +662,11 @@ async def list_ab_tests_with_http_info( async def list_ab_tests( self, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, index_prefix: Annotated[ Optional[StrictStr], @@ -694,9 +688,9 @@ async def list_ab_tests( Required API Key ACLs: - analytics - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int :param index_prefix: Only return A/B tests for indices starting with this prefix. :type index_prefix: str diff --git a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/ab_test_response.py b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/ab_test_response.py index 3dc4453d13..4fc0dac4b7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/ab_test_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/ab_test_response.py @@ -19,7 +19,7 @@ class ABTestResponse(BaseModel): index: StrictStr = Field(description="A/B test index.") ab_test_id: StrictInt = Field(description="Unique A/B test ID.", alias="abTestID") task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/client.py b/clients/algoliasearch-client-python/algoliasearch/analytics/client.py index f2eebc702d..a409971284 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/client.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/client.py @@ -486,18 +486,14 @@ async def custom_put( async def get_average_click_position_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -513,11 +509,11 @@ async def get_average_click_position_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -553,18 +549,14 @@ async def get_average_click_position_with_http_info( async def get_average_click_position( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -580,11 +572,11 @@ async def get_average_click_position( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -599,18 +591,14 @@ async def get_average_click_position( async def get_click_positions_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -626,11 +614,11 @@ async def get_click_positions_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -666,18 +654,14 @@ async def get_click_positions_with_http_info( async def get_click_positions( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -693,11 +677,11 @@ async def get_click_positions( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -712,18 +696,14 @@ async def get_click_positions( async def get_click_through_rate_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -739,11 +719,11 @@ async def get_click_through_rate_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -779,18 +759,14 @@ async def get_click_through_rate_with_http_info( async def get_click_through_rate( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -806,11 +782,11 @@ async def get_click_through_rate( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -825,18 +801,14 @@ async def get_click_through_rate( async def get_conversation_rate_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -852,11 +824,11 @@ async def get_conversation_rate_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -892,18 +864,14 @@ async def get_conversation_rate_with_http_info( async def get_conversation_rate( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -919,11 +887,11 @@ async def get_conversation_rate( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -938,18 +906,14 @@ async def get_conversation_rate( async def get_no_click_rate_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -965,11 +929,11 @@ async def get_no_click_rate_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1005,18 +969,14 @@ async def get_no_click_rate_with_http_info( async def get_no_click_rate( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1032,11 +992,11 @@ async def get_no_click_rate( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1051,18 +1011,14 @@ async def get_no_click_rate( async def get_no_results_rate_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1078,11 +1034,11 @@ async def get_no_results_rate_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1118,18 +1074,14 @@ async def get_no_results_rate_with_http_info( async def get_no_results_rate( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1145,11 +1097,11 @@ async def get_no_results_rate( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1164,18 +1116,14 @@ async def get_no_results_rate( async def get_searches_count_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1191,11 +1139,11 @@ async def get_searches_count_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1231,18 +1179,14 @@ async def get_searches_count_with_http_info( async def get_searches_count( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1258,11 +1202,11 @@ async def get_searches_count( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1277,28 +1221,21 @@ async def get_searches_count( async def get_searches_no_clicks_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1314,15 +1251,15 @@ async def get_searches_no_clicks_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1362,28 +1299,21 @@ async def get_searches_no_clicks_with_http_info( async def get_searches_no_clicks( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1399,15 +1329,15 @@ async def get_searches_no_clicks( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1422,28 +1352,21 @@ async def get_searches_no_clicks( async def get_searches_no_results_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1459,15 +1382,15 @@ async def get_searches_no_results_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1507,28 +1430,21 @@ async def get_searches_no_results_with_http_info( async def get_searches_no_results( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1544,15 +1460,15 @@ async def get_searches_no_results( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1567,7 +1483,7 @@ async def get_searches_no_results( async def get_status_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ @@ -1576,7 +1492,7 @@ async def get_status_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -1602,7 +1518,7 @@ async def get_status_with_http_info( async def get_status( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> GetStatusResponse: """ @@ -1611,7 +1527,7 @@ async def get_status( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'GetStatusResponse' result object. @@ -1622,28 +1538,21 @@ async def get_status( async def get_top_countries_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1659,15 +1568,15 @@ async def get_top_countries_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1707,28 +1616,21 @@ async def get_top_countries_with_http_info( async def get_top_countries( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1744,15 +1646,15 @@ async def get_top_countries( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1767,29 +1669,22 @@ async def get_top_countries( async def get_top_filter_attributes_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1805,17 +1700,17 @@ async def get_top_filter_attributes_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1857,29 +1752,22 @@ async def get_top_filter_attributes_with_http_info( async def get_top_filter_attributes( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1895,17 +1783,17 @@ async def get_top_filter_attributes( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -1928,29 +1816,22 @@ async def get_top_filter_attributes( async def get_top_filter_for_attribute_with_http_info( self, attribute: Annotated[StrictStr, Field(description="Attribute name.")], - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -1968,17 +1849,17 @@ async def get_top_filter_for_attribute_with_http_info( :param attribute: Attribute name. (required) :type attribute: str - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2028,29 +1909,22 @@ async def get_top_filter_for_attribute_with_http_info( async def get_top_filter_for_attribute( self, attribute: Annotated[StrictStr, Field(description="Attribute name.")], - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2068,17 +1942,17 @@ async def get_top_filter_for_attribute( :param attribute: Attribute name. (required) :type attribute: str - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2101,29 +1975,22 @@ async def get_top_filter_for_attribute( async def get_top_filters_no_results_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2139,17 +2006,17 @@ async def get_top_filters_no_results_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2191,29 +2058,22 @@ async def get_top_filters_no_results_with_http_info( async def get_top_filters_no_results( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2229,17 +2089,17 @@ async def get_top_filters_no_results( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2261,7 +2121,7 @@ async def get_top_filters_no_results( async def get_top_hits_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, click_analytics: Annotated[ Optional[StrictBool], @@ -2270,26 +2130,19 @@ async def get_top_hits_with_http_info( ), ] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2305,19 +2158,19 @@ async def get_top_hits_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str :param click_analytics: Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. :type click_analytics: bool - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2361,7 +2214,7 @@ async def get_top_hits_with_http_info( async def get_top_hits( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], search: Annotated[Optional[StrictStr], Field(description="User query.")] = None, click_analytics: Annotated[ Optional[StrictBool], @@ -2370,26 +2223,19 @@ async def get_top_hits( ), ] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2405,19 +2251,19 @@ async def get_top_hits( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param search: User query. :type search: str :param click_analytics: Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. :type click_analytics: bool - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2440,7 +2286,7 @@ async def get_top_hits( async def get_top_searches_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], click_analytics: Annotated[ Optional[StrictBool], Field( @@ -2448,16 +2294,12 @@ async def get_top_searches_with_http_info( ), ] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, order_by: Annotated[ Optional[OrderBy], Field(description="Reorder the results.") @@ -2469,14 +2311,11 @@ async def get_top_searches_with_http_info( ), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2492,21 +2331,21 @@ async def get_top_searches_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param click_analytics: Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. :type click_analytics: bool - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param order_by: Reorder the results. :type order_by: OrderBy :param direction: Sorting direction of the results: ascending or descending. :type direction: Direction - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2552,7 +2391,7 @@ async def get_top_searches_with_http_info( async def get_top_searches( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], click_analytics: Annotated[ Optional[StrictBool], Field( @@ -2560,16 +2399,12 @@ async def get_top_searches( ), ] = None, start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, order_by: Annotated[ Optional[OrderBy], Field(description="Reorder the results.") @@ -2581,14 +2416,11 @@ async def get_top_searches( ), ] = None, limit: Annotated[ - Optional[StrictInt], - Field(description="Number of records to return (page size)."), + Optional[StrictInt], Field(description="Number of items to return.") ] = None, offset: Annotated[ - Optional[StrictInt], - Field( - description="Position of the starting record. Used for paging. 0 is the first record." - ), + Optional[Annotated[int, Field(strict=True, ge=0)]], + Field(description="Position of the first item to return."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2604,21 +2436,21 @@ async def get_top_searches( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str :param click_analytics: Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. :type click_analytics: bool - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param order_by: Reorder the results. :type order_by: OrderBy :param direction: Sorting direction of the results: ascending or descending. :type direction: Direction - :param limit: Number of records to return (page size). + :param limit: Number of items to return. :type limit: int - :param offset: Position of the starting record. Used for paging. 0 is the first record. + :param offset: Position of the first item to return. :type offset: int :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2642,18 +2474,14 @@ async def get_top_searches( async def get_users_count_with_http_info( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2669,11 +2497,11 @@ async def get_users_count_with_http_info( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str @@ -2709,18 +2537,14 @@ async def get_users_count_with_http_info( async def get_users_count( self, - index: Annotated[StrictStr, Field(description="Index name to target.")], + index: Annotated[StrictStr, Field(description="Index name.")], start_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="Start date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="Start date (`YYYY-MM-DD`) of the period to analyze."), ] = None, end_date: Annotated[ - Optional[Annotated[str, Field(strict=True)]], - Field( - description="End date (a string in the format `YYYY-MM-DD`) of the period to analyze." - ), + Optional[str], + Field(description="End date (`YYYY-MM-DD`) of the period to analyze."), ] = None, tags: Annotated[ Optional[StrictStr], @@ -2736,11 +2560,11 @@ async def get_users_count( Required API Key ACLs: - analytics - :param index: Index name to target. (required) + :param index: Index name. (required) :type index: str - :param start_date: Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param start_date: Start date (`YYYY-MM-DD`) of the period to analyze. :type start_date: str - :param end_date: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + :param end_date: End date (`YYYY-MM-DD`) of the period to analyze. :type end_date: str :param tags: Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. :type tags: str diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/models/search_no_result_event.py b/clients/algoliasearch-client-python/algoliasearch/analytics/models/search_no_result_event.py index 51799cf760..f54ba75271 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/models/search_no_result_event.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/models/search_no_result_event.py @@ -18,9 +18,7 @@ class SearchNoResultEvent(BaseModel): search: StrictStr = Field(description="User query.") count: StrictInt = Field(description="Number of occurrences.") - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search.py b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search.py index 3d5028fc2e..23a1e31d13 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search.py @@ -20,9 +20,7 @@ class TopSearch(BaseModel): count: StrictInt = Field( description="Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`)." ) - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py index 84f6244d6c..dea3e9112f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py @@ -45,9 +45,7 @@ class TopSearchWithAnalytics(BaseModel): conversion_count: StrictInt = Field( description="Number of converted clicks.", alias="conversionCount" ) - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/client.py b/clients/algoliasearch-client-python/algoliasearch/recommend/client.py index c54808ee74..5df980add2 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/client.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/client.py @@ -454,7 +454,8 @@ async def custom_put( async def delete_recommend_rule_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -462,9 +463,7 @@ async def delete_recommend_rule_with_http_info( description="[Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). " ), ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") - ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ @@ -473,11 +472,11 @@ async def delete_recommend_rule_with_http_info( Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -514,7 +513,8 @@ async def delete_recommend_rule_with_http_info( async def delete_recommend_rule( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -522,9 +522,7 @@ async def delete_recommend_rule( description="[Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). " ), ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") - ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> DeletedAtResponse: """ @@ -533,11 +531,11 @@ async def delete_recommend_rule( Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'DeletedAtResponse' result object. @@ -551,7 +549,8 @@ async def delete_recommend_rule( async def get_recommend_rule_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -559,9 +558,7 @@ async def get_recommend_rule_with_http_info( description="[Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). " ), ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") - ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ @@ -570,11 +567,11 @@ async def get_recommend_rule_with_http_info( Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -611,7 +608,8 @@ async def get_recommend_rule_with_http_info( async def get_recommend_rule( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -619,9 +617,7 @@ async def get_recommend_rule( description="[Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). " ), ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") - ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> RuleResponse: """ @@ -630,11 +626,11 @@ async def get_recommend_rule( Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'RuleResponse' result object. @@ -648,7 +644,8 @@ async def get_recommend_rule( async def get_recommend_status_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -670,7 +667,7 @@ async def get_recommend_status_with_http_info( Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels @@ -711,7 +708,8 @@ async def get_recommend_status_with_http_info( async def get_recommend_status( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -733,7 +731,7 @@ async def get_recommend_status( Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels @@ -809,7 +807,8 @@ async def get_recommendations( async def search_recommend_rules_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -826,7 +825,7 @@ async def search_recommend_rules_with_http_info( Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels @@ -865,7 +864,8 @@ async def search_recommend_rules_with_http_info( async def search_recommend_rules( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], model: Annotated[ RecommendModels, @@ -882,7 +882,7 @@ async def search_recommend_rules( Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param model: [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) :type model: RecommendModels diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/anchoring.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/anchoring.py index 5f15164e88..1e81a7a7b2 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/anchoring.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/anchoring.py @@ -12,7 +12,7 @@ class Anchoring(str, Enum): """ - Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py index d78e5a1c7b..bc81aadba7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py @@ -17,14 +17,14 @@ class AroundPrecision(BaseModel): """ - Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. """ - oneof_schema_1_validator: Optional[StrictInt] = 10 - oneof_schema_2_validator: Optional[List[AroundPrecisionFromValueInner]] = Field( - default=None, - description="Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/).", + oneof_schema_1_validator: Optional[StrictInt] = Field( + default=10, + description="Distance in meters to group results by similar distances. For example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance, as are records between 100 and 199 meters. ", ) + oneof_schema_2_validator: Optional[List[AroundPrecisionFromValueInner]] = None actual_instance: Optional[Union[List[AroundPrecisionFromValueInner], int]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision_from_value_inner.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision_from_value_inner.py index a82b1dee81..e9048fc295 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision_from_value_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision_from_value_inner.py @@ -13,11 +13,18 @@ class AroundPrecisionFromValueInner(BaseModel): """ - AroundPrecisionFromValueInner + Range object with lower and upper values in meters to define custom ranges. """ - var_from: Optional[StrictInt] = Field(default=None, alias="from") - value: Optional[StrictInt] = None + var_from: Optional[StrictInt] = Field( + default=None, + description="Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.", + alias="from", + ) + value: Optional[StrictInt] = Field( + default=None, + description="Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.", + ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius.py index 9592fa2e01..15e0839caa 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius.py @@ -15,10 +15,15 @@ class AroundRadius(BaseModel): """ - [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. """ - oneof_schema_1_validator: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + oneof_schema_1_validator: Optional[ + Annotated[int, Field(strict=True, ge=1)] + ] = Field( + default=None, + description="Maximum search radius around a central location in meters.", + ) oneof_schema_2_validator: Optional[AroundRadiusAll] = None actual_instance: Optional[Union[AroundRadiusAll, int]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius_all.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius_all.py index 050aaf49ed..67f6951496 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius_all.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_radius_all.py @@ -12,7 +12,7 @@ class AroundRadiusAll(str, Enum): """ - AroundRadiusAll + Return all records with a valid `_geoloc` attribute. Don't filter by distance. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filter.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filter.py index 87d4115976..24e826ae6d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filter.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filter.py @@ -13,19 +13,19 @@ class AutomaticFacetFilter(BaseModel): """ - Automatic facet Filter. + Filter or optional filter to be applied to the search. """ facet: StrictStr = Field( - description="Attribute to filter on. This must match a facet placeholder in the Rule's pattern." + description="Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. " ) score: Optional[StrictInt] = Field( default=1, - description="Score for the filter. Typically used for optional or disjunctive filters.", + description="Filter scores to give different weights to individual filters.", ) disjunctive: Optional[StrictBool] = Field( default=False, - description="Whether the filter is disjunctive (true) or conjunctive (false).", + description="Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filters.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filters.py index 5d916bd810..f280aa76ca 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/automatic_facet_filters.py @@ -15,7 +15,7 @@ class AutomaticFacetFilters(BaseModel): """ - Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. """ oneof_schema_1_validator: Optional[List[AutomaticFacetFilter]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommend_request.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommend_request.py index 9f3a89950d..f8c1f45ad9 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommend_request.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommend_request.py @@ -16,7 +16,7 @@ class BaseRecommendRequest(BaseModel): BaseRecommendRequest """ - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") threshold: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field( default=None, description="Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. ", diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommendations_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommendations_query.py index ed832fcea7..7b56ad334a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommendations_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommendations_query.py @@ -21,7 +21,7 @@ class BaseRecommendationsQuery(BaseModel): model: RecommendationModels object_id: StrictStr = Field( - description="Unique object identifier.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) query_parameters: Optional[SearchParamsObject] = Field( default=None, alias="queryParameters" diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommended_for_you_query_parameters.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommended_for_you_query_parameters.py index 15732bc1cc..7ddcb6fccf 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommended_for_you_query_parameters.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_recommended_for_you_query_parameters.py @@ -17,7 +17,7 @@ class BaseRecommendedForYouQueryParameters(BaseModel): """ user_token: StrictStr = Field( - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params.py index 4939807e28..e5c4873ebd 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.recommend.models.around_precision import AroundPrecision from algoliasearch.recommend.models.around_radius import AroundRadius @@ -23,17 +23,15 @@ class BaseSearchParams(BaseModel): BaseSearchParams """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -45,42 +43,41 @@ class BaseSearchParams(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -89,60 +86,75 @@ class BaseSearchParams(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -151,12 +163,12 @@ class BaseSearchParams(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) @@ -248,7 +260,6 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params_without_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params_without_query.py index ec65f6c559..07327f0346 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params_without_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_params_without_query.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.recommend.models.around_precision import AroundPrecision from algoliasearch.recommend.models.around_radius import AroundRadius @@ -25,12 +25,12 @@ class BaseSearchParamsWithoutQuery(BaseModel): similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -42,42 +42,41 @@ class BaseSearchParamsWithoutQuery(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -86,60 +85,75 @@ class BaseSearchParamsWithoutQuery(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -148,12 +162,12 @@ class BaseSearchParamsWithoutQuery(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) @@ -244,7 +258,6 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_response.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_response.py index f20a9db724..957cdcfe32 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/base_search_response.py @@ -39,7 +39,7 @@ class BaseSearchResponse(BaseModel): ) automatic_radius: Optional[StrictStr] = Field( default=None, - description="Automatically-computed radius.", + description="Distance from a central coordinate provided by `aroundLatLng`.", alias="automaticRadius", ) exhaustive: Optional[Exhaustive] = None @@ -59,8 +59,7 @@ class BaseSearchResponse(BaseModel): alias="exhaustiveTypo", ) facets: Optional[Dict[str, Dict[str, StrictInt]]] = Field( - default=None, - description="Mapping of each facet name to the corresponding facet counts.", + default=None, description="Facet counts." ) facets_stats: Optional[Dict[str, FacetsStats]] = Field( default=None, description="Statistics for numerical facets." @@ -79,19 +78,17 @@ class BaseSearchResponse(BaseModel): message: Optional[StrictStr] = Field( default=None, description="Warnings about the query." ) - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") nb_pages: StrictInt = Field( - description="Number of pages of results for the current query.", alias="nbPages" + description="Number of pages of results.", alias="nbPages" ) nb_sorted_hits: Optional[StrictInt] = Field( default=None, description="Number of hits selected and sorted by the relevant sort algorithm.", alias="nbSortedHits", ) - page: StrictInt = Field( - description="Page to retrieve (the first page is `0`, not `1`)." + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Page of search results to retrieve." ) parsed_query: Optional[StrictStr] = Field( default=None, @@ -128,7 +125,7 @@ class BaseSearchResponse(BaseModel): ) user_data: Optional[Any] = Field( default=None, - description="Lets you store custom data in your indices.", + description="An object with custom data. You can store up to 32 kB as custom data. ", alias="userData", ) query_id: Optional[StrictStr] = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/condition.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/condition.py index 93add87ff6..884f3c0b87 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/condition.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/condition.py @@ -6,9 +6,10 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, Optional, Self +from re import match +from typing import Annotated, Any, Dict, Optional, Self -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator from algoliasearch.recommend.models.anchoring import Anchoring @@ -19,16 +20,32 @@ class Condition(BaseModel): """ pattern: Optional[StrictStr] = Field( - default=None, description="Query pattern syntax." + default=None, + description='Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as "comedy". ', ) anchoring: Optional[Anchoring] = None alternatives: Optional[StrictBool] = Field( default=False, - description="Whether the pattern matches on plurals, synonyms, and typos.", + description="Whether the pattern should match plurals, synonyms, and typos.", ) - context: Optional[StrictStr] = Field( - default=None, description="Rule context format: [A-Za-z0-9_-]+)." + context: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description="An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. ", ) + filters: Optional[StrictStr] = Field( + default=None, + description="Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. ", + ) + + @field_validator("context") + def context_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not match(r"[A-Za-z0-9_-]+", value): + raise ValueError(r"must validate the regular expression /[A-Za-z0-9_-]+/") + return value model_config = {"populate_by_name": True, "validate_assignment": True} @@ -72,6 +89,7 @@ def from_dict(cls, obj: Dict) -> Self: "anchoring": obj.get("anchoring"), "alternatives": obj.get("alternatives"), "context": obj.get("context"), + "filters": obj.get("filters"), } ) return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence.py index 62ea0d815d..decc5a2acc 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Optional, Self +from typing import Annotated, Any, Dict, List, Optional, Self from pydantic import BaseModel, Field, StrictBool @@ -17,25 +17,25 @@ class Consequence(BaseModel): """ - [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). """ params: Optional[ConsequenceParams] = None - promote: Optional[List[Promote]] = Field( - default=None, description="Records to promote." + promote: Optional[Annotated[List[Promote], Field(max_length=300)]] = Field( + default=None, + description="Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. ", ) filter_promotes: Optional[StrictBool] = Field( default=False, - description="Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters.", + description='Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the "red" record won\'t be shown. ', alias="filterPromotes", ) - hide: Optional[List[ConsequenceHide]] = Field( - default=None, - description="Records to hide. By default, you can hide up to 50 records per rule.", + hide: Optional[Annotated[List[ConsequenceHide], Field(max_length=50)]] = Field( + default=None, description="Records you want to hide from the search results." ) user_data: Optional[Any] = Field( default=None, - description="Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON.", + description="A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. ", alias="userData", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_hide.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_hide.py index 1832b8008e..88b020b71e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_hide.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_hide.py @@ -13,11 +13,11 @@ class ConsequenceHide(BaseModel): """ - Unique identifier of the record to hide. + Object ID of the record to hide. """ object_id: StrictStr = Field( - description="Unique object identifier.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_params.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_params.py index 7d22980c06..f298e1cc75 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_params.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.recommend.models.advanced_syntax_features import ( AdvancedSyntaxFeatures, @@ -46,12 +46,12 @@ class ConsequenceParams(BaseModel): similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -63,42 +63,41 @@ class ConsequenceParams(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -107,60 +106,75 @@ class ConsequenceParams(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -169,56 +183,51 @@ class ConsequenceParams(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -228,7 +237,7 @@ class ConsequenceParams(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -236,23 +245,23 @@ class ConsequenceParams(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -261,27 +270,25 @@ class ConsequenceParams(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -294,17 +301,17 @@ class ConsequenceParams(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -312,48 +319,48 @@ class ConsequenceParams(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -361,7 +368,7 @@ class ConsequenceParams(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -492,14 +499,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query.py index adc77129e5..666cccb869 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query.py @@ -17,7 +17,7 @@ class ConsequenceQuery(BaseModel): """ - When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. """ oneof_schema_1_validator: Optional[ConsequenceQueryObject] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query_object.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query_object.py index ee708ee667..7193f42589 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query_object.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/consequence_query_object.py @@ -19,9 +19,11 @@ class ConsequenceQueryObject(BaseModel): """ remove: Optional[List[StrictStr]] = Field( - default=None, description="Words to remove." + default=None, description="Words to remove from the search query." + ) + edits: Optional[List[Edit]] = Field( + default=None, description="Changes to make to the search query." ) - edits: Optional[List[Edit]] = Field(default=None, description="Edits to apply.") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/deleted_at_response.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/deleted_at_response.py index 3c91a7694e..e431609730 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/deleted_at_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/deleted_at_response.py @@ -17,7 +17,7 @@ class DeletedAtResponse(BaseModel): """ task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) deleted_at: StrictStr = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/distinct.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/distinct.py index fc7a66ef7b..f41ca8ef7f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/distinct.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/distinct.py @@ -13,13 +13,19 @@ class Distinct(BaseModel): """ - Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. """ - oneof_schema_1_validator: Optional[StrictBool] = None + oneof_schema_1_validator: Optional[StrictBool] = Field( + default=None, + description="Whether deduplication is turned on. If true, only one member of a group is shown in the search results.", + ) oneof_schema_2_validator: Optional[ Annotated[int, Field(le=4, strict=True, ge=0)] - ] = 0 + ] = Field( + default=0, + description="Number of members of a group of records to include in the search results. - Don't use `distinct > 1` for records that might be [promoted by rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/). The number of hits won't be correct and faceting won't work as expected. - With `distinct > 1`, the `hitsPerPage` parameter controls the number of returned groups. For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned. Likewise, the `nbHits` response attribute contains the number of returned groups. ", + ) actual_instance: Optional[Union[bool, int]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/edit.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/edit.py index 1296faa675..040d9fc18a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/edit.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/edit.py @@ -24,7 +24,7 @@ class Edit(BaseModel): ) insert: Optional[StrictStr] = Field( default=None, - description="Text that should be inserted in place of the removed text inside the query string.", + description="Text to be added in place of the deleted text inside the query string.", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/exact_on_single_word_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/exact_on_single_word_query.py index 5a9253b0d8..f63706c805 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/exact_on_single_word_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/exact_on_single_word_query.py @@ -12,7 +12,7 @@ class ExactOnSingleWordQuery(str, Enum): """ - Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_filters.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_filters.py index edaab2bfa9..14c800618f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_filters.py @@ -15,7 +15,7 @@ class FacetFilters(BaseModel): """ - [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_ordering.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_ordering.py index 527d45f8bd..1003288c1d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_ordering.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/facet_ordering.py @@ -16,12 +16,12 @@ class FacetOrdering(BaseModel): """ - Defines the ordering of facets (widgets). + Order of facet names and facet values in your UI. """ facets: Optional[Facets] = None values: Optional[Dict[str, Value]] = Field( - default=None, description="Ordering of facet values within an individual facet." + default=None, description="Order of facet values. One object for each facet." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/facets.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/facets.py index 66f9fdacd5..a158fbeaa1 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/facets.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/facets.py @@ -13,11 +13,12 @@ class Facets(BaseModel): """ - Ordering of facets (widgets). + Order of facet names. """ order: Optional[List[StrictStr]] = Field( - default=None, description="Pinned order of facet lists." + default=None, + description="Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result.py index ca7cd20aae..c040a099d4 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result.py @@ -21,11 +21,11 @@ class HighlightResult(BaseModel): oneof_schema_1_validator: Optional[HighlightResultOption] = None oneof_schema_2_validator: Optional[Dict[str, HighlightResultOption]] = Field( default=None, - description="Show highlighted section and words matched on a query.", + description="Surround words that match the query with HTML tags for highlighting.", ) oneof_schema_3_validator: Optional[List[HighlightResultOption]] = Field( default=None, - description="Show highlighted section and words matched on a query.", + description="Surround words that match the query with HTML tags for highlighting.", ) actual_instance: Optional[ Union[ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result_option.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result_option.py index f7da876948..1c1f504231 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result_option.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/highlight_result_option.py @@ -15,16 +15,15 @@ class HighlightResultOption(BaseModel): """ - Show highlighted section and words matched on a query. + Surround words that match the query with HTML tags for highlighting. """ value: StrictStr = Field( - description="Markup text with `facetQuery` matches highlighted." + description="Highlighted attribute value, including HTML tags." ) match_level: MatchLevel = Field(alias="matchLevel") matched_words: List[StrictStr] = Field( - description="List of words from the query that matched the object.", - alias="matchedWords", + description="List of matched words from the search query.", alias="matchedWords" ) fully_highlighted: Optional[StrictBool] = Field( default=None, diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/ignore_plurals.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/ignore_plurals.py index 2b1ac725e2..8f7bfac03a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/ignore_plurals.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/ignore_plurals.py @@ -8,16 +8,26 @@ from json import dumps, loads from typing import Dict, List, Optional, Self, Union -from pydantic import BaseModel, StrictBool, StrictStr, ValidationError, model_serializer +from pydantic import ( + BaseModel, + Field, + StrictBool, + StrictStr, + ValidationError, + model_serializer, +) class IgnorePlurals(BaseModel): """ - Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. """ oneof_schema_1_validator: Optional[List[StrictStr]] = None - oneof_schema_2_validator: Optional[StrictBool] = False + oneof_schema_2_validator: Optional[StrictBool] = Field( + default=False, + description="If true, `ignorePlurals` is active for all languages included in `queryLanguages`, or for all supported languages, if `queryLanguges` is empty. If false, singulars, plurals, and other declensions won't be considered equivalent. ", + ) actual_instance: Optional[Union[List[str], bool]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/index_settings_as_search_params.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/index_settings_as_search_params.py index e149e75fd0..bdbb816d6f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/index_settings_as_search_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/index_settings_as_search_params.py @@ -36,48 +36,43 @@ class IndexSettingsAsSearchParams(BaseModel): IndexSettingsAsSearchParams """ - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -87,7 +82,7 @@ class IndexSettingsAsSearchParams(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -95,23 +90,23 @@ class IndexSettingsAsSearchParams(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -120,27 +115,25 @@ class IndexSettingsAsSearchParams(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -153,17 +146,17 @@ class IndexSettingsAsSearchParams(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -171,48 +164,48 @@ class IndexSettingsAsSearchParams(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -220,7 +213,7 @@ class IndexSettingsAsSearchParams(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -287,7 +280,6 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/match_level.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/match_level.py index 7841aeb95f..69bc530e5b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/match_level.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/match_level.py @@ -12,7 +12,7 @@ class MatchLevel(str, Enum): """ - Indicates how well the attribute matched the search query. + Whether the whole query string matches or only a part. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/mode.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/mode.py index 6f608c16a0..9fff79f9e6 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/mode.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/mode.py @@ -12,7 +12,7 @@ class Mode(str, Enum): """ - Search mode the index will use to query for results. + Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/numeric_filters.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/numeric_filters.py index bf905e15c4..ab62133cfd 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/numeric_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/numeric_filters.py @@ -15,7 +15,7 @@ class NumericFilters(BaseModel): """ - [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/optional_filters.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/optional_filters.py index 9c15f23116..6dd3fa5e03 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/optional_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/optional_filters.py @@ -15,7 +15,7 @@ class OptionalFilters(BaseModel): """ - Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/params.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/params.py index 8c0b0acba8..33b47b010c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/params.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/params.py @@ -17,7 +17,7 @@ class Params(BaseModel): """ - Additional search parameters. + Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. """ query: Optional[ConsequenceQuery] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_id.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_id.py index d37bd6c2f7..f4119e087b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_id.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_id.py @@ -17,10 +17,10 @@ class PromoteObjectID(BaseModel): """ object_id: StrictStr = Field( - description="Unique identifier of the record to promote.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) position: StrictInt = Field( - description="The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions." + description="Position in the search results where you want to show the promoted records." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_ids.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_ids.py index 1aaab493e8..d6d0d44c19 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_ids.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/promote_object_ids.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Self +from typing import Annotated, Any, Dict, List, Self from pydantic import BaseModel, Field, StrictInt, StrictStr @@ -16,11 +16,12 @@ class PromoteObjectIDs(BaseModel): Records to promote. """ - object_ids: List[StrictStr] = Field( - description="Unique identifiers of the records to promote.", alias="objectIDs" + object_ids: Annotated[List[StrictStr], Field(max_length=100)] = Field( + description="Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. ", + alias="objectIDs", ) position: StrictInt = Field( - description="The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions." + description="Position in the search results where you want to show the promoted records." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/query_type.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/query_type.py index 6f70b2e8ac..388d0a8f2b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/query_type.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/query_type.py @@ -12,7 +12,7 @@ class QueryType(str, Enum): """ - Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/ranking_info.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/ranking_info.py index 21a9592bd0..acc91f7d2c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/ranking_info.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/ranking_info.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, Optional, Self +from typing import Annotated, Any, Dict, Optional, Self from pydantic import BaseModel, Field, StrictBool, StrictInt @@ -16,19 +16,21 @@ class RankingInfo(BaseModel): """ - RankingInfo + Object with detailed information about the record's ranking. """ - filters: StrictInt = Field(description="This field is reserved for advanced usage.") - first_matched_word: StrictInt = Field( - description="Position of the most important matched attribute in the attributes to index list.", + filters: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Whether a filter matched the query." + ) + first_matched_word: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Position of the first matched word in the best matching attribute of the record.", alias="firstMatchedWord", ) - geo_distance: StrictInt = Field( + geo_distance: Annotated[int, Field(strict=True, ge=0)] = Field( description="Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).", alias="geoDistance", ) - geo_precision: Optional[StrictInt] = Field( + geo_precision: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, description="Precision used when computing the geo distance, in meters.", alias="geoPrecision", @@ -37,31 +39,31 @@ class RankingInfo(BaseModel): default=None, alias="matchedGeoLocation" ) personalization: Optional[Personalization] = None - nb_exact_words: StrictInt = Field( + nb_exact_words: Annotated[int, Field(strict=True, ge=0)] = Field( description="Number of exactly matched words.", alias="nbExactWords" ) - nb_typos: StrictInt = Field( + nb_typos: Annotated[int, Field(strict=True, ge=0)] = Field( description="Number of typos encountered when matching the record.", alias="nbTypos", ) promoted: StrictBool = Field( - description="Present and set to true if a Rule promoted the hit." + description="Whether the record was promoted by a rule." ) - proximity_distance: Optional[StrictInt] = Field( + proximity_distance: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( default=None, - description="When the query contains more than one word, the sum of the distances between matched words (in meters).", + description="Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.", alias="proximityDistance", ) user_score: StrictInt = Field( - description="Custom ranking for the object, expressed as a single integer value.", + description="Overall ranking of the record, expressed as a single integer. This attribute is internal.", alias="userScore", ) - words: StrictInt = Field( - description="Number of matched words, including prefixes and typos." + words: Annotated[int, Field(strict=True, ge=1)] = Field( + description="Number of matched words." ) promoted_by_re_ranking: Optional[StrictBool] = Field( default=None, - description="Wether the record are promoted by the re-ranking strategy.", + description="Whether the record is re-ranked.", alias="promotedByReRanking", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/re_ranking_apply_filter.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/re_ranking_apply_filter.py index 50719c9de6..0702f6e571 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/re_ranking_apply_filter.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/re_ranking_apply_filter.py @@ -15,7 +15,7 @@ class ReRankingApplyFilter(BaseModel): """ - When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_hit.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_hit.py index a731167a6b..b01c4fd4d2 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_hit.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_hit.py @@ -21,16 +21,16 @@ class RecommendHit(BaseModel): """ object_id: StrictStr = Field( - description="Unique object identifier.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) highlight_result: Optional[Dict[str, HighlightResult]] = Field( default=None, - description="Show highlighted section and words matched on a query.", + description="Surround words that match the query with HTML tags for highlighting.", alias="_highlightResult", ) snippet_result: Optional[Dict[str, SnippetResult]] = Field( default=None, - description="Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.", + description="Snippets that show the context around a matching search query.", alias="_snippetResult", ) ranking_info: Optional[RankingInfo] = Field(default=None, alias="_rankingInfo") diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_hits.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_hits.py index 2b609d504d..4dd4ddb454 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_hits.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_hits.py @@ -19,9 +19,7 @@ class RecommendationsHits(BaseModel): """ hits: List[RecommendationsHit] - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") params: Optional[StrictStr] = Field( default=None, description="URL-encoded string of all search parameters." ) diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_query.py index efd1c01d9f..9f3ea3e580 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_query.py @@ -19,7 +19,7 @@ class RecommendationsQuery(BaseModel): RecommendationsQuery """ - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") threshold: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field( default=None, description="Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. ", @@ -31,7 +31,7 @@ class RecommendationsQuery(BaseModel): ) model: RecommendationModels object_id: StrictStr = Field( - description="Unique object identifier.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) query_parameters: Optional[SearchParamsObject] = Field( default=None, alias="queryParameters" diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_results.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_results.py index 4f4b5883f7..92df4f42fd 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_results.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommendations_results.py @@ -40,7 +40,7 @@ class RecommendationsResults(BaseModel): ) automatic_radius: Optional[StrictStr] = Field( default=None, - description="Automatically-computed radius.", + description="Distance from a central coordinate provided by `aroundLatLng`.", alias="automaticRadius", ) exhaustive: Optional[Exhaustive] = None @@ -60,8 +60,7 @@ class RecommendationsResults(BaseModel): alias="exhaustiveTypo", ) facets: Optional[Dict[str, Dict[str, StrictInt]]] = Field( - default=None, - description="Mapping of each facet name to the corresponding facet counts.", + default=None, description="Facet counts." ) facets_stats: Optional[Dict[str, FacetsStats]] = Field( default=None, description="Statistics for numerical facets." @@ -80,19 +79,17 @@ class RecommendationsResults(BaseModel): message: Optional[StrictStr] = Field( default=None, description="Warnings about the query." ) - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") nb_pages: StrictInt = Field( - description="Number of pages of results for the current query.", alias="nbPages" + description="Number of pages of results.", alias="nbPages" ) nb_sorted_hits: Optional[StrictInt] = Field( default=None, description="Number of hits selected and sorted by the relevant sort algorithm.", alias="nbSortedHits", ) - page: StrictInt = Field( - description="Page to retrieve (the first page is `0`, not `1`)." + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Page of search results to retrieve." ) parsed_query: Optional[StrictStr] = Field( default=None, @@ -129,7 +126,7 @@ class RecommendationsResults(BaseModel): ) user_data: Optional[Dict[str, Any]] = Field( default=None, - description="Lets you store custom data in your indices.", + description="An object with custom data. You can store up to 32 kB as custom data. ", alias="userData", ) query_id: Optional[StrictStr] = Field( @@ -138,9 +135,7 @@ class RecommendationsResults(BaseModel): alias="queryID", ) hits: List[RecommendationsHit] - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") params: Optional[StrictStr] = Field( default=None, description="URL-encoded string of all search parameters." ) diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query.py index dd6a6b3751..55beb02f0e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query.py @@ -23,7 +23,7 @@ class RecommendedForYouQuery(BaseModel): RecommendedForYouQuery """ - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") threshold: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field( default=None, description="Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. ", diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query_parameters.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query_parameters.py index ed55f83b0a..e99c920732 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query_parameters.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommended_for_you_query_parameters.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.recommend.models.advanced_syntax_features import ( AdvancedSyntaxFeatures, @@ -42,17 +42,15 @@ class RecommendedForYouQueryParameters(BaseModel): RecommendedForYouQueryParameters """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -64,42 +62,41 @@ class RecommendedForYouQueryParameters(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -108,59 +105,74 @@ class RecommendedForYouQueryParameters(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: StrictStr = Field( - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -169,56 +181,51 @@ class RecommendedForYouQueryParameters(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -228,7 +235,7 @@ class RecommendedForYouQueryParameters(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -236,23 +243,23 @@ class RecommendedForYouQueryParameters(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -261,27 +268,25 @@ class RecommendedForYouQueryParameters(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -294,17 +299,17 @@ class RecommendedForYouQueryParameters(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -312,48 +317,48 @@ class RecommendedForYouQueryParameters(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -361,7 +366,7 @@ class RecommendedForYouQueryParameters(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -478,14 +483,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_stop_words.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_stop_words.py index 8ede2996fc..2eecddb4f7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_stop_words.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_stop_words.py @@ -8,16 +8,26 @@ from json import dumps, loads from typing import Dict, List, Optional, Self, Union -from pydantic import BaseModel, StrictBool, StrictStr, ValidationError, model_serializer +from pydantic import ( + BaseModel, + Field, + StrictBool, + StrictStr, + ValidationError, + model_serializer, +) class RemoveStopWords(BaseModel): """ - Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. """ oneof_schema_1_validator: Optional[List[StrictStr]] = None - oneof_schema_2_validator: Optional[StrictBool] = False + oneof_schema_2_validator: Optional[StrictBool] = Field( + default=False, + description="If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty. If false, stop words are not removed. ", + ) actual_instance: Optional[Union[List[str], bool]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_words_if_no_results.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_words_if_no_results.py index 3c97956ae1..d964a59a3a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_words_if_no_results.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/remove_words_if_no_results.py @@ -12,7 +12,7 @@ class RemoveWordsIfNoResults(str, Enum): """ - Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. + Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/rendering_content.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/rendering_content.py index 829d8c2949..1b3be1df0b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/rendering_content.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/rendering_content.py @@ -15,7 +15,7 @@ class RenderingContent(BaseModel): """ - Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. """ facet_ordering: Optional[FacetOrdering] = Field(default=None, alias="facetOrdering") diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_object.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_object.py index f20d521992..a826ddafc9 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_object.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_object.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.recommend.models.advanced_syntax_features import ( AdvancedSyntaxFeatures, @@ -42,17 +42,15 @@ class SearchParamsObject(BaseModel): SearchParamsObject """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -64,42 +62,41 @@ class SearchParamsObject(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -108,60 +105,75 @@ class SearchParamsObject(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -170,56 +182,51 @@ class SearchParamsObject(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -229,7 +236,7 @@ class SearchParamsObject(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -237,23 +244,23 @@ class SearchParamsObject(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -262,27 +269,25 @@ class SearchParamsObject(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -295,17 +300,17 @@ class SearchParamsObject(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -313,48 +318,48 @@ class SearchParamsObject(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -362,7 +367,7 @@ class SearchParamsObject(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -479,14 +484,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_query.py index 7ed842d1c4..9e3cde20da 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_params_query.py @@ -16,9 +16,7 @@ class SearchParamsQuery(BaseModel): SearchParamsQuery """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_params.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_params.py index acbf9cf09d..f50f8d1497 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_params.py @@ -16,13 +16,13 @@ class SearchRecommendRulesParams(BaseModel): Recommend rules search parameters. """ - query: Optional[StrictStr] = Field(default="", description="Full-text query.") + query: Optional[StrictStr] = Field(default="", description="Search query.") context: Optional[StrictStr] = Field( default=None, description="Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules).", ) page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Requested page (the first page is page 0)." + default=None, description="Requested page of the API response." ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=20, description="Maximum number of hits per page.", alias="hitsPerPage" diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_response.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_response.py index 10d855886a..1e8689cbd4 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/search_recommend_rules_response.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Self +from typing import Annotated, Any, Dict, List, Self from pydantic import BaseModel, Field, StrictInt @@ -19,14 +19,12 @@ class SearchRecommendRulesResponse(BaseModel): """ hits: List[RuleResponse] = Field(description="Fetched rules.") - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) - page: StrictInt = Field( - description="Page to retrieve (the first page is `0`, not `1`)." + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Page of search results to retrieve." ) nb_pages: StrictInt = Field( - description="Number of pages of results for the current query.", alias="nbPages" + description="Number of pages of results.", alias="nbPages" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/semantic_search.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/semantic_search.py index 1deb5d5694..25f77e338d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/semantic_search.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/semantic_search.py @@ -13,12 +13,12 @@ class SemanticSearch(BaseModel): """ - Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. """ event_sources: Optional[List[StrictStr]] = Field( default=None, - description="Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source.", + description="Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. ", alias="eventSources", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result.py index 9f4caa8ba0..45cea63044 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result.py @@ -21,11 +21,11 @@ class SnippetResult(BaseModel): oneof_schema_1_validator: Optional[SnippetResultOption] = None oneof_schema_2_validator: Optional[Dict[str, SnippetResultOption]] = Field( default=None, - description="Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.", + description="Snippets that show the context around a matching search query.", ) oneof_schema_3_validator: Optional[List[SnippetResultOption]] = Field( default=None, - description="Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.", + description="Snippets that show the context around a matching search query.", ) actual_instance: Optional[ Union[ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result_option.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result_option.py index a74179faa8..c18af0eaba 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result_option.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/snippet_result_option.py @@ -15,11 +15,11 @@ class SnippetResultOption(BaseModel): """ - Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + Snippets that show the context around a matching search query. """ value: StrictStr = Field( - description="Markup text with `facetQuery` matches highlighted." + description="Highlighted attribute value, including HTML tags." ) match_level: MatchLevel = Field(alias="matchLevel") diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/sort_remaining_by.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/sort_remaining_by.py index e1a1a6aaf1..24a3e3e278 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/sort_remaining_by.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/sort_remaining_by.py @@ -12,7 +12,7 @@ class SortRemainingBy(str, Enum): """ - How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/tag_filters.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/tag_filters.py index afd1ca8a9f..d4ea6114ed 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/tag_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/tag_filters.py @@ -15,7 +15,7 @@ class TagFilters(BaseModel): """ - [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/task_status.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/task_status.py index a9582fe5b5..9ade26a624 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/task_status.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/task_status.py @@ -12,7 +12,7 @@ class TaskStatus(str, Enum): """ - _published_ if the task has been processed, _notPublished_ otherwise. + Task status, `published` if the task is completed, `notPublished` otherwise. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_facets_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_facets_query.py index 668cc27113..9c19e07610 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_facets_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_facets_query.py @@ -18,7 +18,7 @@ class TrendingFacetsQuery(BaseModel): TrendingFacetsQuery """ - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") threshold: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field( default=None, description="Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. ", diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_items_query.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_items_query.py index 287bbfde7d..69cd9a553e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_items_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/trending_items_query.py @@ -19,7 +19,7 @@ class TrendingItemsQuery(BaseModel): TrendingItemsQuery """ - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") threshold: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field( default=None, description="Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. ", diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance.py index c60a30df44..a8e468c5b0 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance.py @@ -8,17 +8,20 @@ from json import dumps, loads from typing import Dict, Optional, Self, Union -from pydantic import BaseModel, StrictBool, ValidationError, model_serializer +from pydantic import BaseModel, Field, StrictBool, ValidationError, model_serializer from algoliasearch.recommend.models.typo_tolerance_enum import TypoToleranceEnum class TypoTolerance(BaseModel): """ - Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. """ - oneof_schema_1_validator: Optional[StrictBool] = True + oneof_schema_1_validator: Optional[StrictBool] = Field( + default=True, + description="Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches.", + ) oneof_schema_2_validator: Optional[TypoToleranceEnum] = None actual_instance: Optional[Union[TypoToleranceEnum, bool]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance_enum.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance_enum.py index 15bc77563a..9387a3a38f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance_enum.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/typo_tolerance_enum.py @@ -12,7 +12,7 @@ class TypoToleranceEnum(str, Enum): """ - TypoToleranceEnum + - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/value.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/value.py index 3416d4ab2a..d33ab88583 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/value.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/value.py @@ -19,7 +19,8 @@ class Value(BaseModel): """ order: Optional[List[StrictStr]] = Field( - default=None, description="Pinned order of facet lists." + default=None, + description="Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. ", ) sort_remaining_by: Optional[SortRemainingBy] = Field( default=None, alias="sortRemainingBy" diff --git a/clients/algoliasearch-client-python/algoliasearch/search/client.py b/clients/algoliasearch-client-python/algoliasearch/search/client.py index 845b779db2..2eda3b4298 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/client.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/client.py @@ -82,6 +82,9 @@ from algoliasearch.search.models.search_dictionary_entries_params import ( SearchDictionaryEntriesParams, ) +from algoliasearch.search.models.search_dictionary_entries_response import ( + SearchDictionaryEntriesResponse, +) from algoliasearch.search.models.search_for_facet_values_request import ( SearchForFacetValuesRequest, ) @@ -503,7 +506,7 @@ async def add_api_key_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + Creates a new API key with specific permissions and restrictions. Required API Key ACLs: - admin @@ -539,7 +542,7 @@ async def add_api_key( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> AddApiKeyResponse: """ - Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + Creates a new API key with specific permissions and restrictions. Required API Key ACLs: - admin @@ -556,25 +559,29 @@ async def add_api_key( async def add_or_update_object_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], + body: Annotated[ + Dict[str, Any], + Field( + description="The record, a schemaless object with attributes that are useful in the context of search and discovery." + ), ], - body: Annotated[Dict[str, Any], Field(description="Algolia record.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str - :param body: Algolia record. (required) + :param body: The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) :type body: object :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -614,25 +621,29 @@ async def add_or_update_object_with_http_info( async def add_or_update_object( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], + body: Annotated[ + Dict[str, Any], + Field( + description="The record, a schemaless object with attributes that are useful in the context of search and discovery." + ), ], - body: Annotated[Dict[str, Any], Field(description="Algolia record.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtWithObjectIdResponse: """ - If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str - :param body: Algolia record. (required) + :param body: The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) :type body: object :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtWithObjectIdResponse' result object. @@ -649,7 +660,7 @@ async def append_source_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Add a source to the list of allowed sources. + Adds a source to the list of allowed sources. Required API Key ACLs: - admin @@ -685,7 +696,7 @@ async def append_source( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> CreatedAtResponse: """ - Add a source to the list of allowed sources. + Adds a source to the list of allowed sources. Required API Key ACLs: - admin @@ -702,18 +713,18 @@ async def append_source( async def assign_user_id_with_http_info( self, x_algolia_user_id: Annotated[ - str, Field(strict=True, description="userID to assign.") + str, Field(strict=True, description="User ID to assign.") ], assign_user_id_params: AssignUserIdParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. Required API Key ACLs: - admin - :param x_algolia_user_id: userID to assign. (required) + :param x_algolia_user_id: User ID to assign. (required) :type x_algolia_user_id: str :param assign_user_id_params: (required) :type assign_user_id_params: AssignUserIdParams @@ -754,18 +765,18 @@ async def assign_user_id_with_http_info( async def assign_user_id( self, x_algolia_user_id: Annotated[ - str, Field(strict=True, description="userID to assign.") + str, Field(strict=True, description="User ID to assign.") ], assign_user_id_params: AssignUserIdParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> CreatedAtResponse: """ - Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. Required API Key ACLs: - admin - :param x_algolia_user_id: userID to assign. (required) + :param x_algolia_user_id: User ID to assign. (required) :type x_algolia_user_id: str :param assign_user_id_params: (required) :type assign_user_id_params: AssignUserIdParams @@ -781,16 +792,17 @@ async def assign_user_id( async def batch_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], batch_write_params: BatchWriteParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param batch_write_params: (required) :type batch_write_params: BatchWriteParams @@ -825,16 +837,17 @@ async def batch_with_http_info( async def batch( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], batch_write_params: BatchWriteParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> BatchResponse: """ - To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param batch_write_params: (required) :type batch_write_params: BatchWriteParams @@ -850,18 +863,18 @@ async def batch( async def batch_assign_user_ids_with_http_info( self, x_algolia_user_id: Annotated[ - str, Field(strict=True, description="userID to assign.") + str, Field(strict=True, description="User ID to assign.") ], batch_assign_user_ids_params: BatchAssignUserIdsParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + Assigns multiple user IDs to a cluster. **You can't move users with this operation**. Required API Key ACLs: - admin - :param x_algolia_user_id: userID to assign. (required) + :param x_algolia_user_id: User ID to assign. (required) :type x_algolia_user_id: str :param batch_assign_user_ids_params: (required) :type batch_assign_user_ids_params: BatchAssignUserIdsParams @@ -902,18 +915,18 @@ async def batch_assign_user_ids_with_http_info( async def batch_assign_user_ids( self, x_algolia_user_id: Annotated[ - str, Field(strict=True, description="userID to assign.") + str, Field(strict=True, description="User ID to assign.") ], batch_assign_user_ids_params: BatchAssignUserIdsParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> CreatedAtResponse: """ - Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + Assigns multiple user IDs to a cluster. **You can't move users with this operation**. Required API Key ACLs: - admin - :param x_algolia_user_id: userID to assign. (required) + :param x_algolia_user_id: User ID to assign. (required) :type x_algolia_user_id: str :param batch_assign_user_ids_params: (required) :type batch_assign_user_ids_params: BatchAssignUserIdsParams @@ -929,18 +942,18 @@ async def batch_assign_user_ids( async def batch_dictionary_entries_with_http_info( self, dictionary_name: Annotated[ - DictionaryType, Field(description="Dictionary to search in.") + DictionaryType, Field(description="Dictionary type in which to search.") ], batch_dictionary_entries_params: BatchDictionaryEntriesParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Add or remove a batch of dictionary entries. + Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. Required API Key ACLs: - editSettings - :param dictionary_name: Dictionary to search in. (required) + :param dictionary_name: Dictionary type in which to search. (required) :type dictionary_name: DictionaryType :param batch_dictionary_entries_params: (required) :type batch_dictionary_entries_params: BatchDictionaryEntriesParams @@ -977,18 +990,18 @@ async def batch_dictionary_entries_with_http_info( async def batch_dictionary_entries( self, dictionary_name: Annotated[ - DictionaryType, Field(description="Dictionary to search in.") + DictionaryType, Field(description="Dictionary type in which to search.") ], batch_dictionary_entries_params: BatchDictionaryEntriesParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Add or remove a batch of dictionary entries. + Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. Required API Key ACLs: - editSettings - :param dictionary_name: Dictionary to search in. (required) + :param dictionary_name: Dictionary type in which to search. (required) :type dictionary_name: DictionaryType :param batch_dictionary_entries_params: (required) :type batch_dictionary_entries_params: BatchDictionaryEntriesParams @@ -1004,18 +1017,19 @@ async def batch_dictionary_entries( async def browse_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], browse_params: Optional[BrowseParams] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Required API Key ACLs: - browse - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param browse_params: :type browse_params: BrowseParams @@ -1047,18 +1061,19 @@ async def browse_with_http_info( async def browse( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], browse_params: Optional[BrowseParams] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> BrowseResponse: """ - Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Required API Key ACLs: - browse - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param browse_params: :type browse_params: BrowseParams @@ -1072,17 +1087,18 @@ async def browse( async def clear_objects_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Delete the records but leave settings and index-specific API keys untouched. + Deletes only the records from an index while keeping settings, synonyms, and rules. Required API Key ACLs: - deleteIndex - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -1107,17 +1123,18 @@ async def clear_objects_with_http_info( async def clear_objects( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Delete the records but leave settings and index-specific API keys untouched. + Deletes only the records from an index while keeping settings, synonyms, and rules. Required API Key ACLs: - deleteIndex - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. @@ -1129,25 +1146,24 @@ async def clear_objects( async def clear_rules_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Delete all rules in the index. + Deletes all rules from the index. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -1178,25 +1194,24 @@ async def clear_rules_with_http_info( async def clear_rules( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Delete all rules in the index. + Deletes all rules from the index. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. @@ -1210,25 +1225,24 @@ async def clear_rules( async def clear_synonyms_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Delete all synonyms in the index. + Deletes all synonyms from the index. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -1259,25 +1273,24 @@ async def clear_synonyms_with_http_info( async def clear_synonyms( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Delete all synonyms in the index. + Deletes all synonyms from the index. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. @@ -1630,7 +1643,7 @@ async def delete_api_key_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Delete an existing API key. The request must be authenticated with the admin API key. + Deletes the API key. Required API Key ACLs: - admin @@ -1661,7 +1674,7 @@ async def delete_api_key( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> DeleteApiKeyResponse: """ - Delete an existing API key. The request must be authenticated with the admin API key. + Deletes the API key. Required API Key ACLs: - admin @@ -1678,18 +1691,19 @@ async def delete_api_key( async def delete_by_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], delete_by_params: DeleteByParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). Required API Key ACLs: - deleteIndex - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param delete_by_params: (required) :type delete_by_params: DeleteByParams @@ -1726,18 +1740,19 @@ async def delete_by_with_http_info( async def delete_by( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], delete_by_params: DeleteByParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> DeletedAtResponse: """ - This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). Required API Key ACLs: - deleteIndex - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param delete_by_params: (required) :type delete_by_params: DeleteByParams @@ -1753,17 +1768,18 @@ async def delete_by( async def delete_index_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Delete an existing index. + Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). Required API Key ACLs: - deleteIndex - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -1788,17 +1804,18 @@ async def delete_index_with_http_info( async def delete_index( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> DeletedAtResponse: """ - Delete an existing index. + Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). Required API Key ACLs: - deleteIndex - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'DeletedAtResponse' result object. @@ -1810,22 +1827,21 @@ async def delete_index( async def delete_object_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") - ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). Required API Key ACLs: - deleteObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -1855,22 +1871,21 @@ async def delete_object_with_http_info( async def delete_object( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") - ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> DeletedAtResponse: """ - To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). Required API Key ACLs: - deleteObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'DeletedAtResponse' result object. @@ -1884,30 +1899,29 @@ async def delete_object( async def delete_rule_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a rule object.") ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a rule object. (required) :type object_id: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -1943,30 +1957,29 @@ async def delete_rule_with_http_info( async def delete_rule( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a rule object.") ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a rule object. (required) :type object_id: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. @@ -1985,7 +1998,7 @@ async def delete_source_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Remove a source from the list of allowed sources. + Deletes a source from the list of allowed sources. Required API Key ACLs: - admin @@ -2020,7 +2033,7 @@ async def delete_source( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> DeleteSourceResponse: """ - Remove a source from the list of allowed sources. + Deletes a source from the list of allowed sources. Required API Key ACLs: - admin @@ -2037,30 +2050,29 @@ async def delete_source( async def delete_synonym_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a synonym object.") ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a synonym object. (required) :type object_id: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -2096,30 +2108,29 @@ async def delete_synonym_with_http_info( async def delete_synonym( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a synonym object.") ], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> DeletedAtResponse: """ - Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a synonym object. (required) :type object_id: str - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'DeletedAtResponse' result object. @@ -2136,7 +2147,7 @@ async def get_api_key_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. :param key: API key. (required) @@ -2163,7 +2174,7 @@ async def get_api_key( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> GetApiKeyResponse: """ - Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. :param key: API key. (required) @@ -2179,7 +2190,7 @@ async def get_dictionary_languages_with_http_info( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ApiResponse[str]: """ - Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + Lists supported languages with their supported dictionary types and number of custom entries. Required API Key ACLs: - settings @@ -2201,7 +2212,7 @@ async def get_dictionary_languages( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> Dict[str, Languages]: """ - Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + Lists supported languages with their supported dictionary types and number of custom entries. Required API Key ACLs: - settings @@ -2217,7 +2228,7 @@ async def get_dictionary_settings_with_http_info( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ApiResponse[str]: """ - Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + Retrieves the languages for which standard dictionary entries are turned off. Required API Key ACLs: - settings @@ -2239,7 +2250,7 @@ async def get_dictionary_settings( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> GetDictionarySettingsResponse: """ - Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + Retrieves the languages for which standard dictionary entries are turned off. Required API Key ACLs: - settings @@ -2256,7 +2267,7 @@ async def get_logs_with_http_info( offset: Annotated[ Optional[StrictInt], Field( - description="First log entry to retrieve. Sorted by decreasing date with 0 being the most recent." + description="First log entry to retrieve. The most recent entries are listed first." ), ] = None, length: Annotated[ @@ -2266,30 +2277,30 @@ async def get_logs_with_http_info( index_name: Annotated[ Optional[StrictStr], Field( - description="Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices." + description="Index for which to retrieve log entries. By default, log entries are retrieved for all indices. " ), ] = None, type: Annotated[ Optional[LogType], Field( - description="Type of log entries to retrieve. When omitted, all log entries are retrieved." + description="Type of log entries to retrieve. By default, all log entries are retrieved. " ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. Required API Key ACLs: - logs - :param offset: First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + :param offset: First log entry to retrieve. The most recent entries are listed first. :type offset: int :param length: Maximum number of entries to retrieve. :type length: int - :param index_name: Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. + :param index_name: Index for which to retrieve log entries. By default, log entries are retrieved for all indices. :type index_name: str - :param type: Type of log entries to retrieve. When omitted, all log entries are retrieved. + :param type: Type of log entries to retrieve. By default, all log entries are retrieved. :type type: LogType :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -2321,7 +2332,7 @@ async def get_logs( offset: Annotated[ Optional[StrictInt], Field( - description="First log entry to retrieve. Sorted by decreasing date with 0 being the most recent." + description="First log entry to retrieve. The most recent entries are listed first." ), ] = None, length: Annotated[ @@ -2331,30 +2342,30 @@ async def get_logs( index_name: Annotated[ Optional[StrictStr], Field( - description="Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices." + description="Index for which to retrieve log entries. By default, log entries are retrieved for all indices. " ), ] = None, type: Annotated[ Optional[LogType], Field( - description="Type of log entries to retrieve. When omitted, all log entries are retrieved." + description="Type of log entries to retrieve. By default, all log entries are retrieved. " ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> GetLogsResponse: """ - The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. Required API Key ACLs: - logs - :param offset: First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + :param offset: First log entry to retrieve. The most recent entries are listed first. :type offset: int :param length: Maximum number of entries to retrieve. :type length: int - :param index_name: Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. + :param index_name: Index for which to retrieve log entries. By default, log entries are retrieved for all indices. :type index_name: str - :param type: Type of log entries to retrieve. When omitted, all log entries are retrieved. + :param type: Type of log entries to retrieve. By default, all log entries are retrieved. :type type: LogType :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'GetLogsResponse' result object. @@ -2368,30 +2379,29 @@ async def get_logs( async def get_object_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") - ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], attributes_to_retrieve: Annotated[ Optional[List[StrictStr]], Field( - description="Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. " + description="Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. " ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str - :param attributes_to_retrieve: Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + :param attributes_to_retrieve: Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. :type attributes_to_retrieve: List[str] :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -2427,30 +2437,29 @@ async def get_object_with_http_info( async def get_object( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") - ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], attributes_to_retrieve: Annotated[ Optional[List[StrictStr]], Field( - description="Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. " + description="Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. " ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> Dict[str, str]: """ - To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str - :param attributes_to_retrieve: Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + :param attributes_to_retrieve: Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. :type attributes_to_retrieve: List[str] :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'Dict[str, str]' result object. @@ -2469,7 +2478,7 @@ async def get_objects_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. Required API Key ACLs: - search @@ -2507,7 +2516,7 @@ async def get_objects( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> GetObjectsResponse: """ - Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. Required API Key ACLs: - search @@ -2524,7 +2533,8 @@ async def get_objects( async def get_rule_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a rule object.") @@ -2532,12 +2542,12 @@ async def get_rule_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a rule object. (required) :type object_id: str @@ -2569,7 +2579,8 @@ async def get_rule_with_http_info( async def get_rule( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a rule object.") @@ -2577,12 +2588,12 @@ async def get_rule( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> Rule: """ - Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a rule object. (required) :type object_id: str @@ -2596,17 +2607,18 @@ async def get_rule( async def get_settings_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + Retrieves an object with non-null index settings. Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -2631,17 +2643,18 @@ async def get_settings_with_http_info( async def get_settings( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> IndexSettings: """ - Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + Retrieves an object with non-null index settings. Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'IndexSettings' result object. @@ -2654,7 +2667,7 @@ async def get_sources_with_http_info( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ApiResponse[str]: """ - Get all allowed sources (IP addresses). + Retrieves all allowed IP addresses with access to your application. Required API Key ACLs: - admin @@ -2676,7 +2689,7 @@ async def get_sources( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> List[Source]: """ - Get all allowed sources (IP addresses). + Retrieves all allowed IP addresses with access to your application. Required API Key ACLs: - admin @@ -2691,7 +2704,8 @@ async def get_sources( async def get_synonym_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a synonym object.") @@ -2699,12 +2713,12 @@ async def get_synonym_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a synonym object. (required) :type object_id: str @@ -2736,7 +2750,8 @@ async def get_synonym_with_http_info( async def get_synonym( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a synonym object.") @@ -2744,12 +2759,12 @@ async def get_synonym( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SynonymHit: """ - Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a synonym object. (required) :type object_id: str @@ -2765,18 +2780,19 @@ async def get_synonym( async def get_task_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], task_id: Annotated[StrictInt, Field(description="Unique task identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param task_id: Unique task identifier. (required) :type task_id: int @@ -2806,18 +2822,19 @@ async def get_task_with_http_info( async def get_task( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], task_id: Annotated[StrictInt, Field(description="Unique task identifier.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> GetTaskResponse: """ - Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param task_id: Unique task identifier. (required) :type task_id: int @@ -2832,7 +2849,7 @@ async def get_top_user_ids_with_http_info( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ApiResponse[str]: """ - Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. Required API Key ACLs: - admin @@ -2854,7 +2871,7 @@ async def get_top_user_ids( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> GetTopUserIdsResponse: """ - Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. Required API Key ACLs: - admin @@ -2868,16 +2885,16 @@ async def get_top_user_ids( async def get_user_id_with_http_info( self, - user_id: Annotated[str, Field(strict=True, description="userID to assign.")], + user_id: Annotated[str, Field(strict=True, description="User ID to assign.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. Required API Key ACLs: - admin - :param user_id: userID to assign. (required) + :param user_id: User ID to assign. (required) :type user_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -2901,16 +2918,16 @@ async def get_user_id_with_http_info( async def get_user_id( self, - user_id: Annotated[str, Field(strict=True, description="userID to assign.")], + user_id: Annotated[str, Field(strict=True, description="User ID to assign.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UserId: """ - Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. Required API Key ACLs: - admin - :param user_id: userID to assign. (required) + :param user_id: User ID to assign. (required) :type user_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UserId' result object. @@ -2924,7 +2941,7 @@ async def has_pending_mappings_with_http_info( get_clusters: Annotated[ Optional[StrictBool], Field( - description="Indicates whether to include the cluster's pending mapping state in the response." + description="Whether to include the cluster's pending mapping state in the response." ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, @@ -2935,7 +2952,7 @@ async def has_pending_mappings_with_http_info( Required API Key ACLs: - admin - :param get_clusters: Indicates whether to include the cluster's pending mapping state in the response. + :param get_clusters: Whether to include the cluster's pending mapping state in the response. :type get_clusters: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -2961,7 +2978,7 @@ async def has_pending_mappings( get_clusters: Annotated[ Optional[StrictBool], Field( - description="Indicates whether to include the cluster's pending mapping state in the response." + description="Whether to include the cluster's pending mapping state in the response." ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, @@ -2972,7 +2989,7 @@ async def has_pending_mappings( Required API Key ACLs: - admin - :param get_clusters: Indicates whether to include the cluster's pending mapping state in the response. + :param get_clusters: Whether to include the cluster's pending mapping state in the response. :type get_clusters: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'HasPendingMappingsResponse' result object. @@ -2987,7 +3004,7 @@ async def list_api_keys_with_http_info( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ApiResponse[str]: """ - List all API keys associated with your Algolia application, including their permissions and restrictions. + Lists all API keys associated with your Algolia application, including their permissions and restrictions. Required API Key ACLs: - admin @@ -3009,7 +3026,7 @@ async def list_api_keys( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ListApiKeysResponse: """ - List all API keys associated with your Algolia application, including their permissions and restrictions. + Lists all API keys associated with your Algolia application, including their permissions and restrictions. Required API Key ACLs: - admin @@ -3025,7 +3042,7 @@ async def list_clusters_with_http_info( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ApiResponse[str]: """ - List the available clusters in a multi-cluster setup. + Lists the available clusters in a multi-cluster setup. Required API Key ACLs: - admin @@ -3047,7 +3064,7 @@ async def list_clusters( self, request_options: Optional[Union[dict, RequestOptions]] = None ) -> ListClustersResponse: """ - List the available clusters in a multi-cluster setup. + Lists the available clusters in a multi-cluster setup. Required API Key ACLs: - admin @@ -3064,23 +3081,23 @@ async def list_indices_with_http_info( page: Annotated[ Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - description="Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. " + description="Requested page of the API response. If `null`, the API response is not paginated. " ), ] = None, hits_per_page: Annotated[ - Optional[StrictInt], Field(description="Maximum number of hits per page.") + Optional[StrictInt], Field(description="Number of hits per page.") ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - List indices in an Algolia application. + Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. Required API Key ACLs: - listIndexes - :param page: Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. + :param page: Requested page of the API response. If `null`, the API response is not paginated. :type page: int - :param hits_per_page: Maximum number of hits per page. + :param hits_per_page: Number of hits per page. :type hits_per_page: int :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3108,23 +3125,23 @@ async def list_indices( page: Annotated[ Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - description="Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. " + description="Requested page of the API response. If `null`, the API response is not paginated. " ), ] = None, hits_per_page: Annotated[ - Optional[StrictInt], Field(description="Maximum number of hits per page.") + Optional[StrictInt], Field(description="Number of hits per page.") ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ListIndicesResponse: """ - List indices in an Algolia application. + Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. Required API Key ACLs: - listIndexes - :param page: Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. + :param page: Requested page of the API response. If `null`, the API response is not paginated. :type page: int - :param hits_per_page: Maximum number of hits per page. + :param hits_per_page: Number of hits per page. :type hits_per_page: int :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'ListIndicesResponse' result object. @@ -3138,23 +3155,23 @@ async def list_user_ids_with_http_info( page: Annotated[ Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - description="Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. " + description="Requested page of the API response. If `null`, the API response is not paginated. " ), ] = None, hits_per_page: Annotated[ - Optional[StrictInt], Field(description="Maximum number of hits per page.") + Optional[StrictInt], Field(description="Number of hits per page.") ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. Required API Key ACLs: - admin - :param page: Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. + :param page: Requested page of the API response. If `null`, the API response is not paginated. :type page: int - :param hits_per_page: Maximum number of hits per page. + :param hits_per_page: Number of hits per page. :type hits_per_page: int :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3182,23 +3199,23 @@ async def list_user_ids( page: Annotated[ Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - description="Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. " + description="Requested page of the API response. If `null`, the API response is not paginated. " ), ] = None, hits_per_page: Annotated[ - Optional[StrictInt], Field(description="Maximum number of hits per page.") + Optional[StrictInt], Field(description="Number of hits per page.") ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ListUserIdsResponse: """ - List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. Required API Key ACLs: - admin - :param page: Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. + :param page: Requested page of the API response. If `null`, the API response is not paginated. :type page: int - :param hits_per_page: Maximum number of hits per page. + :param hits_per_page: Number of hits per page. :type hits_per_page: int :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'ListUserIdsResponse' result object. @@ -3215,7 +3232,7 @@ async def multiple_batch_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. :param batch_params: (required) @@ -3249,7 +3266,7 @@ async def multiple_batch( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> MultipleBatchResponse: """ - To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. :param batch_params: (required) @@ -3264,18 +3281,19 @@ async def multiple_batch( async def operation_index_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], operation_index_params: OperationIndexParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param operation_index_params: (required) :type operation_index_params: OperationIndexParams @@ -3312,18 +3330,19 @@ async def operation_index_with_http_info( async def operation_index( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], operation_index_params: OperationIndexParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param operation_index_params: (required) :type operation_index_params: OperationIndexParams @@ -3339,36 +3358,33 @@ async def operation_index( async def partial_update_object_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") - ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], attributes_to_update: Annotated[ Dict[str, AttributeToUpdate], - Field(description="Object with attributes to update."), + Field(description="Attributes with their values."), ], create_if_not_exists: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether to create a new record if it doesn't exist yet. " - ), + Field(description="Whether to create a new record if it doesn't exist."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str - :param attributes_to_update: Object with attributes to update. (required) + :param attributes_to_update: Attributes with their values. (required) :type attributes_to_update: Dict[str, AttributeToUpdate] - :param create_if_not_exists: Indicates whether to create a new record if it doesn't exist yet. + :param create_if_not_exists: Whether to create a new record if it doesn't exist. :type create_if_not_exists: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3414,36 +3430,33 @@ async def partial_update_object_with_http_info( async def partial_update_object( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") - ], - object_id: Annotated[ - StrictStr, Field(description="Unique record (object) identifier.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], + object_id: Annotated[StrictStr, Field(description="Unique record identifier.")], attributes_to_update: Annotated[ Dict[str, AttributeToUpdate], - Field(description="Object with attributes to update."), + Field(description="Attributes with their values."), ], create_if_not_exists: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether to create a new record if it doesn't exist yet. " - ), + Field(description="Whether to create a new record if it doesn't exist."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtWithObjectIdResponse: """ - Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param object_id: Unique record (object) identifier. (required) + :param object_id: Unique record identifier. (required) :type object_id: str - :param attributes_to_update: Object with attributes to update. (required) + :param attributes_to_update: Attributes with their values. (required) :type attributes_to_update: Dict[str, AttributeToUpdate] - :param create_if_not_exists: Indicates whether to create a new record if it doesn't exist yet. + :param create_if_not_exists: Whether to create a new record if it doesn't exist. :type create_if_not_exists: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtWithObjectIdResponse' result object. @@ -3460,16 +3473,16 @@ async def partial_update_object( async def remove_user_id_with_http_info( self, - user_id: Annotated[str, Field(strict=True, description="userID to assign.")], + user_id: Annotated[str, Field(strict=True, description="User ID to assign.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Remove a userID and its associated data from the multi-clusters. + Deletes a user ID and its associated data from the clusters. Required API Key ACLs: - admin - :param user_id: userID to assign. (required) + :param user_id: User ID to assign. (required) :type user_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3493,16 +3506,16 @@ async def remove_user_id_with_http_info( async def remove_user_id( self, - user_id: Annotated[str, Field(strict=True, description="userID to assign.")], + user_id: Annotated[str, Field(strict=True, description="User ID to assign.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> RemoveUserIdResponse: """ - Remove a userID and its associated data from the multi-clusters. + Deletes a user ID and its associated data from the clusters. Required API Key ACLs: - admin - :param user_id: userID to assign. (required) + :param user_id: User ID to assign. (required) :type user_id: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'RemoveUserIdResponse' result object. @@ -3517,7 +3530,7 @@ async def replace_sources_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Replace all allowed sources. + Replaces the list of allowed sources. Required API Key ACLs: - admin @@ -3553,7 +3566,7 @@ async def replace_sources( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ReplaceSourceResponse: """ - Replace all allowed sources. + Replaces the list of allowed sources. Required API Key ACLs: - admin @@ -3573,7 +3586,7 @@ async def restore_api_key_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. Required API Key ACLs: - admin @@ -3604,7 +3617,7 @@ async def restore_api_key( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> AddApiKeyResponse: """ - Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. Required API Key ACLs: - admin @@ -3621,20 +3634,26 @@ async def restore_api_key( async def save_object_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), + ], + body: Annotated[ + Dict[str, Any], + Field( + description="The record, a schemaless object with attributes that are useful in the context of search and discovery." + ), ], - body: Annotated[Dict[str, Any], Field(description="The Algolia record.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param body: The Algolia record. (required) + :param body: The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) :type body: object :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3667,20 +3686,26 @@ async def save_object_with_http_info( async def save_object( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), + ], + body: Annotated[ + Dict[str, Any], + Field( + description="The record, a schemaless object with attributes that are useful in the context of search and discovery." + ), ], - body: Annotated[Dict[str, Any], Field(description="The Algolia record.")], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SaveObjectResponse: """ - Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). Required API Key ACLs: - addObject - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param body: The Algolia record. (required) + :param body: The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) :type body: object :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'SaveObjectResponse' result object. @@ -3692,7 +3717,8 @@ async def save_object( async def save_rule_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a rule object.") @@ -3700,25 +3726,23 @@ async def save_rule_with_http_info( rule: Rule, forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a rule object. (required) :type object_id: str :param rule: (required) :type rule: Rule - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3762,7 +3786,8 @@ async def save_rule_with_http_info( async def save_rule( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a rule object.") @@ -3770,25 +3795,23 @@ async def save_rule( rule: Rule, forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedRuleResponse: """ - To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a rule object. (required) :type object_id: str :param rule: (required) :type rule: Rule - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedRuleResponse' result object. @@ -3802,36 +3825,35 @@ async def save_rule( async def save_rules_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], rules: List[Rule], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, clear_existing_rules: Annotated[ Optional[StrictBool], Field( - description="Indicates whether existing rules should be deleted before adding this batch." + description="Whether existing rules should be deleted before adding this batch." ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Create or update multiple rules. + Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param rules: (required) :type rules: List[Rule] - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool - :param clear_existing_rules: Indicates whether existing rules should be deleted before adding this batch. + :param clear_existing_rules: Whether existing rules should be deleted before adding this batch. :type clear_existing_rules: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3872,36 +3894,35 @@ async def save_rules_with_http_info( async def save_rules( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], rules: List[Rule], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, clear_existing_rules: Annotated[ Optional[StrictBool], Field( - description="Indicates whether existing rules should be deleted before adding this batch." + description="Whether existing rules should be deleted before adding this batch." ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Create or update multiple rules. + Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param rules: (required) :type rules: List[Rule] - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool - :param clear_existing_rules: Indicates whether existing rules should be deleted before adding this batch. + :param clear_existing_rules: Whether existing rules should be deleted before adding this batch. :type clear_existing_rules: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. @@ -3919,7 +3940,8 @@ async def save_rules( async def save_synonym_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a synonym object.") @@ -3927,25 +3949,23 @@ async def save_synonym_with_http_info( synonym_hit: SynonymHit, forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a synonym object. (required) :type object_id: str :param synonym_hit: (required) :type synonym_hit: SynonymHit - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -3991,7 +4011,8 @@ async def save_synonym_with_http_info( async def save_synonym( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], object_id: Annotated[ StrictStr, Field(description="Unique identifier of a synonym object.") @@ -3999,25 +4020,23 @@ async def save_synonym( synonym_hit: SynonymHit, forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SaveSynonymResponse: """ - Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param object_id: Unique identifier of a synonym object. (required) :type object_id: str :param synonym_hit: (required) :type synonym_hit: SynonymHit - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'SaveSynonymResponse' result object. @@ -4031,36 +4050,35 @@ async def save_synonym( async def save_synonyms_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], synonym_hit: List[SynonymHit], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, replace_existing_synonyms: Annotated[ Optional[StrictBool], Field( - description="Indicates whether to replace all synonyms in the index with the ones sent with this request." + description="Whether to replace all synonyms in the index with the ones sent with this request." ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Create or update multiple synonyms. + If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param synonym_hit: (required) :type synonym_hit: List[SynonymHit] - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool - :param replace_existing_synonyms: Indicates whether to replace all synonyms in the index with the ones sent with this request. + :param replace_existing_synonyms: Whether to replace all synonyms in the index with the ones sent with this request. :type replace_existing_synonyms: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -4105,36 +4123,35 @@ async def save_synonyms_with_http_info( async def save_synonyms( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], synonym_hit: List[SynonymHit], forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, replace_existing_synonyms: Annotated[ Optional[StrictBool], Field( - description="Indicates whether to replace all synonyms in the index with the ones sent with this request." + description="Whether to replace all synonyms in the index with the ones sent with this request." ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Create or update multiple synonyms. + If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param synonym_hit: (required) :type synonym_hit: List[SynonymHit] - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool - :param replace_existing_synonyms: Indicates whether to replace all synonyms in the index with the ones sent with this request. + :param replace_existing_synonyms: Whether to replace all synonyms in the index with the ones sent with this request. :type replace_existing_synonyms: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. @@ -4154,18 +4171,18 @@ async def search_with_http_info( search_method_params: Annotated[ SearchMethodParams, Field( - description="Query requests and strategies. Results will be received in the same order as the queries." + description="Muli-search request body. Results are returned in the same order as the requests." ), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Send multiple search queries to one or more indices. + Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Required API Key ACLs: - search - :param search_method_params: Query requests and strategies. Results will be received in the same order as the queries. (required) + :param search_method_params: Muli-search request body. Results are returned in the same order as the requests. (required) :type search_method_params: SearchMethodParams :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -4195,18 +4212,18 @@ async def search( search_method_params: Annotated[ SearchMethodParams, Field( - description="Query requests and strategies. Results will be received in the same order as the queries." + description="Muli-search request body. Results are returned in the same order as the requests." ), ], request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SearchResponses: """ - Send multiple search queries to one or more indices. + Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Required API Key ACLs: - search - :param search_method_params: Query requests and strategies. Results will be received in the same order as the queries. (required) + :param search_method_params: Muli-search request body. Results are returned in the same order as the requests. (required) :type search_method_params: SearchMethodParams :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'SearchResponses' result object. @@ -4218,18 +4235,18 @@ async def search( async def search_dictionary_entries_with_http_info( self, dictionary_name: Annotated[ - DictionaryType, Field(description="Dictionary to search in.") + DictionaryType, Field(description="Dictionary type in which to search.") ], search_dictionary_entries_params: SearchDictionaryEntriesParams, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + Searches for standard and custom dictionary entries. Required API Key ACLs: - settings - :param dictionary_name: Dictionary to search in. (required) + :param dictionary_name: Dictionary type in which to search. (required) :type dictionary_name: DictionaryType :param search_dictionary_entries_params: (required) :type search_dictionary_entries_params: SearchDictionaryEntriesParams @@ -4266,48 +4283,54 @@ async def search_dictionary_entries_with_http_info( async def search_dictionary_entries( self, dictionary_name: Annotated[ - DictionaryType, Field(description="Dictionary to search in.") + DictionaryType, Field(description="Dictionary type in which to search.") ], search_dictionary_entries_params: SearchDictionaryEntriesParams, request_options: Optional[Union[dict, RequestOptions]] = None, - ) -> UpdatedAtResponse: + ) -> SearchDictionaryEntriesResponse: """ - Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + Searches for standard and custom dictionary entries. Required API Key ACLs: - settings - :param dictionary_name: Dictionary to search in. (required) + :param dictionary_name: Dictionary type in which to search. (required) :type dictionary_name: DictionaryType :param search_dictionary_entries_params: (required) :type search_dictionary_entries_params: SearchDictionaryEntriesParams :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. + :return: Returns the deserialized response in a 'SearchDictionaryEntriesResponse' result object. """ return ( await self.search_dictionary_entries_with_http_info( dictionary_name, search_dictionary_entries_params, request_options ) - ).deserialize(UpdatedAtResponse) + ).deserialize(SearchDictionaryEntriesResponse) async def search_for_facet_values_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), + ], + facet_name: Annotated[ + StrictStr, + Field( + description="Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. " + ), ], - facet_name: Annotated[StrictStr, Field(description="Facet name.")], search_for_facet_values_request: Optional[SearchForFacetValuesRequest] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param facet_name: Facet name. (required) + :param facet_name: Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) :type facet_name: str :param search_for_facet_values_request: :type search_for_facet_values_request: SearchForFacetValuesRequest @@ -4344,21 +4367,27 @@ async def search_for_facet_values_with_http_info( async def search_for_facet_values( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), + ], + facet_name: Annotated[ + StrictStr, + Field( + description="Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. " + ), ], - facet_name: Annotated[StrictStr, Field(description="Facet name.")], search_for_facet_values_request: Optional[SearchForFacetValuesRequest] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SearchForFacetValuesResponse: """ - [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str - :param facet_name: Facet name. (required) + :param facet_name: Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) :type facet_name: str :param search_for_facet_values_request: :type search_for_facet_values_request: SearchForFacetValuesRequest @@ -4374,18 +4403,19 @@ async def search_for_facet_values( async def search_rules_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], search_rules_params: Optional[SearchRulesParams] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + Searches for rules in your index. Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param search_rules_params: :type search_rules_params: SearchRulesParams @@ -4417,18 +4447,19 @@ async def search_rules_with_http_info( async def search_rules( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], search_rules_params: Optional[SearchRulesParams] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SearchRulesResponse: """ - Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + Searches for rules in your index. Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param search_rules_params: :type search_rules_params: SearchRulesParams @@ -4444,18 +4475,19 @@ async def search_rules( async def search_single_index_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], search_params: Optional[SearchParams] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Return records that match the query. + Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param search_params: :type search_params: SearchParams @@ -4487,18 +4519,19 @@ async def search_single_index_with_http_info( async def search_single_index( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], search_params: Optional[SearchParams] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SearchResponse: """ - Return records that match the query. + Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. Required API Key ACLs: - search - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param search_params: :type search_params: SearchParams @@ -4514,7 +4547,8 @@ async def search_single_index( async def search_synonyms_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], search_synonyms_params: Annotated[ Optional[SearchSynonymsParams], @@ -4523,12 +4557,12 @@ async def search_synonyms_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + Searches for synonyms in your index. Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param search_synonyms_params: Body of the `searchSynonyms` operation. :type search_synonyms_params: SearchSynonymsParams @@ -4560,7 +4594,8 @@ async def search_synonyms_with_http_info( async def search_synonyms( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], search_synonyms_params: Annotated[ Optional[SearchSynonymsParams], @@ -4569,12 +4604,12 @@ async def search_synonyms( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SearchSynonymsResponse: """ - Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + Searches for synonyms in your index. Required API Key ACLs: - settings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param search_synonyms_params: Body of the `searchSynonyms` operation. :type search_synonyms_params: SearchSynonymsParams @@ -4593,7 +4628,7 @@ async def search_user_ids_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). Required API Key ACLs: - admin @@ -4629,7 +4664,7 @@ async def search_user_ids( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> SearchUserIdsResponse: """ - Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). Required API Key ACLs: - admin @@ -4651,7 +4686,7 @@ async def set_dictionary_settings_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Set stop word settings for a specific language. + Turns standard stop word dictionary entries on or off for a given language. Required API Key ACLs: - editSettings @@ -4687,7 +4722,7 @@ async def set_dictionary_settings( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Set stop word settings for a specific language. + Turns standard stop word dictionary entries on or off for a given language. Required API Key ACLs: - editSettings @@ -4706,28 +4741,27 @@ async def set_dictionary_settings( async def set_settings_with_http_info( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], index_settings: IndexSettings, forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param index_settings: (required) :type index_settings: IndexSettings - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the raw algoliasearch 'APIResponse' object. @@ -4768,28 +4802,27 @@ async def set_settings_with_http_info( async def set_settings( self, index_name: Annotated[ - StrictStr, Field(description="Index on which to perform the request.") + StrictStr, + Field(description="Name of the index on which to perform the operation."), ], index_settings: IndexSettings, forward_to_replicas: Annotated[ Optional[StrictBool], - Field( - description="Indicates whether changed index settings are forwarded to the replica indices." - ), + Field(description="Whether changes are applied to replica indices."), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdatedAtResponse: """ - Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. Required API Key ACLs: - editSettings - :param index_name: Index on which to perform the request. (required) + :param index_name: Name of the index on which to perform the operation. (required) :type index_name: str :param index_settings: (required) :type index_settings: IndexSettings - :param forward_to_replicas: Indicates whether changed index settings are forwarded to the replica indices. + :param forward_to_replicas: Whether changes are applied to replica indices. :type forward_to_replicas: bool :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) :return: Returns the deserialized response in a 'UpdatedAtResponse' result object. @@ -4807,7 +4840,7 @@ async def update_api_key_with_http_info( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> ApiResponse[str]: """ - Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. Required API Key ACLs: - admin @@ -4851,7 +4884,7 @@ async def update_api_key( request_options: Optional[Union[dict, RequestOptions]] = None, ) -> UpdateApiKeyResponse: """ - Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. Required API Key ACLs: - admin diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/acl.py b/clients/algoliasearch-client-python/algoliasearch/search/models/acl.py index 48766a27a2..727e0d582d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/acl.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/acl.py @@ -12,7 +12,7 @@ class Acl(str, Enum): """ - API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings. + Access control list permissions. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/action.py b/clients/algoliasearch-client-python/algoliasearch/search/models/action.py index 4c3380b04d..80e6c61006 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/action.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/action.py @@ -12,7 +12,7 @@ class Action(str, Enum): """ - Type of batch operation. + Type of indexing operation. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/add_api_key_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/add_api_key_response.py index 568614faa8..72ae7eadc1 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/add_api_key_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/add_api_key_response.py @@ -18,7 +18,7 @@ class AddApiKeyResponse(BaseModel): key: StrictStr = Field(description="API key.") created_at: StrictStr = Field( - description="Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.", + description="Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.", alias="createdAt", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/anchoring.py b/clients/algoliasearch-client-python/algoliasearch/search/models/anchoring.py index 5f15164e88..1e81a7a7b2 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/anchoring.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/anchoring.py @@ -12,7 +12,7 @@ class Anchoring(str, Enum): """ - Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`). + Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/api_key.py b/clients/algoliasearch-client-python/algoliasearch/search/models/api_key.py index e51a94fd5e..32011624c7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/api_key.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/api_key.py @@ -19,38 +19,38 @@ class ApiKey(BaseModel): """ acl: List[Acl] = Field( - description="[Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. " + description="Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). " ) description: Optional[StrictStr] = Field( default="", - description="Description of an API key for you and your team members.", + description="Description of an API key to help you identify this API key.", ) indexes: Optional[List[StrictStr]] = Field( default=None, - description='Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with "dev_" - `*_dev` matches all indices ending with "_dev" - `*_products_*` matches all indices containing "_products_". ', + description='Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with "dev_". - `*_dev` matches all indices ending with "_dev". - `*_products_*` matches all indices containing "_products_". ', ) max_hits_per_query: Optional[StrictInt] = Field( default=0, - description="Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. ", + description="Maximum number of results this API key can retrieve in one query. By default, there's no limit. ", alias="maxHitsPerQuery", ) max_queries_per_ip_per_hour: Optional[StrictInt] = Field( default=0, - description="Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. ", + description="Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. ", alias="maxQueriesPerIPPerHour", ) query_parameters: Optional[StrictStr] = Field( default="", - description="Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. ", + description="Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. ", alias="queryParameters", ) referers: Optional[List[StrictStr]] = Field( default=None, - description='Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/*` matches all referrers starting with "https://algolia.com/" - `*.algolia.com` matches all referrers ending with ".algolia.com" - `*algolia.com*` allows everything in the domain "algolia.com". ', + description='Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/*` allows all referrers starting with "https://algolia.com/" - `*.algolia.com` allows all referrers ending with ".algolia.com" - `*algolia.com*` allows all referrers in the domain "algolia.com". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). ', ) validity: Optional[StrictInt] = Field( default=0, - description="Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. ", + description="Duration (in seconds) after which the API key expires. By default, API keys don't expire. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py b/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py index a36b75345b..8f192925ba 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py @@ -17,14 +17,14 @@ class AroundPrecision(BaseModel): """ - Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. """ - oneof_schema_1_validator: Optional[StrictInt] = 10 - oneof_schema_2_validator: Optional[List[AroundPrecisionFromValueInner]] = Field( - default=None, - description="Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/).", + oneof_schema_1_validator: Optional[StrictInt] = Field( + default=10, + description="Distance in meters to group results by similar distances. For example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance, as are records between 100 and 199 meters. ", ) + oneof_schema_2_validator: Optional[List[AroundPrecisionFromValueInner]] = None actual_instance: Optional[Union[List[AroundPrecisionFromValueInner], int]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision_from_value_inner.py b/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision_from_value_inner.py index a82b1dee81..e9048fc295 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision_from_value_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision_from_value_inner.py @@ -13,11 +13,18 @@ class AroundPrecisionFromValueInner(BaseModel): """ - AroundPrecisionFromValueInner + Range object with lower and upper values in meters to define custom ranges. """ - var_from: Optional[StrictInt] = Field(default=None, alias="from") - value: Optional[StrictInt] = None + var_from: Optional[StrictInt] = Field( + default=None, + description="Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.", + alias="from", + ) + value: Optional[StrictInt] = Field( + default=None, + description="Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.", + ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius.py b/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius.py index 467dabbeea..c81e60fe73 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius.py @@ -15,10 +15,15 @@ class AroundRadius(BaseModel): """ - [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. """ - oneof_schema_1_validator: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + oneof_schema_1_validator: Optional[ + Annotated[int, Field(strict=True, ge=1)] + ] = Field( + default=None, + description="Maximum search radius around a central location in meters.", + ) oneof_schema_2_validator: Optional[AroundRadiusAll] = None actual_instance: Optional[Union[AroundRadiusAll, int]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius_all.py b/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius_all.py index 050aaf49ed..67f6951496 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius_all.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/around_radius_all.py @@ -12,7 +12,7 @@ class AroundRadiusAll(str, Enum): """ - AroundRadiusAll + Return all records with a valid `_geoloc` attribute. Don't filter by distance. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/attribute_to_update.py b/clients/algoliasearch-client-python/algoliasearch/search/models/attribute_to_update.py index 75cb2bcf0c..e0601b65f3 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/attribute_to_update.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/attribute_to_update.py @@ -19,7 +19,7 @@ class AttributeToUpdate(BaseModel): """ oneof_schema_1_validator: Optional[StrictStr] = Field( - default=None, description="Value of the attribute to be updated." + default=None, description="Value of the attribute to update." ) oneof_schema_2_validator: Optional[BuiltInOperation] = None actual_instance: Optional[Union[BuiltInOperation, str]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filter.py b/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filter.py index 87d4115976..24e826ae6d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filter.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filter.py @@ -13,19 +13,19 @@ class AutomaticFacetFilter(BaseModel): """ - Automatic facet Filter. + Filter or optional filter to be applied to the search. """ facet: StrictStr = Field( - description="Attribute to filter on. This must match a facet placeholder in the Rule's pattern." + description="Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. " ) score: Optional[StrictInt] = Field( default=1, - description="Score for the filter. Typically used for optional or disjunctive filters.", + description="Filter scores to give different weights to individual filters.", ) disjunctive: Optional[StrictBool] = Field( default=False, - description="Whether the filter is disjunctive (true) or conjunctive (false).", + description="Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filters.py b/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filters.py index ec0caf9678..806b5b933d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/automatic_facet_filters.py @@ -15,7 +15,7 @@ class AutomaticFacetFilters(BaseModel): """ - Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. """ oneof_schema_1_validator: Optional[List[AutomaticFacetFilter]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/base_index_settings.py b/clients/algoliasearch-client-python/algoliasearch/search/models/base_index_settings.py index 1504069ba0..8f988c424c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/base_index_settings.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/base_index_settings.py @@ -6,9 +6,9 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Optional, Self +from typing import Annotated, Any, Dict, List, Optional, Self -from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictStr class BaseIndexSettings(BaseModel): @@ -16,83 +16,90 @@ class BaseIndexSettings(BaseModel): BaseIndexSettings """ + attributes_for_faceting: Optional[List[StrictStr]] = Field( + default=None, + description='Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly("ATTRIBUTE")
Allows using this attribute as a filter, but doesn\'t evalue the facet values.
searchable("ATTRIBUTE")
Allows searching for facet values.
afterDistinct("ATTRIBUTE")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. ', + alias="attributesForFaceting", + ) replicas: Optional[List[StrictStr]] = Field( default=None, - description="Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings.", + description="Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). ", ) - pagination_limited_to: Optional[StrictInt] = Field( + pagination_limited_to: Optional[ + Annotated[int, Field(le=20000, strict=True)] + ] = Field( default=1000, - description="Maximum number of hits accessible through pagination.", + description="Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. ", alias="paginationLimitedTo", ) unretrievable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes that can't be retrieved at query time.", + description="Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. ", alias="unretrievableAttributes", ) disable_typo_tolerance_on_words: Optional[List[StrictStr]] = Field( default=None, - description="Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. ", alias="disableTypoToleranceOnWords", ) attributes_to_transliterate: Optional[List[StrictStr]] = Field( default=None, - description="Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana.", + description="Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. ", alias="attributesToTransliterate", ) camel_case_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.", + description="Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.", alias="camelCaseAttributes", ) decompounded_attributes: Optional[Dict[str, Any]] = Field( default=None, - description="Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies.", + description='Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, "firefighter". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). ', alias="decompoundedAttributes", ) index_languages: Optional[List[StrictStr]] = Field( default=None, - description="Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="indexLanguages", ) disable_prefix_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).", + description="Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).", alias="disablePrefixOnAttributes", ) allow_compression_of_integer_array: Optional[StrictBool] = Field( default=False, - description="Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. ", + description="Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. ", alias="allowCompressionOfIntegerArray", ) numeric_attributes_for_filtering: Optional[List[StrictStr]] = Field( default=None, - description="Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).", + description='Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly("ATTRIBUTE")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. ', alias="numericAttributesForFiltering", ) separators_to_index: Optional[StrictStr] = Field( default="", - description="Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥.", + description="Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. ", alias="separatorsToIndex", ) searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="[Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). ", + description='Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `"title,alternate_title"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered("ATTRIBUTE")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. ', alias="searchableAttributes", ) user_data: Optional[Any] = Field( default=None, - description="Lets you store custom data in your indices.", + description="An object with custom data. You can store up to 32 kB as custom data. ", alias="userData", ) custom_normalization: Optional[Dict[str, Dict[str, StrictStr]]] = Field( default=None, - description="A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). ", alias="customNormalization", ) attribute_for_distinct: Optional[StrictStr] = Field( default=None, - description="Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).", + description="Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. ", alias="attributeForDistinct", ) @@ -139,6 +146,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { + "attributesForFaceting": obj.get("attributesForFaceting"), "replicas": obj.get("replicas"), "paginationLimitedTo": obj.get("paginationLimitedTo"), "unretrievableAttributes": obj.get("unretrievableAttributes"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params.py index 565d1b595e..745db50246 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.search.models.around_precision import AroundPrecision from algoliasearch.search.models.around_radius import AroundRadius @@ -23,17 +23,15 @@ class BaseSearchParams(BaseModel): BaseSearchParams """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -45,42 +43,41 @@ class BaseSearchParams(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -89,60 +86,75 @@ class BaseSearchParams(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -151,12 +163,12 @@ class BaseSearchParams(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) @@ -248,7 +260,6 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params_without_query.py b/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params_without_query.py index 355c142b9c..e0c93d494d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params_without_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_params_without_query.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.search.models.around_precision import AroundPrecision from algoliasearch.search.models.around_radius import AroundRadius @@ -25,12 +25,12 @@ class BaseSearchParamsWithoutQuery(BaseModel): similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -42,42 +42,41 @@ class BaseSearchParamsWithoutQuery(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -86,60 +85,75 @@ class BaseSearchParamsWithoutQuery(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -148,12 +162,12 @@ class BaseSearchParamsWithoutQuery(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) @@ -244,7 +258,6 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_response.py index f956ec498d..3394640bf2 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/base_search_response.py @@ -39,7 +39,7 @@ class BaseSearchResponse(BaseModel): ) automatic_radius: Optional[StrictStr] = Field( default=None, - description="Automatically-computed radius.", + description="Distance from a central coordinate provided by `aroundLatLng`.", alias="automaticRadius", ) exhaustive: Optional[Exhaustive] = None @@ -59,8 +59,7 @@ class BaseSearchResponse(BaseModel): alias="exhaustiveTypo", ) facets: Optional[Dict[str, Dict[str, StrictInt]]] = Field( - default=None, - description="Mapping of each facet name to the corresponding facet counts.", + default=None, description="Facet counts." ) facets_stats: Optional[Dict[str, FacetsStats]] = Field( default=None, description="Statistics for numerical facets." @@ -79,19 +78,17 @@ class BaseSearchResponse(BaseModel): message: Optional[StrictStr] = Field( default=None, description="Warnings about the query." ) - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") nb_pages: StrictInt = Field( - description="Number of pages of results for the current query.", alias="nbPages" + description="Number of pages of results.", alias="nbPages" ) nb_sorted_hits: Optional[StrictInt] = Field( default=None, description="Number of hits selected and sorted by the relevant sort algorithm.", alias="nbSortedHits", ) - page: StrictInt = Field( - description="Page to retrieve (the first page is `0`, not `1`)." + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Page of search results to retrieve." ) parsed_query: Optional[StrictStr] = Field( default=None, @@ -128,7 +125,7 @@ class BaseSearchResponse(BaseModel): ) user_data: Optional[Any] = Field( default=None, - description="Lets you store custom data in your indices.", + description="An object with custom data. You can store up to 32 kB as custom data. ", alias="userData", ) query_id: Optional[StrictStr] = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/batch_dictionary_entries_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/batch_dictionary_entries_params.py index f64cd37bff..34896b4ad5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/batch_dictionary_entries_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/batch_dictionary_entries_params.py @@ -17,16 +17,16 @@ class BatchDictionaryEntriesParams(BaseModel): """ - `batchDictionaryEntries` parameters. + Request body for updating dictionary entries. """ clear_existing_dictionary_entries: Optional[StrictBool] = Field( default=False, - description="Incidates whether to replace all custom entries in the dictionary with the ones sent with this request.", + description="Whether to replace all custom entries in the dictionary with the ones sent with this request.", alias="clearExistingDictionaryEntries", ) requests: List[BatchDictionaryEntriesRequest] = Field( - description="Operations to batch." + description="List of additions and deletions to your dictionaries." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/batch_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/batch_response.py index 1f8687252d..67ab61229e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/batch_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/batch_response.py @@ -17,11 +17,11 @@ class BatchResponse(BaseModel): """ task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) object_ids: List[StrictStr] = Field( - description="Unique object (record) identifiers.", alias="objectIDs" + description="Unique record identifiers.", alias="objectIDs" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py b/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py index 0e2aaa361d..11799284cc 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.search.models.advanced_syntax_features import AdvancedSyntaxFeatures from algoliasearch.search.models.alternatives_as_exact import AlternativesAsExact @@ -40,17 +40,15 @@ class BrowseParamsObject(BaseModel): BrowseParamsObject """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -62,42 +60,41 @@ class BrowseParamsObject(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -106,60 +103,75 @@ class BrowseParamsObject(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -168,56 +180,51 @@ class BrowseParamsObject(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -227,7 +234,7 @@ class BrowseParamsObject(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -235,23 +242,23 @@ class BrowseParamsObject(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -260,27 +267,25 @@ class BrowseParamsObject(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -293,17 +298,17 @@ class BrowseParamsObject(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -311,48 +316,48 @@ class BrowseParamsObject(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -360,7 +365,7 @@ class BrowseParamsObject(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -368,7 +373,7 @@ class BrowseParamsObject(BaseModel): ) cursor: Optional[StrictStr] = Field( default=None, - description="Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. ", + description="Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} @@ -481,14 +486,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/browse_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/browse_response.py index f058a66e7b..02efe576ca 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/browse_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/browse_response.py @@ -40,7 +40,7 @@ class BrowseResponse(BaseModel): ) automatic_radius: Optional[StrictStr] = Field( default=None, - description="Automatically-computed radius.", + description="Distance from a central coordinate provided by `aroundLatLng`.", alias="automaticRadius", ) exhaustive: Optional[Exhaustive] = None @@ -60,8 +60,7 @@ class BrowseResponse(BaseModel): alias="exhaustiveTypo", ) facets: Optional[Dict[str, Dict[str, StrictInt]]] = Field( - default=None, - description="Mapping of each facet name to the corresponding facet counts.", + default=None, description="Facet counts." ) facets_stats: Optional[Dict[str, FacetsStats]] = Field( default=None, description="Statistics for numerical facets." @@ -80,19 +79,17 @@ class BrowseResponse(BaseModel): message: Optional[StrictStr] = Field( default=None, description="Warnings about the query." ) - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") nb_pages: StrictInt = Field( - description="Number of pages of results for the current query.", alias="nbPages" + description="Number of pages of results.", alias="nbPages" ) nb_sorted_hits: Optional[StrictInt] = Field( default=None, description="Number of hits selected and sorted by the relevant sort algorithm.", alias="nbSortedHits", ) - page: StrictInt = Field( - description="Page to retrieve (the first page is `0`, not `1`)." + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Page of search results to retrieve." ) parsed_query: Optional[StrictStr] = Field( default=None, @@ -129,7 +126,7 @@ class BrowseResponse(BaseModel): ) user_data: Optional[Dict[str, Any]] = Field( default=None, - description="Lets you store custom data in your indices.", + description="An object with custom data. You can store up to 32 kB as custom data. ", alias="userData", ) query_id: Optional[StrictStr] = Field( @@ -137,14 +134,16 @@ class BrowseResponse(BaseModel): description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).", alias="queryID", ) - hits: List[Hit] - query: StrictStr = Field(description="Text to search for in an index.") + hits: List[Hit] = Field( + description="Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. " + ) + query: StrictStr = Field(description="Search query.") params: StrictStr = Field( description="URL-encoded string of all search parameters." ) cursor: Optional[StrictStr] = Field( default=None, - description="Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. ", + description="Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. ", ) @field_validator("around_lat_lng") diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation.py b/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation.py index 0454fdd2c4..8bc1011342 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation.py @@ -15,12 +15,12 @@ class BuiltInOperation(BaseModel): """ - To update an attribute without pushing the entire record, you can use these built-in operations. + Update to perform on the attribute. """ operation: BuiltInOperationType = Field(alias="_operation") value: StrictStr = Field( - description="Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value." + description="Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation_type.py b/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation_type.py index c7ed3cb56d..aff5e36057 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation_type.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/built_in_operation_type.py @@ -12,7 +12,7 @@ class BuiltInOperationType(str, Enum): """ - Operation to apply to the attribute. + How to change the attribute. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/condition.py b/clients/algoliasearch-client-python/algoliasearch/search/models/condition.py index 05f86148f0..2c3cc8307a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/condition.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/condition.py @@ -6,9 +6,10 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, Optional, Self +from re import match +from typing import Annotated, Any, Dict, Optional, Self -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator from algoliasearch.search.models.anchoring import Anchoring @@ -19,16 +20,32 @@ class Condition(BaseModel): """ pattern: Optional[StrictStr] = Field( - default=None, description="Query pattern syntax." + default=None, + description='Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as "comedy". ', ) anchoring: Optional[Anchoring] = None alternatives: Optional[StrictBool] = Field( default=False, - description="Whether the pattern matches on plurals, synonyms, and typos.", + description="Whether the pattern should match plurals, synonyms, and typos.", ) - context: Optional[StrictStr] = Field( - default=None, description="Rule context format: [A-Za-z0-9_-]+)." + context: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description="An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. ", ) + filters: Optional[StrictStr] = Field( + default=None, + description="Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. ", + ) + + @field_validator("context") + def context_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not match(r"[A-Za-z0-9_-]+", value): + raise ValueError(r"must validate the regular expression /[A-Za-z0-9_-]+/") + return value model_config = {"populate_by_name": True, "validate_assignment": True} @@ -72,6 +89,7 @@ def from_dict(cls, obj: Dict) -> Self: "anchoring": obj.get("anchoring"), "alternatives": obj.get("alternatives"), "context": obj.get("context"), + "filters": obj.get("filters"), } ) return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence.py b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence.py index 33443d5f76..1b9e48cbee 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Optional, Self +from typing import Annotated, Any, Dict, List, Optional, Self from pydantic import BaseModel, Field, StrictBool @@ -17,25 +17,25 @@ class Consequence(BaseModel): """ - [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). """ params: Optional[ConsequenceParams] = None - promote: Optional[List[Promote]] = Field( - default=None, description="Records to promote." + promote: Optional[Annotated[List[Promote], Field(max_length=300)]] = Field( + default=None, + description="Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. ", ) filter_promotes: Optional[StrictBool] = Field( default=False, - description="Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters.", + description='Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the "red" record won\'t be shown. ', alias="filterPromotes", ) - hide: Optional[List[ConsequenceHide]] = Field( - default=None, - description="Records to hide. By default, you can hide up to 50 records per rule.", + hide: Optional[Annotated[List[ConsequenceHide], Field(max_length=50)]] = Field( + default=None, description="Records you want to hide from the search results." ) user_data: Optional[Any] = Field( default=None, - description="Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON.", + description="A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. ", alias="userData", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_hide.py b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_hide.py index 1832b8008e..88b020b71e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_hide.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_hide.py @@ -13,11 +13,11 @@ class ConsequenceHide(BaseModel): """ - Unique identifier of the record to hide. + Object ID of the record to hide. """ object_id: StrictStr = Field( - description="Unique object identifier.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py index 36cec36dd5..c9f5dc3d6f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.search.models.advanced_syntax_features import AdvancedSyntaxFeatures from algoliasearch.search.models.alternatives_as_exact import AlternativesAsExact @@ -44,12 +44,12 @@ class ConsequenceParams(BaseModel): similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -61,42 +61,41 @@ class ConsequenceParams(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -105,60 +104,75 @@ class ConsequenceParams(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -167,56 +181,51 @@ class ConsequenceParams(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -226,7 +235,7 @@ class ConsequenceParams(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -234,23 +243,23 @@ class ConsequenceParams(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -259,27 +268,25 @@ class ConsequenceParams(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -292,17 +299,17 @@ class ConsequenceParams(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -310,48 +317,48 @@ class ConsequenceParams(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -359,7 +366,7 @@ class ConsequenceParams(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -490,14 +497,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query.py b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query.py index 38704fbece..0982691442 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query.py @@ -15,7 +15,7 @@ class ConsequenceQuery(BaseModel): """ - When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. """ oneof_schema_1_validator: Optional[ConsequenceQueryObject] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query_object.py b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query_object.py index 64c53851e7..5961eb0136 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query_object.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_query_object.py @@ -19,9 +19,11 @@ class ConsequenceQueryObject(BaseModel): """ remove: Optional[List[StrictStr]] = Field( - default=None, description="Words to remove." + default=None, description="Words to remove from the search query." + ) + edits: Optional[List[Edit]] = Field( + default=None, description="Changes to make to the search query." ) - edits: Optional[List[Edit]] = Field(default=None, description="Edits to apply.") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/created_at_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/created_at_response.py index 277799f29d..c4a911ff05 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/created_at_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/created_at_response.py @@ -17,7 +17,7 @@ class CreatedAtResponse(BaseModel): """ created_at: StrictStr = Field( - description="Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.", + description="Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.", alias="createdAt", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/cursor.py b/clients/algoliasearch-client-python/algoliasearch/search/models/cursor.py index bc8563bb34..e5bd185ac3 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/cursor.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/cursor.py @@ -18,7 +18,7 @@ class Cursor(BaseModel): cursor: Optional[StrictStr] = Field( default=None, - description="Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. ", + description="Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/delete_by_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/delete_by_params.py index 45f7db387e..3bccebe5d8 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/delete_by_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/delete_by_params.py @@ -6,9 +6,9 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Optional, Self, Union +from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictStr from algoliasearch.search.models.around_radius import AroundRadius from algoliasearch.search.models.facet_filters import FacetFilters @@ -24,7 +24,7 @@ class DeleteByParams(BaseModel): facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) numeric_filters: Optional[NumericFilters] = Field( default=None, alias="numericFilters" @@ -32,18 +32,36 @@ class DeleteByParams(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/deleted_at_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/deleted_at_response.py index 3c91a7694e..e431609730 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/deleted_at_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/deleted_at_response.py @@ -17,7 +17,7 @@ class DeletedAtResponse(BaseModel): """ task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) deleted_at: StrictStr = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry.py b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry.py index d01482b99c..74154fd0ea 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry.py @@ -19,22 +19,22 @@ class DictionaryEntry(BaseModel): """ object_id: StrictStr = Field( - description="Unique identifier for a dictionary object.", alias="objectID" + description="Unique identifier for the dictionary entry.", alias="objectID" ) language: StrictStr = Field( - description="[Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). " + description="ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/)." ) word: Optional[StrictStr] = Field( default=None, - description='Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia\'s standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into "kopf" and "kino". When `decomposition` isn\'t empty: creates a decomposition exception. For example, when decomposition is set to the ["hund", "hutte"] exception, "hundehutte" decomposes into “hund” and “hutte”, discarding the linking "e". ', + description="Matching dictionary word for `stopwords` and `compounds` dictionaries.", ) words: Optional[List[StrictStr]] = Field( default=None, - description="Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. ", + description="Matching words in the `plurals` dictionary including declensions.", ) decomposition: Optional[List[StrictStr]] = Field( default=None, - description="For compound entries, governs the behavior of the `word` parameter.", + description="Invividual components of a compound word in the `compounds` dictionary.", ) state: Optional[DictionaryEntryState] = None additional_properties: Dict[str, Any] = {} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry_state.py b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry_state.py index 1ad4bcac3b..2ee5abf395 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry_state.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_entry_state.py @@ -12,7 +12,7 @@ class DictionaryEntryState(str, Enum): """ - Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). + Whether a dictionary entry is active. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_language.py b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_language.py index 6f373c6d95..ab79e83858 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_language.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_language.py @@ -13,12 +13,12 @@ class DictionaryLanguage(BaseModel): """ - Custom entries for a dictionary. + Dictionary type. If `null`, this dictionary type isn't supported for the language. """ nb_custom_entries: Optional[StrictInt] = Field( default=None, - description="If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. ", + description="Number of custom dictionary entries.", alias="nbCustomEntries", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_settings_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_settings_params.py index 976042972c..c535b78855 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_settings_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/dictionary_settings_params.py @@ -15,7 +15,7 @@ class DictionarySettingsParams(BaseModel): """ - Enable or turn off the built-in Algolia stop words for a specific language. + Turn on or off the built-in Algolia stop words for a specific language. """ disable_standard_entries: StandardEntries = Field(alias="disableStandardEntries") diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/distinct.py b/clients/algoliasearch-client-python/algoliasearch/search/models/distinct.py index fc7a66ef7b..f41ca8ef7f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/distinct.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/distinct.py @@ -13,13 +13,19 @@ class Distinct(BaseModel): """ - Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. """ - oneof_schema_1_validator: Optional[StrictBool] = None + oneof_schema_1_validator: Optional[StrictBool] = Field( + default=None, + description="Whether deduplication is turned on. If true, only one member of a group is shown in the search results.", + ) oneof_schema_2_validator: Optional[ Annotated[int, Field(le=4, strict=True, ge=0)] - ] = 0 + ] = Field( + default=0, + description="Number of members of a group of records to include in the search results. - Don't use `distinct > 1` for records that might be [promoted by rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/). The number of hits won't be correct and faceting won't work as expected. - With `distinct > 1`, the `hitsPerPage` parameter controls the number of returned groups. For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned. Likewise, the `nbHits` response attribute contains the number of returned groups. ", + ) actual_instance: Optional[Union[bool, int]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/edit.py b/clients/algoliasearch-client-python/algoliasearch/search/models/edit.py index d5518501e9..33452faca4 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/edit.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/edit.py @@ -24,7 +24,7 @@ class Edit(BaseModel): ) insert: Optional[StrictStr] = Field( default=None, - description="Text that should be inserted in place of the removed text inside the query string.", + description="Text to be added in place of the deleted text inside the query string.", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/exact_on_single_word_query.py b/clients/algoliasearch-client-python/algoliasearch/search/models/exact_on_single_word_query.py index 5a9253b0d8..f63706c805 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/exact_on_single_word_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/exact_on_single_word_query.py @@ -12,7 +12,7 @@ class ExactOnSingleWordQuery(str, Enum): """ - Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word. + Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
attribute
The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored on single-word searches.
word
The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won't. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/facet_filters.py b/clients/algoliasearch-client-python/algoliasearch/search/models/facet_filters.py index 6fd5a5c1d2..70f98d319a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/facet_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/facet_filters.py @@ -15,7 +15,7 @@ class FacetFilters(BaseModel): """ - [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/facet_hits.py b/clients/algoliasearch-client-python/algoliasearch/search/models/facet_hits.py index ce403a52b4..94ab67037f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/facet_hits.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/facet_hits.py @@ -18,10 +18,10 @@ class FacetHits(BaseModel): value: StrictStr = Field(description="Facet value.") highlighted: StrictStr = Field( - description="Markup text with `facetQuery` matches highlighted." + description="Highlighted attribute value, including HTML tags." ) count: StrictInt = Field( - description="Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-)." + description="Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-)." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/facet_ordering.py b/clients/algoliasearch-client-python/algoliasearch/search/models/facet_ordering.py index bd2c10cafc..bca24d6816 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/facet_ordering.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/facet_ordering.py @@ -16,12 +16,12 @@ class FacetOrdering(BaseModel): """ - Defines the ordering of facets (widgets). + Order of facet names and facet values in your UI. """ facets: Optional[Facets] = None values: Optional[Dict[str, Value]] = Field( - default=None, description="Ordering of facet values within an individual facet." + default=None, description="Order of facet values. One object for each facet." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/facets.py b/clients/algoliasearch-client-python/algoliasearch/search/models/facets.py index 66f9fdacd5..a158fbeaa1 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/facets.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/facets.py @@ -13,11 +13,12 @@ class Facets(BaseModel): """ - Ordering of facets (widgets). + Order of facet names. """ order: Optional[List[StrictStr]] = Field( - default=None, description="Pinned order of facet lists." + default=None, + description="Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/get_api_key_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/get_api_key_response.py index 00414c4c76..38165b6f39 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/get_api_key_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/get_api_key_response.py @@ -24,38 +24,38 @@ class GetApiKeyResponse(BaseModel): alias="createdAt", ) acl: List[Acl] = Field( - description="[Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. " + description="Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). " ) description: Optional[StrictStr] = Field( default="", - description="Description of an API key for you and your team members.", + description="Description of an API key to help you identify this API key.", ) indexes: Optional[List[StrictStr]] = Field( default=None, - description='Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with "dev_" - `*_dev` matches all indices ending with "_dev" - `*_products_*` matches all indices containing "_products_". ', + description='Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with "dev_". - `*_dev` matches all indices ending with "_dev". - `*_products_*` matches all indices containing "_products_". ', ) max_hits_per_query: Optional[StrictInt] = Field( default=0, - description="Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. ", + description="Maximum number of results this API key can retrieve in one query. By default, there's no limit. ", alias="maxHitsPerQuery", ) max_queries_per_ip_per_hour: Optional[StrictInt] = Field( default=0, - description="Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. ", + description="Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. ", alias="maxQueriesPerIPPerHour", ) query_parameters: Optional[StrictStr] = Field( default="", - description="Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. ", + description="Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. ", alias="queryParameters", ) referers: Optional[List[StrictStr]] = Field( default=None, - description='Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/*` matches all referrers starting with "https://algolia.com/" - `*.algolia.com` matches all referrers ending with ".algolia.com" - `*algolia.com*` allows everything in the domain "algolia.com". ', + description='Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/*` allows all referrers starting with "https://algolia.com/" - `*.algolia.com` allows all referrers ending with ".algolia.com" - `*algolia.com*` allows all referrers in the domain "algolia.com". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). ', ) validity: Optional[StrictInt] = Field( default=0, - description="Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. ", + description="Duration (in seconds) after which the API key expires. By default, API keys don't expire. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_request.py b/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_request.py index 8d924a40dc..9e238fcbde 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_request.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_request.py @@ -13,18 +13,19 @@ class GetObjectsRequest(BaseModel): """ - Record retrieval operation. + Request body for retrieving records. """ attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to retrieve. If not specified, all retrievable attributes are returned.", + description="Attributes to retrieve. If not specified, all retrievable attributes are returned. ", alias="attributesToRetrieve", ) - object_id: StrictStr = Field(description="Record's objectID.", alias="objectID") + object_id: StrictStr = Field( + description="Object ID for the record to retrieve.", alias="objectID" + ) index_name: StrictStr = Field( - description="Name of the index containing the required records.", - alias="indexName", + description="Index from which to retrieve the records.", alias="indexName" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_response.py index 59d3cdc538..33ef78b577 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/get_objects_response.py @@ -16,7 +16,7 @@ class GetObjectsResponse(BaseModel): GetObjectsResponse """ - results: List[Dict[str, Any]] = Field(description="Retrieved results.") + results: List[Dict[str, Any]] = Field(description="Retrieved records.") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/has_pending_mappings_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/has_pending_mappings_response.py index 66067166bc..f146555174 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/has_pending_mappings_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/has_pending_mappings_response.py @@ -17,7 +17,7 @@ class HasPendingMappingsResponse(BaseModel): """ pending: StrictBool = Field( - description="Indicates whether there are clusters undergoing migration, creation, or deletion." + description="Whether there are clusters undergoing migration, creation, or deletion." ) clusters: Optional[Dict[str, List[StrictStr]]] = Field( default=None, diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result.py b/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result.py index a0b6804a79..18c4c07727 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result.py @@ -21,11 +21,11 @@ class HighlightResult(BaseModel): oneof_schema_1_validator: Optional[HighlightResultOption] = None oneof_schema_2_validator: Optional[Dict[str, HighlightResultOption]] = Field( default=None, - description="Show highlighted section and words matched on a query.", + description="Surround words that match the query with HTML tags for highlighting.", ) oneof_schema_3_validator: Optional[List[HighlightResultOption]] = Field( default=None, - description="Show highlighted section and words matched on a query.", + description="Surround words that match the query with HTML tags for highlighting.", ) actual_instance: Optional[ Union[ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result_option.py b/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result_option.py index a83b4882fb..ad9226547b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result_option.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/highlight_result_option.py @@ -15,16 +15,15 @@ class HighlightResultOption(BaseModel): """ - Show highlighted section and words matched on a query. + Surround words that match the query with HTML tags for highlighting. """ value: StrictStr = Field( - description="Markup text with `facetQuery` matches highlighted." + description="Highlighted attribute value, including HTML tags." ) match_level: MatchLevel = Field(alias="matchLevel") matched_words: List[StrictStr] = Field( - description="List of words from the query that matched the object.", - alias="matchedWords", + description="List of matched words from the search query.", alias="matchedWords" ) fully_highlighted: Optional[StrictBool] = Field( default=None, diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/hit.py b/clients/algoliasearch-client-python/algoliasearch/search/models/hit.py index 5e1fa7d00c..f5e6d5e423 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/hit.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/hit.py @@ -17,20 +17,20 @@ class Hit(BaseModel): """ - A single hit. + Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. """ object_id: StrictStr = Field( - description="Unique object identifier.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) highlight_result: Optional[Dict[str, HighlightResult]] = Field( default=None, - description="Show highlighted section and words matched on a query.", + description="Surround words that match the query with HTML tags for highlighting.", alias="_highlightResult", ) snippet_result: Optional[Dict[str, SnippetResult]] = Field( default=None, - description="Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.", + description="Snippets that show the context around a matching search query.", alias="_snippetResult", ) ranking_info: Optional[RankingInfo] = Field(default=None, alias="_rankingInfo") diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/ignore_plurals.py b/clients/algoliasearch-client-python/algoliasearch/search/models/ignore_plurals.py index 2b1ac725e2..8f7bfac03a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/ignore_plurals.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/ignore_plurals.py @@ -8,16 +8,26 @@ from json import dumps, loads from typing import Dict, List, Optional, Self, Union -from pydantic import BaseModel, StrictBool, StrictStr, ValidationError, model_serializer +from pydantic import ( + BaseModel, + Field, + StrictBool, + StrictStr, + ValidationError, + model_serializer, +) class IgnorePlurals(BaseModel): """ - Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. """ oneof_schema_1_validator: Optional[List[StrictStr]] = None - oneof_schema_2_validator: Optional[StrictBool] = False + oneof_schema_2_validator: Optional[StrictBool] = Field( + default=False, + description="If true, `ignorePlurals` is active for all languages included in `queryLanguages`, or for all supported languages, if `queryLanguges` is empty. If false, singulars, plurals, and other declensions won't be considered equivalent. ", + ) actual_instance: Optional[Union[List[str], bool]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py b/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py index a9a8f9f897..d0973d3c85 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py @@ -31,130 +31,132 @@ class IndexSettings(BaseModel): """ - Algolia index settings. + Index settings. """ + attributes_for_faceting: Optional[List[StrictStr]] = Field( + default=None, + description='Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly("ATTRIBUTE")
Allows using this attribute as a filter, but doesn\'t evalue the facet values.
searchable("ATTRIBUTE")
Allows searching for facet values.
afterDistinct("ATTRIBUTE")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. ', + alias="attributesForFaceting", + ) replicas: Optional[List[StrictStr]] = Field( default=None, - description="Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings.", + description="Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). ", ) - pagination_limited_to: Optional[StrictInt] = Field( + pagination_limited_to: Optional[ + Annotated[int, Field(le=20000, strict=True)] + ] = Field( default=1000, - description="Maximum number of hits accessible through pagination.", + description="Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. ", alias="paginationLimitedTo", ) unretrievable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes that can't be retrieved at query time.", + description="Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. ", alias="unretrievableAttributes", ) disable_typo_tolerance_on_words: Optional[List[StrictStr]] = Field( default=None, - description="Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. ", alias="disableTypoToleranceOnWords", ) attributes_to_transliterate: Optional[List[StrictStr]] = Field( default=None, - description="Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana.", + description="Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. ", alias="attributesToTransliterate", ) camel_case_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.", + description="Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.", alias="camelCaseAttributes", ) decompounded_attributes: Optional[Dict[str, Any]] = Field( default=None, - description="Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies.", + description='Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, "firefighter". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). ', alias="decompoundedAttributes", ) index_languages: Optional[List[StrictStr]] = Field( default=None, - description="Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="indexLanguages", ) disable_prefix_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).", + description="Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).", alias="disablePrefixOnAttributes", ) allow_compression_of_integer_array: Optional[StrictBool] = Field( default=False, - description="Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. ", + description="Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. ", alias="allowCompressionOfIntegerArray", ) numeric_attributes_for_filtering: Optional[List[StrictStr]] = Field( default=None, - description="Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).", + description='Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly("ATTRIBUTE")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. ', alias="numericAttributesForFiltering", ) separators_to_index: Optional[StrictStr] = Field( default="", - description="Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥.", + description="Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. ", alias="separatorsToIndex", ) searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="[Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). ", + description='Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `"title,alternate_title"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered("ATTRIBUTE")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. ', alias="searchableAttributes", ) user_data: Optional[Dict[str, Any]] = Field( default=None, - description="Lets you store custom data in your indices.", + description="An object with custom data. You can store up to 32 kB as custom data. ", alias="userData", ) custom_normalization: Optional[Dict[str, Dict[str, StrictStr]]] = Field( default=None, - description="A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). ", alias="customNormalization", ) attribute_for_distinct: Optional[StrictStr] = Field( default=None, - description="Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).", + description="Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. ", alias="attributeForDistinct", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -164,7 +166,7 @@ class IndexSettings(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -172,23 +174,23 @@ class IndexSettings(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -197,27 +199,25 @@ class IndexSettings(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -230,17 +230,17 @@ class IndexSettings(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -248,48 +248,48 @@ class IndexSettings(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -297,7 +297,7 @@ class IndexSettings(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -364,6 +364,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { + "attributesForFaceting": obj.get("attributesForFaceting"), "replicas": obj.get("replicas"), "paginationLimitedTo": obj.get("paginationLimitedTo"), "unretrievableAttributes": obj.get("unretrievableAttributes"), @@ -384,7 +385,6 @@ def from_dict(cls, obj: Dict) -> Self: "userData": obj.get("userData"), "customNormalization": obj.get("customNormalization"), "attributeForDistinct": obj.get("attributeForDistinct"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings_as_search_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings_as_search_params.py index f5a62932c4..6b84fa93b8 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings_as_search_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings_as_search_params.py @@ -34,48 +34,43 @@ class IndexSettingsAsSearchParams(BaseModel): IndexSettingsAsSearchParams """ - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -85,7 +80,7 @@ class IndexSettingsAsSearchParams(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -93,23 +88,23 @@ class IndexSettingsAsSearchParams(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -118,27 +113,25 @@ class IndexSettingsAsSearchParams(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -151,17 +144,17 @@ class IndexSettingsAsSearchParams(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -169,48 +162,48 @@ class IndexSettingsAsSearchParams(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -218,7 +211,7 @@ class IndexSettingsAsSearchParams(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -285,7 +278,6 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/log.py b/clients/algoliasearch-client-python/algoliasearch/search/models/log.py index a2e6fd8740..9955d81f81 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/log.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/log.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Optional, Self +from typing import Annotated, Any, Dict, List, Optional, Self from pydantic import BaseModel, Field, StrictStr @@ -19,27 +19,27 @@ class Log(BaseModel): """ timestamp: StrictStr = Field( - description="Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format." + description="Timestamp of the API request in ISO 8601 format." ) - method: StrictStr = Field(description="HTTP method of the performed request.") - answer_code: StrictStr = Field(description="HTTP response code.") - query_body: StrictStr = Field( - description="Request body. Truncated after 1,000 characters." + method: StrictStr = Field(description="HTTP method of the request.") + answer_code: StrictStr = Field(description="HTTP status code of the response.") + query_body: Annotated[str, Field(strict=True, max_length=1000)] = Field( + description="Request body." ) - answer: StrictStr = Field( - description="Answer body. Truncated after 1,000 characters." + answer: Annotated[str, Field(strict=True, max_length=1000)] = Field( + description="Response body." ) - url: StrictStr = Field(description="Request URL.") + url: StrictStr = Field(description="URL of the API endpoint.") ip: StrictStr = Field( description="IP address of the client that performed the request." ) query_headers: StrictStr = Field( - description="Request headers (API key is obfuscated)." + description="Request headers (API keys are obfuscated)." ) sha1: StrictStr = Field(description="SHA1 signature of the log entry.") - nb_api_calls: StrictStr = Field(description="Number of API calls.") + nb_api_calls: StrictStr = Field(description="Number of API requests.") processing_time_ms: StrictStr = Field( - description="Processing time for the query. Doesn't include network time." + description="Processing time for the query in milliseconds. This doesn't include latency due to the network. " ) index: Optional[StrictStr] = Field( default=None, description="Index targeted by the query." @@ -50,10 +50,11 @@ class Log(BaseModel): alias="query_params", ) query_nb_hits: Optional[StrictStr] = Field( - default=None, description="Number of hits returned for the query." + default=None, + description="Number of search results (hits) returned for the query.", ) inner_queries: Optional[List[LogQuery]] = Field( - default=None, description="Performed queries for the given request." + default=None, description="Queries performed for the given request." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/log_query.py b/clients/algoliasearch-client-python/algoliasearch/search/models/log_query.py index 8b8230771e..d27a1cac23 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/log_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/log_query.py @@ -20,7 +20,7 @@ class LogQuery(BaseModel): default=None, description="Index targeted by the query." ) user_token: Optional[StrictStr] = Field( - default=None, description="User identifier." + default=None, description="A user identifier." ) query_id: Optional[StrictStr] = Field( default=None, description="Unique query identifier." diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/match_level.py b/clients/algoliasearch-client-python/algoliasearch/search/models/match_level.py index 7841aeb95f..69bc530e5b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/match_level.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/match_level.py @@ -12,7 +12,7 @@ class MatchLevel(str, Enum): """ - Indicates how well the attribute matched the search query. + Whether the whole query string matches or only a part. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/mode.py b/clients/algoliasearch-client-python/algoliasearch/search/models/mode.py index 6f608c16a0..9fff79f9e6 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/mode.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/mode.py @@ -12,7 +12,7 @@ class Mode(str, Enum): """ - Search mode the index will use to query for results. + Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/multiple_batch_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/multiple_batch_response.py index bea4e068c3..c4b86e924c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/multiple_batch_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/multiple_batch_response.py @@ -17,10 +17,10 @@ class MultipleBatchResponse(BaseModel): """ task_id: Dict[str, StrictInt] = Field( - description="TaskIDs per index.", alias="taskID" + description="Task IDs. One for each index.", alias="taskID" ) object_ids: List[StrictStr] = Field( - description="Unique object (record) identifiers.", alias="objectIDs" + description="Unique record identifiers.", alias="objectIDs" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/numeric_filters.py b/clients/algoliasearch-client-python/algoliasearch/search/models/numeric_filters.py index add12cfdbf..8e998aad03 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/numeric_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/numeric_filters.py @@ -15,7 +15,7 @@ class NumericFilters(BaseModel): """ - [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/operation_index_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/operation_index_params.py index ddac2a7342..5cb7cb84cd 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/operation_index_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/operation_index_params.py @@ -20,10 +20,10 @@ class OperationIndexParams(BaseModel): """ operation: OperationType - destination: StrictStr = Field(description="Algolia index name.") + destination: StrictStr = Field(description="Index name.") scope: Optional[List[ScopeType]] = Field( default=None, - description="**This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied.", + description="**Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/operation_type.py b/clients/algoliasearch-client-python/algoliasearch/search/models/operation_type.py index 45ec8e05d0..7e135cc2c7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/operation_type.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/operation_type.py @@ -12,7 +12,7 @@ class OperationType(str, Enum): """ - Operation to perform (_move_ or _copy_). + Operation to perform on the index. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/optional_filters.py b/clients/algoliasearch-client-python/algoliasearch/search/models/optional_filters.py index b23f507326..0b3941e905 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/optional_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/optional_filters.py @@ -15,7 +15,7 @@ class OptionalFilters(BaseModel): """ - Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/params.py index 533ef0af3f..f92bc9f3c2 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/params.py @@ -17,7 +17,7 @@ class Params(BaseModel): """ - Additional search parameters. + Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. """ query: Optional[ConsequenceQuery] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_id.py b/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_id.py index d37bd6c2f7..f4119e087b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_id.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_id.py @@ -17,10 +17,10 @@ class PromoteObjectID(BaseModel): """ object_id: StrictStr = Field( - description="Unique identifier of the record to promote.", alias="objectID" + description="Unique record identifier.", alias="objectID" ) position: StrictInt = Field( - description="The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions." + description="Position in the search results where you want to show the promoted records." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_ids.py b/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_ids.py index 1aaab493e8..d6d0d44c19 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_ids.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/promote_object_ids.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Self +from typing import Annotated, Any, Dict, List, Self from pydantic import BaseModel, Field, StrictInt, StrictStr @@ -16,11 +16,12 @@ class PromoteObjectIDs(BaseModel): Records to promote. """ - object_ids: List[StrictStr] = Field( - description="Unique identifiers of the records to promote.", alias="objectIDs" + object_ids: Annotated[List[StrictStr], Field(max_length=100)] = Field( + description="Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. ", + alias="objectIDs", ) position: StrictInt = Field( - description="The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions." + description="Position in the search results where you want to show the promoted records." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/query_type.py b/clients/algoliasearch-client-python/algoliasearch/search/models/query_type.py index 6f70b2e8ac..388d0a8f2b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/query_type.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/query_type.py @@ -12,7 +12,7 @@ class QueryType(str, Enum): """ - Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/ranking_info.py b/clients/algoliasearch-client-python/algoliasearch/search/models/ranking_info.py index 6bf590be94..e9f2b4e44d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/ranking_info.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/ranking_info.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, Optional, Self +from typing import Annotated, Any, Dict, Optional, Self from pydantic import BaseModel, Field, StrictBool, StrictInt @@ -16,19 +16,21 @@ class RankingInfo(BaseModel): """ - RankingInfo + Object with detailed information about the record's ranking. """ - filters: StrictInt = Field(description="This field is reserved for advanced usage.") - first_matched_word: StrictInt = Field( - description="Position of the most important matched attribute in the attributes to index list.", + filters: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Whether a filter matched the query." + ) + first_matched_word: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Position of the first matched word in the best matching attribute of the record.", alias="firstMatchedWord", ) - geo_distance: StrictInt = Field( + geo_distance: Annotated[int, Field(strict=True, ge=0)] = Field( description="Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).", alias="geoDistance", ) - geo_precision: Optional[StrictInt] = Field( + geo_precision: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, description="Precision used when computing the geo distance, in meters.", alias="geoPrecision", @@ -37,31 +39,31 @@ class RankingInfo(BaseModel): default=None, alias="matchedGeoLocation" ) personalization: Optional[Personalization] = None - nb_exact_words: StrictInt = Field( + nb_exact_words: Annotated[int, Field(strict=True, ge=0)] = Field( description="Number of exactly matched words.", alias="nbExactWords" ) - nb_typos: StrictInt = Field( + nb_typos: Annotated[int, Field(strict=True, ge=0)] = Field( description="Number of typos encountered when matching the record.", alias="nbTypos", ) promoted: StrictBool = Field( - description="Present and set to true if a Rule promoted the hit." + description="Whether the record was promoted by a rule." ) - proximity_distance: Optional[StrictInt] = Field( + proximity_distance: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( default=None, - description="When the query contains more than one word, the sum of the distances between matched words (in meters).", + description="Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.", alias="proximityDistance", ) user_score: StrictInt = Field( - description="Custom ranking for the object, expressed as a single integer value.", + description="Overall ranking of the record, expressed as a single integer. This attribute is internal.", alias="userScore", ) - words: StrictInt = Field( - description="Number of matched words, including prefixes and typos." + words: Annotated[int, Field(strict=True, ge=1)] = Field( + description="Number of matched words." ) promoted_by_re_ranking: Optional[StrictBool] = Field( default=None, - description="Wether the record are promoted by the re-ranking strategy.", + description="Whether the record is re-ranked.", alias="promotedByReRanking", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/re_ranking_apply_filter.py b/clients/algoliasearch-client-python/algoliasearch/search/models/re_ranking_apply_filter.py index dd523b79e3..4b9fb1140a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/re_ranking_apply_filter.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/re_ranking_apply_filter.py @@ -15,7 +15,7 @@ class ReRankingApplyFilter(BaseModel): """ - When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/remove_stop_words.py b/clients/algoliasearch-client-python/algoliasearch/search/models/remove_stop_words.py index 8ede2996fc..2eecddb4f7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/remove_stop_words.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/remove_stop_words.py @@ -8,16 +8,26 @@ from json import dumps, loads from typing import Dict, List, Optional, Self, Union -from pydantic import BaseModel, StrictBool, StrictStr, ValidationError, model_serializer +from pydantic import ( + BaseModel, + Field, + StrictBool, + StrictStr, + ValidationError, + model_serializer, +) class RemoveStopWords(BaseModel): """ - Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. """ oneof_schema_1_validator: Optional[List[StrictStr]] = None - oneof_schema_2_validator: Optional[StrictBool] = False + oneof_schema_2_validator: Optional[StrictBool] = Field( + default=False, + description="If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty. If false, stop words are not removed. ", + ) actual_instance: Optional[Union[List[str], bool]] = None def __init__(self, *args, **kwargs) -> None: diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/remove_words_if_no_results.py b/clients/algoliasearch-client-python/algoliasearch/search/models/remove_words_if_no_results.py index 3c97956ae1..d964a59a3a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/remove_words_if_no_results.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/remove_words_if_no_results.py @@ -12,7 +12,7 @@ class RemoveWordsIfNoResults(str, Enum): """ - Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn't match any hits. + Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty search results.
none
No words are removed when a query doesn't return results.
lastWords
Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.
firstWords
Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.
allOptional
Treat all words as optional.
For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/rendering_content.py b/clients/algoliasearch-client-python/algoliasearch/search/models/rendering_content.py index f2ac9226ab..9817f24c42 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/rendering_content.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/rendering_content.py @@ -15,7 +15,7 @@ class RenderingContent(BaseModel): """ - Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. """ facet_ordering: Optional[FacetOrdering] = Field(default=None, alias="facetOrdering") diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/rule.py b/clients/algoliasearch-client-python/algoliasearch/search/models/rule.py index 5fb30ad853..f6cd892ba0 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/rule.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/rule.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Any, Dict, List, Optional, Self +from typing import Annotated, Any, Dict, List, Optional, Self from pydantic import BaseModel, Field, StrictBool, StrictStr @@ -21,24 +21,24 @@ class Rule(BaseModel): """ object_id: StrictStr = Field( - description="Unique identifier for a rule object.", alias="objectID" + description="Unique identifier of a rule object.", alias="objectID" ) - conditions: Optional[List[Condition]] = Field( + conditions: Optional[ + Annotated[List[Condition], Field(min_length=0, max_length=25)] + ] = Field( default=None, - description="[Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. ", + description="Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). ", ) consequence: Optional[Consequence] = None description: Optional[StrictStr] = Field( default=None, - description="Description of the rule's purpose. This can be helpful for display in the Algolia dashboard.", + description="Description of the rule's purpose to help you distinguish between different rules.", ) enabled: Optional[StrictBool] = Field( - default=True, - description="Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time.", + default=True, description="Whether the rule is active." ) validity: Optional[List[TimeRange]] = Field( - default=None, - description="If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty.", + default=None, description="Time periods when the rule is active." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/save_object_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/save_object_response.py index 87c179f7f3..a904a244b6 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/save_object_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/save_object_response.py @@ -17,14 +17,15 @@ class SaveObjectResponse(BaseModel): """ created_at: StrictStr = Field( - description="Date of creation (ISO-8601 format).", alias="createdAt" + description="Timestamp when the record was added, in ISO 8601 format.", + alias="createdAt", ) task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) object_id: Optional[StrictStr] = Field( - default=None, description="Unique object identifier.", alias="objectID" + default=None, description="Unique record identifier.", alias="objectID" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/save_synonym_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/save_synonym_response.py index 9dea6af85c..d2d73aaf58 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/save_synonym_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/save_synonym_response.py @@ -17,7 +17,7 @@ class SaveSynonymResponse(BaseModel): """ task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) updated_at: StrictStr = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_params.py index 002656e236..ff8db1d8b1 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_params.py @@ -8,24 +8,24 @@ from json import loads from typing import Annotated, Any, Dict, Optional, Self -from pydantic import BaseModel, Field, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictStr class SearchDictionaryEntriesParams(BaseModel): """ - `searchDictionaryEntries` parameters. + Search parameter. """ - query: StrictStr = Field(description="Text to search for in an index.") - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + query: StrictStr = Field(description="Search query.") + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=20, description="Number of hits per page.", alias="hitsPerPage" ) language: Optional[StrictStr] = Field( default=None, - description="[Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). ", + description="ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/).", ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_response.py new file mode 100644 index 0000000000..f288d3b573 --- /dev/null +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_dictionary_entries_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +""" +from __future__ import annotations + +from json import loads +from typing import Annotated, Any, Dict, List, Self + +from pydantic import BaseModel, Field, StrictInt + +from algoliasearch.search.models.dictionary_entry import DictionaryEntry + + +class SearchDictionaryEntriesResponse(BaseModel): + """ + SearchDictionaryEntriesResponse + """ + + hits: List[DictionaryEntry] = Field( + description="Dictionary entries matching the search criteria." + ) + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Requested page of the API response." + ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") + nb_pages: StrictInt = Field( + description="Number of pages of results.", alias="nbPages" + ) + + model_config = {"populate_by_name": True, "validate_assignment": True} + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SearchDictionaryEntriesResponse from a JSON string""" + return cls.from_dict(loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + _dict = self.model_dump( + by_alias=True, + exclude={}, + exclude_none=True, + ) + _items = [] + if self.hits: + for _item in self.hits: + if _item: + _items.append(_item.to_dict()) + _dict["hits"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of SearchDictionaryEntriesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "hits": [DictionaryEntry.from_dict(_item) for _item in obj.get("hits")] + if obj.get("hits") is not None + else None, + "page": obj.get("page"), + "nbHits": obj.get("nbHits"), + "nbPages": obj.get("nbPages"), + } + ) + return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_request.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_request.py index c8df1bb062..925b8ea8b5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_request.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_request.py @@ -26,7 +26,7 @@ class SearchForFacetValuesRequest(BaseModel): ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_response.py index 794b09a6b7..5cdc8cdc0e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facet_values_response.py @@ -18,7 +18,9 @@ class SearchForFacetValuesResponse(BaseModel): SearchForFacetValuesResponse """ - facet_hits: List[FacetHits] = Field(alias="facetHits") + facet_hits: List[FacetHits] = Field( + description="Matching facet values.", alias="facetHits" + ) exhaustive_facets_count: StrictBool = Field( description="See the `facetsCount` field of the `exhaustive` object in the response.", alias="exhaustiveFacetsCount", diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py index 325b6b4c3c..5db4d199b5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.search.models.advanced_syntax_features import AdvancedSyntaxFeatures from algoliasearch.search.models.alternatives_as_exact import AlternativesAsExact @@ -44,17 +44,15 @@ class SearchForFacets(BaseModel): params: Optional[StrictStr] = Field( default="", description="Search parameters as a URL-encoded query string." ) - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -66,42 +64,41 @@ class SearchForFacets(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -110,60 +107,75 @@ class SearchForFacets(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -172,56 +184,51 @@ class SearchForFacets(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -231,7 +238,7 @@ class SearchForFacets(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -239,23 +246,23 @@ class SearchForFacets(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -264,27 +271,25 @@ class SearchForFacets(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -297,17 +302,17 @@ class SearchForFacets(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -315,48 +320,48 @@ class SearchForFacets(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -364,14 +369,14 @@ class SearchForFacets(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( default=None, alias="reRankingApplyFilter" ) facet: StrictStr = Field(description="Facet name.") - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") facet_query: Optional[StrictStr] = Field( default="", description="Text to search inside the facet's values.", @@ -490,14 +495,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets_options.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets_options.py index b8aa9e85de..082cef469d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets_options.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets_options.py @@ -19,7 +19,7 @@ class SearchForFacetsOptions(BaseModel): """ facet: StrictStr = Field(description="Facet name.") - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") facet_query: Optional[StrictStr] = Field( default="", description="Text to search inside the facet's values.", @@ -27,7 +27,7 @@ class SearchForFacetsOptions(BaseModel): ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) type: SearchTypeFacet diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py index c0046591fe..1032fc3fa7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.search.models.advanced_syntax_features import AdvancedSyntaxFeatures from algoliasearch.search.models.alternatives_as_exact import AlternativesAsExact @@ -44,17 +44,15 @@ class SearchForHits(BaseModel): params: Optional[StrictStr] = Field( default="", description="Search parameters as a URL-encoded query string." ) - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -66,42 +64,41 @@ class SearchForHits(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -110,60 +107,75 @@ class SearchForHits(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -172,56 +184,51 @@ class SearchForHits(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -231,7 +238,7 @@ class SearchForHits(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -239,23 +246,23 @@ class SearchForHits(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -264,27 +271,25 @@ class SearchForHits(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -297,17 +302,17 @@ class SearchForHits(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -315,48 +320,48 @@ class SearchForHits(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -364,13 +369,13 @@ class SearchForHits(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( default=None, alias="reRankingApplyFilter" ) - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") type: Optional[SearchTypeDefault] = None model_config = {"populate_by_name": True, "validate_assignment": True} @@ -484,14 +489,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits_options.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits_options.py index 7b7cd9cd6e..a4999e8293 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits_options.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits_options.py @@ -18,7 +18,7 @@ class SearchForHitsOptions(BaseModel): SearchForHitsOptions """ - index_name: StrictStr = Field(description="Algolia index name.", alias="indexName") + index_name: StrictStr = Field(description="Index name.", alias="indexName") type: Optional[SearchTypeDefault] = None model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_hits.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_hits.py index e3504a7001..c552047557 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_hits.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_hits.py @@ -18,8 +18,10 @@ class SearchHits(BaseModel): SearchHits """ - hits: List[Hit] - query: StrictStr = Field(description="Text to search for in an index.") + hits: List[Hit] = Field( + description="Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. " + ) + query: StrictStr = Field(description="Search query.") params: StrictStr = Field( description="URL-encoded string of all search parameters." ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py index 16751b5b9c..987c1f4387 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, List, Optional, Self, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr from algoliasearch.search.models.advanced_syntax_features import AdvancedSyntaxFeatures from algoliasearch.search.models.alternatives_as_exact import AlternativesAsExact @@ -40,17 +40,15 @@ class SearchParamsObject(BaseModel): SearchParamsObject """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") similar_query: Optional[StrictStr] = Field( default="", - description="Overrides the query parameter and performs a more generic search.", + description="Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. ", alias="similarQuery", ) filters: Optional[StrictStr] = Field( default="", - description="[Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. ", + description="Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). ", ) facet_filters: Optional[FacetFilters] = Field(default=None, alias="facetFilters") optional_filters: Optional[OptionalFilters] = Field( @@ -62,42 +60,41 @@ class SearchParamsObject(BaseModel): tag_filters: Optional[TagFilters] = Field(default=None, alias="tagFilters") sum_or_filters_scores: Optional[StrictBool] = Field( default=False, - description="Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. ", + description="Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). ", alias="sumOrFiltersScores", ) restrict_searchable_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).", + description="Restricts a search to a subset of your searchable attributes.", alias="restrictSearchableAttributes", ) facets: Optional[List[StrictStr]] = Field( default=None, - description="Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.", + description="Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). ", ) faceting_after_distinct: Optional[StrictBool] = Field( default=False, - description="Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. ", + description="Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. ", alias="facetingAfterDistinct", ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) offset: Optional[StrictInt] = Field( - default=None, - description="Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + default=None, description="Position of the first hit to retrieve." ) length: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=None, - description="Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). ", + description="Number of hits to retrieve (used in combination with `offset`).", ) around_lat_lng: Optional[StrictStr] = Field( default="", - description="Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.", + description="Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. ", alias="aroundLatLng", ) around_lat_lng_via_ip: Optional[StrictBool] = Field( default=False, - description="Search for entries around a location. The location is automatically computed from the requester's IP address.", + description="Whether to obtain the coordinates from the request's IP address.", alias="aroundLatLngViaIP", ) around_radius: Optional[AroundRadius] = Field(default=None, alias="aroundRadius") @@ -106,60 +103,75 @@ class SearchParamsObject(BaseModel): ) minimum_around_radius: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field( default=None, - description="Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.", + description="Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", alias="minimumAroundRadius", ) - inside_bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_bounding_box: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). ", alias="insideBoundingBox", ) - inside_polygon: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + inside_polygon: Optional[ + List[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ] + ] + ] = Field( default=None, - description="Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).", + description="Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. ", alias="insidePolygon", ) natural_languages: Optional[List[StrictStr]] = Field( default=None, - description="Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.", + description="ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. ", alias="naturalLanguages", ) rule_contexts: Optional[List[StrictStr]] = Field( default=None, - description="Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.", + description="Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. ", alias="ruleContexts", ) - personalization_impact: Optional[StrictInt] = Field( + personalization_impact: Optional[ + Annotated[int, Field(le=100, strict=True, ge=0)] + ] = Field( default=100, - description="Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).", + description="Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). ", alias="personalizationImpact", ) user_token: Optional[StrictStr] = Field( default=None, - description="Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.", + description="Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). ", alias="userToken", ) get_ranking_info: Optional[StrictBool] = Field( default=False, - description="Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).", + description="Whether the search response should include detailed ranking information.", alias="getRankingInfo", ) - explain: Optional[List[StrictStr]] = Field( - default=None, - description="Enriches the API's response with information about how the query was processed.", - ) synonyms: Optional[StrictBool] = Field( default=True, - description="Whether to take into account an index's synonyms for a particular search.", + description="Whether to take into account an index's synonyms for this search.", ) click_analytics: Optional[StrictBool] = Field( default=False, - description="Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).", + description="Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). ", alias="clickAnalytics", ) analytics: Optional[StrictBool] = Field( - default=True, - description="Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).", + default=True, description="Whether this search will be included in Analytics." ) analytics_tags: Optional[List[StrictStr]] = Field( default=None, @@ -168,56 +180,51 @@ class SearchParamsObject(BaseModel): ) percentile_computation: Optional[StrictBool] = Field( default=True, - description="Whether to include or exclude a query from the processing-time percentile computation.", + description="Whether to include this search when calculating processing-time percentiles.", alias="percentileComputation", ) enable_ab_test: Optional[StrictBool] = Field( default=True, - description="Incidates whether this search will be considered in A/B testing.", + description="Whether to enable A/B testing for this search.", alias="enableABTest", ) - attributes_for_faceting: Optional[List[StrictStr]] = Field( - default=None, - description="Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. ", - alias="attributesForFaceting", - ) attributes_to_retrieve: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.", + description='Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`. - The `objectID` attribute is always included. ', alias="attributesToRetrieve", ) ranking: Optional[List[StrictStr]] = Field( default=None, - description="Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).", + description='Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). ', ) custom_ranking: Optional[List[StrictStr]] = Field( default=None, - description="Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. ", + description='Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc("ATTRIBUTE")
Sort the index by the values of an attribute, in ascending order.
desc("ATTRIBUTE")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. ', alias="customRanking", ) relevancy_strictness: Optional[StrictInt] = Field( default=100, - description="Relevancy threshold below which less relevant results aren't included in the results.", + description="Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. ", alias="relevancyStrictness", ) attributes_to_highlight: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).", + description="Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). ", alias="attributesToHighlight", ) attributes_to_snippet: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. ", + description="Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. ", alias="attributesToSnippet", ) highlight_pre_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert before the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert before the highlighted parts in all highlighted results and snippets.", alias="highlightPreTag", ) highlight_post_tag: Optional[StrictStr] = Field( default="", - description="HTML string to insert after the highlighted parts in all highlight and snippet results.", + description="HTML tag to insert after the highlighted parts in all highlighted results and snippets.", alias="highlightPostTag", ) snippet_ellipsis_text: Optional[StrictStr] = Field( @@ -227,7 +234,7 @@ class SearchParamsObject(BaseModel): ) restrict_highlight_and_snippet_arrays: Optional[StrictBool] = Field( default=False, - description="Restrict highlighting and snippeting to items that matched the query.", + description="Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. ", alias="restrictHighlightAndSnippetArrays", ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( @@ -235,23 +242,23 @@ class SearchParamsObject(BaseModel): ) min_word_sizefor1_typo: Optional[StrictInt] = Field( default=4, - description="Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor1Typo", ) min_word_sizefor2_typos: Optional[StrictInt] = Field( default=8, - description="Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + description="Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", alias="minWordSizefor2Typos", ) typo_tolerance: Optional[TypoTolerance] = Field(default=None, alias="typoTolerance") allow_typos_on_numeric_tokens: Optional[StrictBool] = Field( default=True, - description='Whether to allow typos on numbers ("numeric tokens") in the query string.', + description="Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. ", alias="allowTyposOnNumericTokens", ) disable_typo_tolerance_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).", + description="Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. ", alias="disableTypoToleranceOnAttributes", ) ignore_plurals: Optional[IgnorePlurals] = Field(default=None, alias="ignorePlurals") @@ -260,27 +267,25 @@ class SearchParamsObject(BaseModel): ) keep_diacritics_on_characters: Optional[StrictStr] = Field( default="", - description="Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).", + description="Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. ", alias="keepDiacriticsOnCharacters", ) query_languages: Optional[List[StrictStr]] = Field( default=None, - description="Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.", + description="[ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). ", alias="queryLanguages", ) decompound_query: Optional[StrictBool] = Field( default=True, - description="[Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. ", + description="Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. ", alias="decompoundQuery", ) enable_rules: Optional[StrictBool] = Field( - default=True, - description="Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.", - alias="enableRules", + default=True, description="Whether to enable rules.", alias="enableRules" ) enable_personalization: Optional[StrictBool] = Field( default=False, - description="Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.", + description="Whether to enable Personalization.", alias="enablePersonalization", ) query_type: Optional[QueryType] = Field(default=None, alias="queryType") @@ -293,17 +298,17 @@ class SearchParamsObject(BaseModel): ) advanced_syntax: Optional[StrictBool] = Field( default=False, - description="Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).", + description="Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. ", alias="advancedSyntax", ) optional_words: Optional[List[StrictStr]] = Field( default=None, - description="Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.", + description='Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is "action video" and "video" is an optional word, the search engine runs two queries. One for "action video" and one for "action". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). ', alias="optionalWords", ) disable_exact_on_attributes: Optional[List[StrictStr]] = Field( default=None, - description="Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description="Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. ", alias="disableExactOnAttributes", ) exact_on_single_word_query: Optional[ExactOnSingleWordQuery] = Field( @@ -311,48 +316,48 @@ class SearchParamsObject(BaseModel): ) alternatives_as_exact: Optional[List[AlternativesAsExact]] = Field( default=None, - description="Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).", + description='Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as "NY/NYC" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as "NY/New York" are considered exact matches.
. ', alias="alternativesAsExact", ) advanced_syntax_features: Optional[List[AdvancedSyntaxFeatures]] = Field( default=None, - description="Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.", + description='Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain "search" but not "engine".
This setting only has an effect if `advancedSyntax` is true. ', alias="advancedSyntaxFeatures", ) distinct: Optional[Distinct] = None replace_synonyms_in_highlight: Optional[StrictBool] = Field( default=False, - description="Whether to highlight and snippet the original word that matches the synonym or the synonym itself.", + description='Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either "home" or "house" are included in the search results, and either "home" or "house" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of "house" are replaced by "home" in the highlighted response. ', alias="replaceSynonymsInHighlight", ) min_proximity: Optional[Annotated[int, Field(le=7, strict=True, ge=1)]] = Field( default=1, - description="Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).", + description="Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. ", alias="minProximity", ) response_fields: Optional[List[StrictStr]] = Field( default=None, - description="Attributes to include in the API response for search and browse queries.", + description="Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. ", alias="responseFields", ) max_facet_hits: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( default=10, - description="Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + description="Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", alias="maxFacetHits", ) - max_values_per_facet: Optional[StrictInt] = Field( + max_values_per_facet: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( default=100, description="Maximum number of facet values to return for each facet.", alias="maxValuesPerFacet", ) sort_facet_values_by: Optional[StrictStr] = Field( default="count", - description="Controls how facet values are fetched.", + description="Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). ", alias="sortFacetValuesBy", ) attribute_criteria_computed_by_min_proximity: Optional[StrictBool] = Field( default=False, - description="When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.", + description="Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. ", alias="attributeCriteriaComputedByMinProximity", ) rendering_content: Optional[RenderingContent] = Field( @@ -360,7 +365,7 @@ class SearchParamsObject(BaseModel): ) enable_re_ranking: Optional[StrictBool] = Field( default=True, - description="Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).", + description="Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. ", alias="enableReRanking", ) re_ranking_apply_filter: Optional[ReRankingApplyFilter] = Field( @@ -477,14 +482,12 @@ def from_dict(cls, obj: Dict) -> Self: "personalizationImpact": obj.get("personalizationImpact"), "userToken": obj.get("userToken"), "getRankingInfo": obj.get("getRankingInfo"), - "explain": obj.get("explain"), "synonyms": obj.get("synonyms"), "clickAnalytics": obj.get("clickAnalytics"), "analytics": obj.get("analytics"), "analyticsTags": obj.get("analyticsTags"), "percentileComputation": obj.get("percentileComputation"), "enableABTest": obj.get("enableABTest"), - "attributesForFaceting": obj.get("attributesForFaceting"), "attributesToRetrieve": obj.get("attributesToRetrieve"), "ranking": obj.get("ranking"), "customRanking": obj.get("customRanking"), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_query.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_query.py index 7ed842d1c4..9e3cde20da 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_query.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_query.py @@ -16,9 +16,7 @@ class SearchParamsQuery(BaseModel): SearchParamsQuery """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_response.py index 4cc39326c5..d5fb7558c5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_response.py @@ -40,7 +40,7 @@ class SearchResponse(BaseModel): ) automatic_radius: Optional[StrictStr] = Field( default=None, - description="Automatically-computed radius.", + description="Distance from a central coordinate provided by `aroundLatLng`.", alias="automaticRadius", ) exhaustive: Optional[Exhaustive] = None @@ -60,8 +60,7 @@ class SearchResponse(BaseModel): alias="exhaustiveTypo", ) facets: Optional[Dict[str, Dict[str, StrictInt]]] = Field( - default=None, - description="Mapping of each facet name to the corresponding facet counts.", + default=None, description="Facet counts." ) facets_stats: Optional[Dict[str, FacetsStats]] = Field( default=None, description="Statistics for numerical facets." @@ -80,19 +79,17 @@ class SearchResponse(BaseModel): message: Optional[StrictStr] = Field( default=None, description="Warnings about the query." ) - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") nb_pages: StrictInt = Field( - description="Number of pages of results for the current query.", alias="nbPages" + description="Number of pages of results.", alias="nbPages" ) nb_sorted_hits: Optional[StrictInt] = Field( default=None, description="Number of hits selected and sorted by the relevant sort algorithm.", alias="nbSortedHits", ) - page: StrictInt = Field( - description="Page to retrieve (the first page is `0`, not `1`)." + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Page of search results to retrieve." ) parsed_query: Optional[StrictStr] = Field( default=None, @@ -129,7 +126,7 @@ class SearchResponse(BaseModel): ) user_data: Optional[Dict[str, Any]] = Field( default=None, - description="Lets you store custom data in your indices.", + description="An object with custom data. You can store up to 32 kB as custom data. ", alias="userData", ) query_id: Optional[StrictStr] = Field( @@ -137,8 +134,10 @@ class SearchResponse(BaseModel): description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).", alias="queryID", ) - hits: List[Hit] - query: StrictStr = Field(description="Text to search for in an index.") + hits: List[Hit] = Field( + description="Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. " + ) + query: StrictStr = Field(description="Search query.") params: StrictStr = Field( description="URL-encoded string of all search parameters." ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_params.py index 9bd9c97d6e..7b25750d53 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_params.py @@ -6,7 +6,7 @@ from __future__ import annotations from json import loads -from typing import Annotated, Any, Dict, List, Optional, Self +from typing import Annotated, Any, Dict, Optional, Self from pydantic import BaseModel, Field, StrictBool, StrictStr @@ -18,26 +18,23 @@ class SearchRulesParams(BaseModel): Rules search parameters. """ - query: Optional[StrictStr] = Field(default="", description="Rule object query.") + query: Optional[StrictStr] = Field( + default="", description="Search query for rules." + ) anchoring: Optional[Anchoring] = None context: Optional[StrictStr] = Field( default=None, - description="Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules).", + description="Only return rules that match the context (exact match).", ) page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( - default=None, description="Requested page (the first page is page 0)." + default=None, description="Requested page of the API response." ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=20, description="Maximum number of hits per page.", alias="hitsPerPage" ) enabled: Optional[StrictBool] = Field( default=None, - description="Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved.", - ) - request_options: Optional[List[Dict[str, Any]]] = Field( - default=None, - description="Request options to send with the API call.", - alias="requestOptions", + description="If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. ", ) model_config = {"populate_by_name": True, "validate_assignment": True} @@ -89,7 +86,6 @@ def from_dict(cls, obj: Dict) -> Self: "page": obj.get("page"), "hitsPerPage": obj.get("hitsPerPage"), "enabled": obj.get("enabled"), - "requestOptions": obj.get("requestOptions"), } ) return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_response.py index dd26166e27..881dc46159 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_rules_response.py @@ -18,8 +18,10 @@ class SearchRulesResponse(BaseModel): SearchRulesResponse """ - hits: List[Rule] = Field(description="Fetched rules.") - nb_hits: StrictInt = Field(description="Number of fetched rules.", alias="nbHits") + hits: List[Rule] = Field(description="Rules that matched the search criteria.") + nb_hits: StrictInt = Field( + description="Number of rules that matched the search criteria.", alias="nbHits" + ) page: StrictInt = Field(description="Current page.") nb_pages: StrictInt = Field(description="Number of pages.", alias="nbPages") diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_strategy.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_strategy.py index b1f8627b6d..2e507d6129 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_strategy.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_strategy.py @@ -12,7 +12,7 @@ class SearchStrategy(str, Enum): """ - - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query execution as soon as a query matches at least the `hitsPerPage` number of results. + Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_params.py index b6218e2148..7464657a5a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_params.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, Optional, Self -from pydantic import BaseModel, Field, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictStr from algoliasearch.search.models.synonym_type import SynonymType @@ -18,12 +18,10 @@ class SearchSynonymsParams(BaseModel): SearchSynonymsParams """ - query: Optional[StrictStr] = Field( - default="", description="Text to search for in an index." - ) + query: Optional[StrictStr] = Field(default="", description="Search query.") type: Optional[SynonymType] = None - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=20, description="Number of hits per page.", alias="hitsPerPage" diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_response.py index d0796c4a92..e97acb1493 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_synonyms_response.py @@ -18,10 +18,8 @@ class SearchSynonymsResponse(BaseModel): SearchSynonymsResponse """ - hits: List[SynonymHit] = Field(description="Synonym objects.") - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) + hits: List[SynonymHit] = Field(description="Matching synonyms.") + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["hits", "nbHits"] diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_params.py index f7dd137dba..13c1ef9e96 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_params.py @@ -8,7 +8,7 @@ from json import loads from typing import Annotated, Any, Dict, Optional, Self -from pydantic import BaseModel, Field, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictStr class SearchUserIdsParams(BaseModel): @@ -22,8 +22,8 @@ class SearchUserIdsParams(BaseModel): cluster_name: Optional[StrictStr] = Field( default=None, description="Cluster name.", alias="clusterName" ) - page: Optional[StrictInt] = Field( - default=0, description="Page to retrieve (the first page is `0`, not `1`)." + page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=0, description="Page of search results to retrieve." ) hits_per_page: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field( default=20, description="Number of hits per page.", alias="hitsPerPage" diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_response.py index 83e43911f9..5d470bdf3e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_user_ids_response.py @@ -19,11 +19,9 @@ class SearchUserIdsResponse(BaseModel): """ hits: List[UserHit] = Field(description="User objects that match the query.") - nb_hits: StrictInt = Field( - description="Number of hits the search query matched.", alias="nbHits" - ) - page: StrictInt = Field( - description="Page to retrieve (the first page is `0`, not `1`)." + nb_hits: StrictInt = Field(description="Number of results (hits).", alias="nbHits") + page: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Page of search results to retrieve." ) hits_per_page: Annotated[int, Field(le=1000, strict=True, ge=1)] = Field( description="Maximum number of hits per page.", alias="hitsPerPage" diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/secured_api_key_restrictions.py b/clients/algoliasearch-client-python/algoliasearch/search/models/secured_api_key_restrictions.py index 362f13ca35..a315ca969a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/secured_api_key_restrictions.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/secured_api_key_restrictions.py @@ -23,26 +23,26 @@ class SecuredAPIKeyRestrictions(BaseModel): ) filters: Optional[StrictStr] = Field( default=None, - description="Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). ", + description="Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. ", ) valid_until: Optional[StrictInt] = Field( default=None, - description="Unix timestamp used to set the expiration date of the API key.", + description="Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire.", alias="validUntil", ) restrict_indices: Optional[List[StrictStr]] = Field( default=None, - description="Index names that can be queried.", + description='Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with "dev_". - `*_dev` matches all indices ending with "_dev". - `*_products_*` matches all indices containing "_products_". ', alias="restrictIndices", ) restrict_sources: Optional[StrictStr] = Field( default=None, - description="IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). ", + description="IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. ", alias="restrictSources", ) user_token: Optional[StrictStr] = Field( default=None, - description="Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. ", + description="Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. ", alias="userToken", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/semantic_search.py b/clients/algoliasearch-client-python/algoliasearch/search/models/semantic_search.py index 1deb5d5694..25f77e338d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/semantic_search.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/semantic_search.py @@ -13,12 +13,12 @@ class SemanticSearch(BaseModel): """ - Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. """ event_sources: Optional[List[StrictStr]] = Field( default=None, - description="Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source.", + description="Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. ", alias="eventSources", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result.py b/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result.py index 837adfd375..075e2863bd 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result.py @@ -21,11 +21,11 @@ class SnippetResult(BaseModel): oneof_schema_1_validator: Optional[SnippetResultOption] = None oneof_schema_2_validator: Optional[Dict[str, SnippetResultOption]] = Field( default=None, - description="Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.", + description="Snippets that show the context around a matching search query.", ) oneof_schema_3_validator: Optional[List[SnippetResultOption]] = Field( default=None, - description="Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.", + description="Snippets that show the context around a matching search query.", ) actual_instance: Optional[ Union[ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result_option.py b/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result_option.py index ab2f2eb188..f0fc6adf18 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result_option.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/snippet_result_option.py @@ -15,11 +15,11 @@ class SnippetResultOption(BaseModel): """ - Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + Snippets that show the context around a matching search query. """ value: StrictStr = Field( - description="Markup text with `facetQuery` matches highlighted." + description="Highlighted attribute value, including HTML tags." ) match_level: MatchLevel = Field(alias="matchLevel") diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/sort_remaining_by.py b/clients/algoliasearch-client-python/algoliasearch/search/models/sort_remaining_by.py index e1a1a6aaf1..24a3e3e278 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/sort_remaining_by.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/sort_remaining_by.py @@ -12,7 +12,7 @@ class SortRemainingBy(str, Enum): """ - How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values. + Order of facet values that aren't explicitly positioned with the `order` setting.
count
Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value.
alpha
Sort facet values alphabetically.
hidden
Don't show facet values that aren't explicitly positioned.
. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/tag_filters.py b/clients/algoliasearch-client-python/algoliasearch/search/models/tag_filters.py index 9d5f7767b6..0271b8b309 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/tag_filters.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/tag_filters.py @@ -15,7 +15,7 @@ class TagFilters(BaseModel): """ - [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. """ oneof_schema_1_validator: Optional[List[MixedSearchFilters]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/task_status.py b/clients/algoliasearch-client-python/algoliasearch/search/models/task_status.py index a9582fe5b5..9ade26a624 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/task_status.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/task_status.py @@ -12,7 +12,7 @@ class TaskStatus(str, Enum): """ - _published_ if the task has been processed, _notPublished_ otherwise. + Task status, `published` if the task is completed, `notPublished` otherwise. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/time_range.py b/clients/algoliasearch-client-python/algoliasearch/search/models/time_range.py index 61efa6c575..296b911d5d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/time_range.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/time_range.py @@ -17,10 +17,11 @@ class TimeRange(BaseModel): """ var_from: StrictInt = Field( - description="Lower bound of the time range (Unix timestamp).", alias="from" + description="When the rule should start to be active, in Unix epoch time.", + alias="from", ) until: StrictInt = Field( - description="Upper bound of the time range (Unix timestamp)." + description="When the rule should stop to be active, in Unix epoch time." ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance.py b/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance.py index c62eb2d448..87e4a23b59 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance.py @@ -8,17 +8,20 @@ from json import dumps, loads from typing import Dict, Optional, Self, Union -from pydantic import BaseModel, StrictBool, ValidationError, model_serializer +from pydantic import BaseModel, Field, StrictBool, ValidationError, model_serializer from algoliasearch.search.models.typo_tolerance_enum import TypoToleranceEnum class TypoTolerance(BaseModel): """ - Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. """ - oneof_schema_1_validator: Optional[StrictBool] = True + oneof_schema_1_validator: Optional[StrictBool] = Field( + default=True, + description="Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches.", + ) oneof_schema_2_validator: Optional[TypoToleranceEnum] = None actual_instance: Optional[Union[TypoToleranceEnum, bool]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance_enum.py b/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance_enum.py index 15bc77563a..9387a3a38f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance_enum.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/typo_tolerance_enum.py @@ -12,7 +12,7 @@ class TypoToleranceEnum(str, Enum): """ - TypoToleranceEnum + - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. """ """ diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_response.py index ebbbc954b8..578b976ede 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_response.py @@ -17,7 +17,7 @@ class UpdatedAtResponse(BaseModel): """ task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) updated_at: StrictStr = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_with_object_id_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_with_object_id_response.py index 0d7b3da528..792d52c06f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_with_object_id_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/updated_at_with_object_id_response.py @@ -18,7 +18,7 @@ class UpdatedAtWithObjectIdResponse(BaseModel): task_id: Optional[StrictInt] = Field( default=None, - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) updated_at: Optional[StrictStr] = Field( @@ -27,7 +27,7 @@ class UpdatedAtWithObjectIdResponse(BaseModel): alias="updatedAt", ) object_id: Optional[StrictStr] = Field( - default=None, description="Unique object identifier.", alias="objectID" + default=None, description="Unique record identifier.", alias="objectID" ) model_config = {"populate_by_name": True, "validate_assignment": True} diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/updated_rule_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/updated_rule_response.py index 5ba77b1055..afe2ffc067 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/updated_rule_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/updated_rule_response.py @@ -17,14 +17,14 @@ class UpdatedRuleResponse(BaseModel): """ object_id: StrictStr = Field( - description="Unique object identifier.", alias="objectID" + description="Unique identifier of a rule object.", alias="objectID" ) updated_at: StrictStr = Field( description="Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.", alias="updatedAt", ) task_id: StrictInt = Field( - description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. ", + description="Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ", alias="taskID", ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/user_hit.py b/clients/algoliasearch-client-python/algoliasearch/search/models/user_hit.py index 875be5558a..be9e2de2fd 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/user_hit.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/user_hit.py @@ -20,7 +20,7 @@ class UserHit(BaseModel): """ user_id: Annotated[str, Field(strict=True)] = Field( - description="userID of the user.", alias="userID" + description="User ID.", alias="userID" ) cluster_name: StrictStr = Field(description="Cluster name.", alias="clusterName") nb_records: StrictInt = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/user_id.py b/clients/algoliasearch-client-python/algoliasearch/search/models/user_id.py index 50572fde8c..68823babbe 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/user_id.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/user_id.py @@ -18,7 +18,7 @@ class UserId(BaseModel): """ user_id: Annotated[str, Field(strict=True)] = Field( - description="userID of the user.", alias="userID" + description="User ID.", alias="userID" ) cluster_name: StrictStr = Field( description="Cluster to which the user is assigned.", alias="clusterName" diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/value.py b/clients/algoliasearch-client-python/algoliasearch/search/models/value.py index f244485b7e..ddb6410da3 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/value.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/value.py @@ -19,7 +19,8 @@ class Value(BaseModel): """ order: Optional[List[StrictStr]] = Field( - default=None, description="Pinned order of facet lists." + default=None, + description="Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. ", ) sort_remaining_by: Optional[SortRemainingBy] = Field( default=None, alias="sortRemainingBy" diff --git a/clients/algoliasearch-client-ruby/lib/algolia/api/abtesting_client.rb b/clients/algoliasearch-client-ruby/lib/algolia/api/abtesting_client.rb index f88ed6858b..6e64ea7ce1 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/api/abtesting_client.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/api/abtesting_client.rb @@ -346,13 +346,17 @@ def get_ab_test(id, request_options = {}) # # Required API Key ACLs: # - analytics - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) - # @param limit [Integer] Number of records to return (page size). (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) + # @param limit [Integer] Number of items to return. (default to 10) # @param index_prefix [String] Only return A/B tests for indices starting with this prefix. # @param index_suffix [String] Only return A/B tests for indices ending with this suffix. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def list_ab_tests_with_http_info(offset = nil, limit = nil, index_prefix = nil, index_suffix = nil, request_options = {}) + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AbtestingClient.list_ab_tests, must be greater than or equal to 0.' + end + path = '/2/abtests' query_params = {} query_params[:offset] = offset unless offset.nil? @@ -380,8 +384,8 @@ def list_ab_tests_with_http_info(offset = nil, limit = nil, index_prefix = nil, # # Required API Key ACLs: # - analytics - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) - # @param limit [Integer] Number of records to return (page size). (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) + # @param limit [Integer] Number of items to return. (default to 10) # @param index_prefix [String] Only return A/B tests for indices starting with this prefix. # @param index_suffix [String] Only return A/B tests for indices ending with this suffix. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/api/analytics_client.rb b/clients/algoliasearch-client-ruby/lib/algolia/api/analytics_client.rb index 6ca5b77581..9f1f5390ef 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/api/analytics_client.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/api/analytics_client.rb @@ -214,9 +214,9 @@ def custom_put(path, parameters = nil, body = nil, request_options = {}) # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -226,16 +226,6 @@ def get_average_click_position_with_http_info(index, start_date = nil, end_date raise ArgumentError, "Parameter `index` is required when calling `get_average_click_position`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_average_click_position, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_average_click_position, must conform to the pattern #{pattern}." - end - path = '/2/clicks/averageClickPosition' query_params = {} query_params[:index] = index @@ -263,9 +253,9 @@ def get_average_click_position_with_http_info(index, start_date = nil, end_date # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetAverageClickPositionResponse] @@ -278,9 +268,9 @@ def get_average_click_position(index, start_date = nil, end_date = nil, tags = n # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -290,16 +280,6 @@ def get_click_positions_with_http_info(index, start_date = nil, end_date = nil, raise ArgumentError, "Parameter `index` is required when calling `get_click_positions`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_click_positions, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_click_positions, must conform to the pattern #{pattern}." - end - path = '/2/clicks/positions' query_params = {} query_params[:index] = index @@ -327,9 +307,9 @@ def get_click_positions_with_http_info(index, start_date = nil, end_date = nil, # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetClickPositionsResponse] @@ -342,9 +322,9 @@ def get_click_positions(index, start_date = nil, end_date = nil, tags = nil, req # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -354,16 +334,6 @@ def get_click_through_rate_with_http_info(index, start_date = nil, end_date = ni raise ArgumentError, "Parameter `index` is required when calling `get_click_through_rate`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_click_through_rate, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_click_through_rate, must conform to the pattern #{pattern}." - end - path = '/2/clicks/clickThroughRate' query_params = {} query_params[:index] = index @@ -391,9 +361,9 @@ def get_click_through_rate_with_http_info(index, start_date = nil, end_date = ni # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetClickThroughRateResponse] @@ -406,9 +376,9 @@ def get_click_through_rate(index, start_date = nil, end_date = nil, tags = nil, # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -418,16 +388,6 @@ def get_conversation_rate_with_http_info(index, start_date = nil, end_date = nil raise ArgumentError, "Parameter `index` is required when calling `get_conversation_rate`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_conversation_rate, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_conversation_rate, must conform to the pattern #{pattern}." - end - path = '/2/conversions/conversionRate' query_params = {} query_params[:index] = index @@ -455,9 +415,9 @@ def get_conversation_rate_with_http_info(index, start_date = nil, end_date = nil # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetConversationRateResponse] @@ -470,9 +430,9 @@ def get_conversation_rate(index, start_date = nil, end_date = nil, tags = nil, r # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -482,16 +442,6 @@ def get_no_click_rate_with_http_info(index, start_date = nil, end_date = nil, ta raise ArgumentError, "Parameter `index` is required when calling `get_no_click_rate`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_no_click_rate, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_no_click_rate, must conform to the pattern #{pattern}." - end - path = '/2/searches/noClickRate' query_params = {} query_params[:index] = index @@ -519,9 +469,9 @@ def get_no_click_rate_with_http_info(index, start_date = nil, end_date = nil, ta # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetNoClickRateResponse] @@ -534,9 +484,9 @@ def get_no_click_rate(index, start_date = nil, end_date = nil, tags = nil, reque # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -546,16 +496,6 @@ def get_no_results_rate_with_http_info(index, start_date = nil, end_date = nil, raise ArgumentError, "Parameter `index` is required when calling `get_no_results_rate`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_no_results_rate, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_no_results_rate, must conform to the pattern #{pattern}." - end - path = '/2/searches/noResultRate' query_params = {} query_params[:index] = index @@ -583,9 +523,9 @@ def get_no_results_rate_with_http_info(index, start_date = nil, end_date = nil, # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetNoResultsRateResponse] @@ -598,9 +538,9 @@ def get_no_results_rate(index, start_date = nil, end_date = nil, tags = nil, req # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -610,16 +550,6 @@ def get_searches_count_with_http_info(index, start_date = nil, end_date = nil, t raise ArgumentError, "Parameter `index` is required when calling `get_searches_count`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_count, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_count, must conform to the pattern #{pattern}." - end - path = '/2/searches/count' query_params = {} query_params[:index] = index @@ -647,9 +577,9 @@ def get_searches_count_with_http_info(index, start_date = nil, end_date = nil, t # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetSearchesCountResponse] @@ -662,11 +592,11 @@ def get_searches_count(index, start_date = nil, end_date = nil, tags = nil, requ # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -675,15 +605,8 @@ def get_searches_no_clicks_with_http_info(index, start_date = nil, end_date = ni if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_clicks`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_no_clicks, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_no_clicks, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_searches_no_clicks, must be greater than or equal to 0.' end path = '/2/searches/noClicks' @@ -715,11 +638,11 @@ def get_searches_no_clicks_with_http_info(index, start_date = nil, end_date = ni # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetSearchesNoClicksResponse] @@ -732,11 +655,11 @@ def get_searches_no_clicks(index, start_date = nil, end_date = nil, limit = nil, # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -745,15 +668,8 @@ def get_searches_no_results_with_http_info(index, start_date = nil, end_date = n if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_results`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_no_results, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_no_results, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_searches_no_results, must be greater than or equal to 0.' end path = '/2/searches/noResults' @@ -785,11 +701,11 @@ def get_searches_no_results_with_http_info(index, start_date = nil, end_date = n # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetSearchesNoResultsResponse] @@ -802,7 +718,7 @@ def get_searches_no_results(index, start_date = nil, end_date = nil, limit = nil # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_status_with_http_info(index, request_options = {}) @@ -835,7 +751,7 @@ def get_status_with_http_info(index, request_options = {}) # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetStatusResponse] def get_status(index, request_options = {}) @@ -847,11 +763,11 @@ def get_status(index, request_options = {}) # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -860,15 +776,8 @@ def get_top_countries_with_http_info(index, start_date = nil, end_date = nil, li if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_top_countries`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_countries, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_countries, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_countries, must be greater than or equal to 0.' end path = '/2/countries' @@ -900,11 +809,11 @@ def get_top_countries_with_http_info(index, start_date = nil, end_date = nil, li # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetTopCountriesResponse] @@ -917,12 +826,12 @@ def get_top_countries(index, start_date = nil, end_date = nil, limit = nil, offs # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -931,15 +840,8 @@ def get_top_filter_attributes_with_http_info(index, search = nil, start_date = n if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_attributes`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filter_attributes, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filter_attributes, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_filter_attributes, must be greater than or equal to 0.' end path = '/2/filters' @@ -972,12 +874,12 @@ def get_top_filter_attributes_with_http_info(index, search = nil, start_date = n # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetTopFilterAttributesResponse] @@ -991,12 +893,12 @@ def get_top_filter_attributes(index, search = nil, start_date = nil, end_date = # Required API Key ACLs: # - analytics # @param attribute [String] Attribute name. (required) - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1009,15 +911,8 @@ def get_top_filter_for_attribute_with_http_info(attribute, index, search = nil, if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_for_attribute`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filter_for_attribute, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filter_for_attribute, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_filter_for_attribute, must be greater than or equal to 0.' end path = '/2/filters/{attribute}'.sub('{' + 'attribute' + '}', Transport.encode_uri(attribute.to_s)) @@ -1051,12 +946,12 @@ def get_top_filter_for_attribute_with_http_info(attribute, index, search = nil, # Required API Key ACLs: # - analytics # @param attribute [String] Attribute name. (required) - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetTopFilterForAttributeResponse] @@ -1069,12 +964,12 @@ def get_top_filter_for_attribute(attribute, index, search = nil, start_date = ni # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1083,15 +978,8 @@ def get_top_filters_no_results_with_http_info(index, search = nil, start_date = if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_top_filters_no_results`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filters_no_results, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filters_no_results, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_filters_no_results, must be greater than or equal to 0.' end path = '/2/filters/noResults' @@ -1124,12 +1012,12 @@ def get_top_filters_no_results_with_http_info(index, search = nil, start_date = # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetTopFiltersNoResultsResponse] @@ -1142,13 +1030,13 @@ def get_top_filters_no_results(index, search = nil, start_date = nil, end_date = # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1157,15 +1045,8 @@ def get_top_hits_with_http_info(index, search = nil, click_analytics = nil, star if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_top_hits`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_hits, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_hits, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_hits, must be greater than or equal to 0.' end path = '/2/hits' @@ -1199,13 +1080,13 @@ def get_top_hits_with_http_info(index, search = nil, click_analytics = nil, star # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param search [String] User query. # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetTopHitsResponse] @@ -1218,14 +1099,14 @@ def get_top_hits(index, search = nil, click_analytics = nil, start_date = nil, e # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param order_by [OrderBy] Reorder the results. (default to 'searchCount') # @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc') - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1235,15 +1116,8 @@ def get_top_searches_with_http_info(index, click_analytics = nil, start_date = n if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_top_searches`." end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_searches, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_searches, must conform to the pattern #{pattern}." + if @api_client.config.client_side_validation && !offset.nil? && offset < 0 + raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_searches, must be greater than or equal to 0.' end path = '/2/searches' @@ -1278,14 +1152,14 @@ def get_top_searches_with_http_info(index, click_analytics = nil, start_date = n # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) + # @param index [String] Index name. (required) # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param order_by [OrderBy] Reorder the results. (default to 'searchCount') # @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc') - # @param limit [Integer] Number of records to return (page size). (default to 10) - # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0) + # @param limit [Integer] Number of items to return. (default to 10) + # @param offset [Integer] Position of the first item to return. (default to 0) # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetTopSearchesResponse] @@ -1299,9 +1173,9 @@ def get_top_searches(index, click_analytics = nil, start_date = nil, end_date = # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1311,16 +1185,6 @@ def get_users_count_with_http_info(index, start_date = nil, end_date = nil, tags raise ArgumentError, "Parameter `index` is required when calling `get_users_count`." end - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern - raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_users_count, must conform to the pattern #{pattern}." - end - - pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/ - if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern - raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_users_count, must conform to the pattern #{pattern}." - end - path = '/2/users/count' query_params = {} query_params[:index] = index @@ -1348,9 +1212,9 @@ def get_users_count_with_http_info(index, start_date = nil, end_date = nil, tags # # Required API Key ACLs: # - analytics - # @param index [String] Index name to target. (required) - # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + # @param index [String] Index name. (required) + # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze. + # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze. # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetUsersCountResponse] diff --git a/clients/algoliasearch-client-ruby/lib/algolia/api/recommend_client.rb b/clients/algoliasearch-client-ruby/lib/algolia/api/recommend_client.rb index e65fa3f032..79c3e6667d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/api/recommend_client.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/api/recommend_client.rb @@ -209,9 +209,9 @@ def custom_put(path, parameters = nil, body = nil, request_options = {}) # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) - # @param object_id [String] Unique record (object) identifier. (required) + # @param object_id [String] Unique record identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_recommend_rule_with_http_info(index_name, model, object_id, request_options = {}) @@ -253,9 +253,9 @@ def delete_recommend_rule_with_http_info(index_name, model, object_id, request_o # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) - # @param object_id [String] Unique record (object) identifier. (required) + # @param object_id [String] Unique record identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeletedAtResponse] def delete_recommend_rule(index_name, model, object_id, request_options = {}) @@ -267,9 +267,9 @@ def delete_recommend_rule(index_name, model, object_id, request_options = {}) # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) - # @param object_id [String] Unique record (object) identifier. (required) + # @param object_id [String] Unique record identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_recommend_rule_with_http_info(index_name, model, object_id, request_options = {}) @@ -311,9 +311,9 @@ def get_recommend_rule_with_http_info(index_name, model, object_id, request_opti # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) - # @param object_id [String] Unique record (object) identifier. (required) + # @param object_id [String] Unique record identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [RuleResponse] def get_recommend_rule(index_name, model, object_id, request_options = {}) @@ -325,7 +325,7 @@ def get_recommend_rule(index_name, model, object_id, request_options = {}) # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) # @param task_id [Integer] Unique identifier of a task. Numeric value (up to 64bits). (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -369,7 +369,7 @@ def get_recommend_status_with_http_info(index_name, model, task_id, request_opti # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) # @param task_id [Integer] Unique identifier of a task. Numeric value (up to 64bits). (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -427,7 +427,7 @@ def get_recommendations(get_recommendations_params, request_options = {}) # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) # @param search_recommend_rules_params [SearchRecommendRulesParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -466,7 +466,7 @@ def search_recommend_rules_with_http_info(index_name, model, search_recommend_ru # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required) # @param search_recommend_rules_params [SearchRecommendRulesParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb b/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb index cd1f23e396..1003c1514c 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb @@ -29,7 +29,7 @@ def self.create_with_config(config) new(config) end - # Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + # Creates a new API key with specific permissions and restrictions. # # Required API Key ACLs: # - admin @@ -61,7 +61,7 @@ def add_api_key_with_http_info(api_key, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string. + # Creates a new API key with specific permissions and restrictions. # # Required API Key ACLs: # - admin @@ -73,13 +73,13 @@ def add_api_key(api_key, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse') end - # If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + # If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) - # @param body [Object] Algolia record. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) + # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def add_or_update_object_with_http_info(index_name, object_id, body, request_options = {}) @@ -116,13 +116,13 @@ def add_or_update_object_with_http_info(index_name, object_id, body, request_opt @api_client.call_api(:PUT, path, new_options) end - # If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + # If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) - # @param body [Object] Algolia record. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) + # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtWithObjectIdResponse] def add_or_update_object(index_name, object_id, body, request_options = {}) @@ -130,7 +130,7 @@ def add_or_update_object(index_name, object_id, body, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse') end - # Add a source to the list of allowed sources. + # Adds a source to the list of allowed sources. # # Required API Key ACLs: # - admin @@ -162,7 +162,7 @@ def append_source_with_http_info(source, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Add a source to the list of allowed sources. + # Adds a source to the list of allowed sources. # # Required API Key ACLs: # - admin @@ -174,11 +174,11 @@ def append_source(source, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse') end - # Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + # Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. # # Required API Key ACLs: # - admin - # @param x_algolia_user_id [String] userID to assign. (required) + # @param x_algolia_user_id [String] User ID to assign. (required) # @param assign_user_id_params [AssignUserIdParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -218,11 +218,11 @@ def assign_user_id_with_http_info(x_algolia_user_id, assign_user_id_params, requ @api_client.call_api(:POST, path, new_options) end - # Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. + # Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID. # # Required API Key ACLs: # - admin - # @param x_algolia_user_id [String] userID to assign. (required) + # @param x_algolia_user_id [String] User ID to assign. (required) # @param assign_user_id_params [AssignUserIdParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [CreatedAtResponse] @@ -231,9 +231,9 @@ def assign_user_id(x_algolia_user_id, assign_user_id_params, request_options = { @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse') end - # To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + # Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param batch_write_params [BatchWriteParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -266,9 +266,9 @@ def batch_with_http_info(index_name, batch_write_params, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name. + # Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to the individual API requests of the same name. - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param batch_write_params [BatchWriteParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [BatchResponse] @@ -277,11 +277,11 @@ def batch(index_name, batch_write_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BatchResponse') end - # Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + # Assigns multiple user IDs to a cluster. **You can't move users with this operation**. # # Required API Key ACLs: # - admin - # @param x_algolia_user_id [String] userID to assign. (required) + # @param x_algolia_user_id [String] User ID to assign. (required) # @param batch_assign_user_ids_params [BatchAssignUserIdsParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -321,11 +321,11 @@ def batch_assign_user_ids_with_http_info(x_algolia_user_id, batch_assign_user_id @api_client.call_api(:POST, path, new_options) end - # Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + # Assigns multiple user IDs to a cluster. **You can't move users with this operation**. # # Required API Key ACLs: # - admin - # @param x_algolia_user_id [String] userID to assign. (required) + # @param x_algolia_user_id [String] User ID to assign. (required) # @param batch_assign_user_ids_params [BatchAssignUserIdsParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [CreatedAtResponse] @@ -334,11 +334,11 @@ def batch_assign_user_ids(x_algolia_user_id, batch_assign_user_ids_params, reque @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse') end - # Add or remove a batch of dictionary entries. + # Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. # # Required API Key ACLs: # - editSettings - # @param dictionary_name [DictionaryType] Dictionary to search in. (required) + # @param dictionary_name [DictionaryType] Dictionary type in which to search. (required) # @param batch_dictionary_entries_params [BatchDictionaryEntriesParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -371,11 +371,11 @@ def batch_dictionary_entries_with_http_info(dictionary_name, batch_dictionary_en @api_client.call_api(:POST, path, new_options) end - # Add or remove a batch of dictionary entries. + # Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. # # Required API Key ACLs: # - editSettings - # @param dictionary_name [DictionaryType] Dictionary to search in. (required) + # @param dictionary_name [DictionaryType] Dictionary type in which to search. (required) # @param batch_dictionary_entries_params [BatchDictionaryEntriesParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] @@ -384,11 +384,11 @@ def batch_dictionary_entries(dictionary_name, batch_dictionary_entries_params, r @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. # # Required API Key ACLs: # - browse - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param browse_params [BrowseParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -417,11 +417,11 @@ def browse_with_http_info(index_name, browse_params = nil, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. # # Required API Key ACLs: # - browse - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param browse_params [BrowseParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [BrowseResponse] @@ -430,11 +430,11 @@ def browse(index_name, browse_params = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BrowseResponse') end - # Delete the records but leave settings and index-specific API keys untouched. + # Deletes only the records from an index while keeping settings, synonyms, and rules. # # Required API Key ACLs: # - deleteIndex - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def clear_objects_with_http_info(index_name, request_options = {}) @@ -462,11 +462,11 @@ def clear_objects_with_http_info(index_name, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Delete the records but leave settings and index-specific API keys untouched. + # Deletes only the records from an index while keeping settings, synonyms, and rules. # # Required API Key ACLs: # - deleteIndex - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] def clear_objects(index_name, request_options = {}) @@ -474,12 +474,12 @@ def clear_objects(index_name, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Delete all rules in the index. + # Deletes all rules from the index. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def clear_rules_with_http_info(index_name, forward_to_replicas = nil, request_options = {}) @@ -508,12 +508,12 @@ def clear_rules_with_http_info(index_name, forward_to_replicas = nil, request_op @api_client.call_api(:POST, path, new_options) end - # Delete all rules in the index. + # Deletes all rules from the index. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] def clear_rules(index_name, forward_to_replicas = nil, request_options = {}) @@ -521,12 +521,12 @@ def clear_rules(index_name, forward_to_replicas = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Delete all synonyms in the index. + # Deletes all synonyms from the index. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def clear_synonyms_with_http_info(index_name, forward_to_replicas = nil, request_options = {}) @@ -555,12 +555,12 @@ def clear_synonyms_with_http_info(index_name, forward_to_replicas = nil, request @api_client.call_api(:POST, path, new_options) end - # Delete all synonyms in the index. + # Deletes all synonyms from the index. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] def clear_synonyms(index_name, forward_to_replicas = nil, request_options = {}) @@ -744,7 +744,7 @@ def custom_put(path, parameters = nil, body = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object') end - # Delete an existing API key. The request must be authenticated with the admin API key. + # Deletes the API key. # # Required API Key ACLs: # - admin @@ -776,7 +776,7 @@ def delete_api_key_with_http_info(key, request_options = {}) @api_client.call_api(:DELETE, path, new_options) end - # Delete an existing API key. The request must be authenticated with the admin API key. + # Deletes the API key. # # Required API Key ACLs: # - admin @@ -788,11 +788,11 @@ def delete_api_key(key, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteApiKeyResponse') end - # This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + # This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). # # Required API Key ACLs: # - deleteIndex - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param delete_by_params [DeleteByParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -825,11 +825,11 @@ def delete_by_with_http_info(index_name, delete_by_params, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. + # This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch). # # Required API Key ACLs: # - deleteIndex - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param delete_by_params [DeleteByParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeletedAtResponse] @@ -838,11 +838,11 @@ def delete_by(index_name, delete_by_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse') end - # Delete an existing index. + # Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). # # Required API Key ACLs: # - deleteIndex - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_index_with_http_info(index_name, request_options = {}) @@ -870,11 +870,11 @@ def delete_index_with_http_info(index_name, request_options = {}) @api_client.call_api(:DELETE, path, new_options) end - # Delete an existing index. + # Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). # # Required API Key ACLs: # - deleteIndex - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeletedAtResponse] def delete_index(index_name, request_options = {}) @@ -882,12 +882,12 @@ def delete_index(index_name, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse') end - # To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + # Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). # # Required API Key ACLs: # - deleteObject - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_object_with_http_info(index_name, object_id, request_options = {}) @@ -920,12 +920,12 @@ def delete_object_with_http_info(index_name, object_id, request_options = {}) @api_client.call_api(:DELETE, path, new_options) end - # To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. + # Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). # # Required API Key ACLs: # - deleteObject - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeletedAtResponse] def delete_object(index_name, object_id, request_options = {}) @@ -933,13 +933,13 @@ def delete_object(index_name, object_id, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse') end - # Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + # Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a rule object. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_rule_with_http_info(index_name, object_id, forward_to_replicas = nil, request_options = {}) @@ -973,13 +973,13 @@ def delete_rule_with_http_info(index_name, object_id, forward_to_replicas = nil, @api_client.call_api(:DELETE, path, new_options) end - # Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + # Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a rule object. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] def delete_rule(index_name, object_id, forward_to_replicas = nil, request_options = {}) @@ -987,7 +987,7 @@ def delete_rule(index_name, object_id, forward_to_replicas = nil, request_option @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Remove a source from the list of allowed sources. + # Deletes a source from the list of allowed sources. # # Required API Key ACLs: # - admin @@ -1019,7 +1019,7 @@ def delete_source_with_http_info(source, request_options = {}) @api_client.call_api(:DELETE, path, new_options) end - # Remove a source from the list of allowed sources. + # Deletes a source from the list of allowed sources. # # Required API Key ACLs: # - admin @@ -1031,13 +1031,13 @@ def delete_source(source, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteSourceResponse') end - # Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + # Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a synonym object. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_synonym_with_http_info(index_name, object_id, forward_to_replicas = nil, request_options = {}) @@ -1071,13 +1071,13 @@ def delete_synonym_with_http_info(index_name, object_id, forward_to_replicas = n @api_client.call_api(:DELETE, path, new_options) end - # Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + # Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a synonym object. (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeletedAtResponse] def delete_synonym(index_name, object_id, forward_to_replicas = nil, request_options = {}) @@ -1085,7 +1085,7 @@ def delete_synonym(index_name, object_id, forward_to_replicas = nil, request_opt @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse') end - # Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + # Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. # @param key [String] API key. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -1115,7 +1115,7 @@ def get_api_key_with_http_info(key, request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. + # Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key. # @param key [String] API key. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -1125,7 +1125,7 @@ def get_api_key(key, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetApiKeyResponse') end - # Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + # Lists supported languages with their supported dictionary types and number of custom entries. # # Required API Key ACLs: # - settings @@ -1151,7 +1151,7 @@ def get_dictionary_languages_with_http_info(request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. + # Lists supported languages with their supported dictionary types and number of custom entries. # # Required API Key ACLs: # - settings @@ -1162,7 +1162,7 @@ def get_dictionary_languages(request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash') end - # Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + # Retrieves the languages for which standard dictionary entries are turned off. # # Required API Key ACLs: # - settings @@ -1188,7 +1188,7 @@ def get_dictionary_settings_with_http_info(request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + # Retrieves the languages for which standard dictionary entries are turned off. # # Required API Key ACLs: # - settings @@ -1199,14 +1199,14 @@ def get_dictionary_settings(request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetDictionarySettingsResponse') end - # The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + # The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. # # Required API Key ACLs: # - logs - # @param offset [Integer] First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (default to 0) + # @param offset [Integer] First log entry to retrieve. The most recent entries are listed first. (default to 0) # @param length [Integer] Maximum number of entries to retrieve. (default to 10) - # @param index_name [String] Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. - # @param type [LogType] Type of log entries to retrieve. When omitted, all log entries are retrieved. (default to 'all') + # @param index_name [String] Index for which to retrieve log entries. By default, log entries are retrieved for all indices. + # @param type [LogType] Type of log entries to retrieve. By default, all log entries are retrieved. (default to 'all') # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_logs_with_http_info(offset = nil, length = nil, index_name = nil, type = nil, request_options = {}) @@ -1237,14 +1237,14 @@ def get_logs_with_http_info(offset = nil, length = nil, index_name = nil, type = @api_client.call_api(:GET, path, new_options) end - # The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + # The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. # # Required API Key ACLs: # - logs - # @param offset [Integer] First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (default to 0) + # @param offset [Integer] First log entry to retrieve. The most recent entries are listed first. (default to 0) # @param length [Integer] Maximum number of entries to retrieve. (default to 10) - # @param index_name [String] Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. - # @param type [LogType] Type of log entries to retrieve. When omitted, all log entries are retrieved. (default to 'all') + # @param index_name [String] Index for which to retrieve log entries. By default, log entries are retrieved for all indices. + # @param type [LogType] Type of log entries to retrieve. By default, all log entries are retrieved. (default to 'all') # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetLogsResponse] def get_logs(offset = nil, length = nil, index_name = nil, type = nil, request_options = {}) @@ -1252,13 +1252,13 @@ def get_logs(offset = nil, length = nil, index_name = nil, type = nil, request_o @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetLogsResponse') end - # To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + # Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) - # @param attributes_to_retrieve [Array] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) + # @param attributes_to_retrieve [Array] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_object_with_http_info(index_name, object_id, attributes_to_retrieve = nil, request_options = {}) @@ -1292,13 +1292,13 @@ def get_object_with_http_info(index_name, object_id, attributes_to_retrieve = ni @api_client.call_api(:GET, path, new_options) end - # To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + # Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) - # @param attributes_to_retrieve [Array] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) + # @param attributes_to_retrieve [Array] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Hash] def get_object(index_name, object_id, attributes_to_retrieve = nil, request_options = {}) @@ -1306,7 +1306,7 @@ def get_object(index_name, object_id, attributes_to_retrieve = nil, request_opti @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash') end - # Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + # Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. # # Required API Key ACLs: # - search @@ -1338,7 +1338,7 @@ def get_objects_with_http_info(get_objects_params, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests. + # Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests. # # Required API Key ACLs: # - search @@ -1350,11 +1350,11 @@ def get_objects(get_objects_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetObjectsResponse') end - # Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + # Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a rule object. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1388,11 +1388,11 @@ def get_rule_with_http_info(index_name, object_id, request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). + # Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules). # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a rule object. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Rule] @@ -1401,11 +1401,11 @@ def get_rule(index_name, object_id, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Rule') end - # Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + # Retrieves an object with non-null index settings. # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_settings_with_http_info(index_name, request_options = {}) @@ -1433,11 +1433,11 @@ def get_settings_with_http_info(index_name, request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + # Retrieves an object with non-null index settings. # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [IndexSettings] def get_settings(index_name, request_options = {}) @@ -1445,7 +1445,7 @@ def get_settings(index_name, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::IndexSettings') end - # Get all allowed sources (IP addresses). + # Retrieves all allowed IP addresses with access to your application. # # Required API Key ACLs: # - admin @@ -1471,7 +1471,7 @@ def get_sources_with_http_info(request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Get all allowed sources (IP addresses). + # Retrieves all allowed IP addresses with access to your application. # # Required API Key ACLs: # - admin @@ -1482,11 +1482,11 @@ def get_sources(request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array') end - # Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + # Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a synonym object. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1520,11 +1520,11 @@ def get_synonym_with_http_info(index_name, object_id, request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). + # Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a synonym object. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SynonymHit] @@ -1533,11 +1533,11 @@ def get_synonym(index_name, object_id, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SynonymHit') end - # Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + # Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param task_id [Integer] Unique task identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1571,11 +1571,11 @@ def get_task_with_http_info(index_name, task_id, request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. + # Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' responses include a task ID that you can use to check the status. # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param task_id [Integer] Unique task identifier. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [GetTaskResponse] @@ -1584,7 +1584,7 @@ def get_task(index_name, task_id, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTaskResponse') end - # Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + # Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. # # Required API Key ACLs: # - admin @@ -1610,7 +1610,7 @@ def get_top_user_ids_with_http_info(request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + # Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. # # Required API Key ACLs: # - admin @@ -1621,11 +1621,11 @@ def get_top_user_ids(request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTopUserIdsResponse') end - # Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + # Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. # # Required API Key ACLs: # - admin - # @param user_id [String] userID to assign. (required) + # @param user_id [String] User ID to assign. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_user_id_with_http_info(user_id, request_options = {}) @@ -1658,11 +1658,11 @@ def get_user_id_with_http_info(user_id, request_options = {}) @api_client.call_api(:GET, path, new_options) end - # Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + # Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. # # Required API Key ACLs: # - admin - # @param user_id [String] userID to assign. (required) + # @param user_id [String] User ID to assign. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UserId] def get_user_id(user_id, request_options = {}) @@ -1674,7 +1674,7 @@ def get_user_id(user_id, request_options = {}) # # Required API Key ACLs: # - admin - # @param get_clusters [Boolean] Indicates whether to include the cluster's pending mapping state in the response. + # @param get_clusters [Boolean] Whether to include the cluster's pending mapping state in the response. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def has_pending_mappings_with_http_info(get_clusters = nil, request_options = {}) @@ -1702,7 +1702,7 @@ def has_pending_mappings_with_http_info(get_clusters = nil, request_options = {} # # Required API Key ACLs: # - admin - # @param get_clusters [Boolean] Indicates whether to include the cluster's pending mapping state in the response. + # @param get_clusters [Boolean] Whether to include the cluster's pending mapping state in the response. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [HasPendingMappingsResponse] def has_pending_mappings(get_clusters = nil, request_options = {}) @@ -1710,7 +1710,7 @@ def has_pending_mappings(get_clusters = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::HasPendingMappingsResponse') end - # List all API keys associated with your Algolia application, including their permissions and restrictions. + # Lists all API keys associated with your Algolia application, including their permissions and restrictions. # # Required API Key ACLs: # - admin @@ -1736,7 +1736,7 @@ def list_api_keys_with_http_info(request_options = {}) @api_client.call_api(:GET, path, new_options) end - # List all API keys associated with your Algolia application, including their permissions and restrictions. + # Lists all API keys associated with your Algolia application, including their permissions and restrictions. # # Required API Key ACLs: # - admin @@ -1747,7 +1747,7 @@ def list_api_keys(request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListApiKeysResponse') end - # List the available clusters in a multi-cluster setup. + # Lists the available clusters in a multi-cluster setup. # # Required API Key ACLs: # - admin @@ -1773,7 +1773,7 @@ def list_clusters_with_http_info(request_options = {}) @api_client.call_api(:GET, path, new_options) end - # List the available clusters in a multi-cluster setup. + # Lists the available clusters in a multi-cluster setup. # # Required API Key ACLs: # - admin @@ -1784,12 +1784,12 @@ def list_clusters(request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListClustersResponse') end - # List indices in an Algolia application. + # Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. # # Required API Key ACLs: # - listIndexes - # @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - # @param hits_per_page [Integer] Maximum number of hits per page. (default to 100) + # @param page [Integer] Requested page of the API response. If `null`, the API response is not paginated. + # @param hits_per_page [Integer] Number of hits per page. (default to 100) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def list_indices_with_http_info(page = nil, hits_per_page = nil, request_options = {}) @@ -1818,12 +1818,12 @@ def list_indices_with_http_info(page = nil, hits_per_page = nil, request_options @api_client.call_api(:GET, path, new_options) end - # List indices in an Algolia application. + # Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request. # # Required API Key ACLs: # - listIndexes - # @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - # @param hits_per_page [Integer] Maximum number of hits per page. (default to 100) + # @param page [Integer] Requested page of the API response. If `null`, the API response is not paginated. + # @param hits_per_page [Integer] Number of hits per page. (default to 100) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [ListIndicesResponse] def list_indices(page = nil, hits_per_page = nil, request_options = {}) @@ -1831,12 +1831,12 @@ def list_indices(page = nil, hits_per_page = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListIndicesResponse') end - # List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + # Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. # # Required API Key ACLs: # - admin - # @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - # @param hits_per_page [Integer] Maximum number of hits per page. (default to 100) + # @param page [Integer] Requested page of the API response. If `null`, the API response is not paginated. + # @param hits_per_page [Integer] Number of hits per page. (default to 100) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def list_user_ids_with_http_info(page = nil, hits_per_page = nil, request_options = {}) @@ -1865,12 +1865,12 @@ def list_user_ids_with_http_info(page = nil, hits_per_page = nil, request_option @api_client.call_api(:GET, path, new_options) end - # List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. + # Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. # # Required API Key ACLs: # - admin - # @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated. - # @param hits_per_page [Integer] Maximum number of hits per page. (default to 100) + # @param page [Integer] Requested page of the API response. If `null`, the API response is not paginated. + # @param hits_per_page [Integer] Number of hits per page. (default to 100) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [ListUserIdsResponse] def list_user_ids(page = nil, hits_per_page = nil, request_options = {}) @@ -1878,7 +1878,7 @@ def list_user_ids(page = nil, hits_per_page = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListUserIdsResponse') end - # To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + # Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. # @param batch_params [BatchParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -1908,7 +1908,7 @@ def multiple_batch_with_http_info(batch_params, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name. + # Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. # @param batch_params [BatchParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -1918,11 +1918,11 @@ def multiple_batch(batch_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::MultipleBatchResponse') end - # This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + # Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param operation_index_params [OperationIndexParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -1955,11 +1955,11 @@ def operation_index_with_http_info(index_name, operation_index_params, request_o @api_client.call_api(:POST, path, new_options) end - # This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + # Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param operation_index_params [OperationIndexParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] @@ -1968,14 +1968,14 @@ def operation_index(index_name, operation_index_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + # Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) - # @param attributes_to_update [Hash] Object with attributes to update. (required) - # @param create_if_not_exists [Boolean] Indicates whether to create a new record if it doesn't exist yet. (default to true) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) + # @param attributes_to_update [Hash] Attributes with their values. (required) + # @param create_if_not_exists [Boolean] Whether to create a new record if it doesn't exist. (default to true) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def partial_update_object_with_http_info(index_name, object_id, attributes_to_update, create_if_not_exists = nil, request_options = {}) @@ -2013,14 +2013,14 @@ def partial_update_object_with_http_info(index_name, object_id, attributes_to_up @api_client.call_api(:POST, path, new_options) end - # Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor. + # Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) - # @param object_id [String] Unique record (object) identifier. (required) - # @param attributes_to_update [Hash] Object with attributes to update. (required) - # @param create_if_not_exists [Boolean] Indicates whether to create a new record if it doesn't exist yet. (default to true) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param object_id [String] Unique record identifier. (required) + # @param attributes_to_update [Hash] Attributes with their values. (required) + # @param create_if_not_exists [Boolean] Whether to create a new record if it doesn't exist. (default to true) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtWithObjectIdResponse] def partial_update_object(index_name, object_id, attributes_to_update, create_if_not_exists = nil, request_options = {}) @@ -2028,11 +2028,11 @@ def partial_update_object(index_name, object_id, attributes_to_update, create_if @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse') end - # Remove a userID and its associated data from the multi-clusters. + # Deletes a user ID and its associated data from the clusters. # # Required API Key ACLs: # - admin - # @param user_id [String] userID to assign. (required) + # @param user_id [String] User ID to assign. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def remove_user_id_with_http_info(user_id, request_options = {}) @@ -2065,11 +2065,11 @@ def remove_user_id_with_http_info(user_id, request_options = {}) @api_client.call_api(:DELETE, path, new_options) end - # Remove a userID and its associated data from the multi-clusters. + # Deletes a user ID and its associated data from the clusters. # # Required API Key ACLs: # - admin - # @param user_id [String] userID to assign. (required) + # @param user_id [String] User ID to assign. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [RemoveUserIdResponse] def remove_user_id(user_id, request_options = {}) @@ -2077,7 +2077,7 @@ def remove_user_id(user_id, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::RemoveUserIdResponse') end - # Replace all allowed sources. + # Replaces the list of allowed sources. # # Required API Key ACLs: # - admin @@ -2109,7 +2109,7 @@ def replace_sources_with_http_info(source, request_options = {}) @api_client.call_api(:PUT, path, new_options) end - # Replace all allowed sources. + # Replaces the list of allowed sources. # # Required API Key ACLs: # - admin @@ -2121,7 +2121,7 @@ def replace_sources(source, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ReplaceSourceResponse') end - # Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + # Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. # # Required API Key ACLs: # - admin @@ -2153,7 +2153,7 @@ def restore_api_key_with_http_info(key, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key. + # Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can't be restored. # # Required API Key ACLs: # - admin @@ -2165,12 +2165,12 @@ def restore_api_key(key, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse') end - # Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + # Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) - # @param body [Object] The Algolia record. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def save_object_with_http_info(index_name, body, request_options = {}) @@ -2202,12 +2202,12 @@ def save_object_with_http_info(index_name, body, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + # Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). # # Required API Key ACLs: # - addObject - # @param index_name [String] Index on which to perform the request. (required) - # @param body [Object] The Algolia record. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SaveObjectResponse] def save_object(index_name, body, request_options = {}) @@ -2215,14 +2215,14 @@ def save_object(index_name, body, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveObjectResponse') end - # To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + # If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a rule object. (required) # @param rule [Rule] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def save_rule_with_http_info(index_name, object_id, rule, forward_to_replicas = nil, request_options = {}) @@ -2260,14 +2260,14 @@ def save_rule_with_http_info(index_name, object_id, rule, forward_to_replicas = @api_client.call_api(:PUT, path, new_options) end - # To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + # If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a rule object. (required) # @param rule [Rule] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedRuleResponse] def save_rule(index_name, object_id, rule, forward_to_replicas = nil, request_options = {}) @@ -2275,14 +2275,14 @@ def save_rule(index_name, object_id, rule, forward_to_replicas = nil, request_op @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedRuleResponse') end - # Create or update multiple rules. + # Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param rules [Array] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. - # @param clear_existing_rules [Boolean] Indicates whether existing rules should be deleted before adding this batch. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. + # @param clear_existing_rules [Boolean] Whether existing rules should be deleted before adding this batch. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def save_rules_with_http_info(index_name, rules, forward_to_replicas = nil, clear_existing_rules = nil, request_options = {}) @@ -2316,14 +2316,14 @@ def save_rules_with_http_info(index_name, rules, forward_to_replicas = nil, clea @api_client.call_api(:POST, path, new_options) end - # Create or update multiple rules. + # Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param rules [Array] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. - # @param clear_existing_rules [Boolean] Indicates whether existing rules should be deleted before adding this batch. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. + # @param clear_existing_rules [Boolean] Whether existing rules should be deleted before adding this batch. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] def save_rules(index_name, rules, forward_to_replicas = nil, clear_existing_rules = nil, request_options = {}) @@ -2331,14 +2331,14 @@ def save_rules(index_name, rules, forward_to_replicas = nil, clear_existing_rule @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + # If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a synonym object. (required) # @param synonym_hit [SynonymHit] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def save_synonym_with_http_info(index_name, object_id, synonym_hit, forward_to_replicas = nil, request_options = {}) @@ -2376,14 +2376,14 @@ def save_synonym_with_http_info(index_name, object_id, synonym_hit, forward_to_r @api_client.call_api(:PUT, path, new_options) end - # Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + # If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param object_id [String] Unique identifier of a synonym object. (required) # @param synonym_hit [SynonymHit] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SaveSynonymResponse] def save_synonym(index_name, object_id, synonym_hit, forward_to_replicas = nil, request_options = {}) @@ -2391,14 +2391,14 @@ def save_synonym(index_name, object_id, synonym_hit, forward_to_replicas = nil, @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveSynonymResponse') end - # Create or update multiple synonyms. + # If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param synonym_hit [Array] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. - # @param replace_existing_synonyms [Boolean] Indicates whether to replace all synonyms in the index with the ones sent with this request. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. + # @param replace_existing_synonyms [Boolean] Whether to replace all synonyms in the index with the ones sent with this request. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def save_synonyms_with_http_info(index_name, synonym_hit, forward_to_replicas = nil, replace_existing_synonyms = nil, request_options = {}) @@ -2432,14 +2432,14 @@ def save_synonyms_with_http_info(index_name, synonym_hit, forward_to_replicas = @api_client.call_api(:POST, path, new_options) end - # Create or update multiple synonyms. + # If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param synonym_hit [Array] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. - # @param replace_existing_synonyms [Boolean] Indicates whether to replace all synonyms in the index with the ones sent with this request. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. + # @param replace_existing_synonyms [Boolean] Whether to replace all synonyms in the index with the ones sent with this request. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] def save_synonyms(index_name, synonym_hit, forward_to_replicas = nil, replace_existing_synonyms = nil, request_options = {}) @@ -2447,11 +2447,11 @@ def save_synonyms(index_name, synonym_hit, forward_to_replicas = nil, replace_ex @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Send multiple search queries to one or more indices. + # Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. # # Required API Key ACLs: # - search - # @param search_method_params [SearchMethodParams] Query requests and strategies. Results will be received in the same order as the queries. (required) + # @param search_method_params [SearchMethodParams] Muli-search request body. Results are returned in the same order as the requests. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def search_with_http_info(search_method_params, request_options = {}) @@ -2479,11 +2479,11 @@ def search_with_http_info(search_method_params, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Send multiple search queries to one or more indices. + # Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. # # Required API Key ACLs: # - search - # @param search_method_params [SearchMethodParams] Query requests and strategies. Results will be received in the same order as the queries. (required) + # @param search_method_params [SearchMethodParams] Muli-search request body. Results are returned in the same order as the requests. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SearchResponses] def search(search_method_params, request_options = {}) @@ -2491,11 +2491,11 @@ def search(search_method_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponses') end - # Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + # Searches for standard and custom dictionary entries. # # Required API Key ACLs: # - settings - # @param dictionary_name [DictionaryType] Dictionary to search in. (required) + # @param dictionary_name [DictionaryType] Dictionary type in which to search. (required) # @param search_dictionary_entries_params [SearchDictionaryEntriesParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -2528,25 +2528,25 @@ def search_dictionary_entries_with_http_info(dictionary_name, search_dictionary_ @api_client.call_api(:POST, path, new_options) end - # Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. + # Searches for standard and custom dictionary entries. # # Required API Key ACLs: # - settings - # @param dictionary_name [DictionaryType] Dictionary to search in. (required) + # @param dictionary_name [DictionaryType] Dictionary type in which to search. (required) # @param search_dictionary_entries_params [SearchDictionaryEntriesParams] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - # @return [UpdatedAtResponse] + # @return [SearchDictionaryEntriesResponse] def search_dictionary_entries(dictionary_name, search_dictionary_entries_params, request_options = {}) response = search_dictionary_entries_with_http_info(dictionary_name, search_dictionary_entries_params, request_options) - @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') + @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchDictionaryEntriesResponse') end - # [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + # Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) - # @param facet_name [String] Facet name. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param facet_name [String] Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) # @param search_for_facet_values_request [SearchForFacetValuesRequest] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -2580,12 +2580,12 @@ def search_for_facet_values_with_http_info(index_name, facet_name, search_for_fa @api_client.call_api(:POST, path, new_options) end - # [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + # Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) - # @param facet_name [String] Facet name. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) + # @param facet_name [String] Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier. (required) # @param search_for_facet_values_request [SearchForFacetValuesRequest] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SearchForFacetValuesResponse] @@ -2594,11 +2594,11 @@ def search_for_facet_values(index_name, facet_name, search_for_facet_values_requ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchForFacetValuesResponse') end - # Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + # Searches for rules in your index. # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param search_rules_params [SearchRulesParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -2627,11 +2627,11 @@ def search_rules_with_http_info(index_name, search_rules_params = nil, request_o @api_client.call_api(:POST, path, new_options) end - # Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. + # Searches for rules in your index. # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param search_rules_params [SearchRulesParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SearchRulesResponse] @@ -2640,11 +2640,11 @@ def search_rules(index_name, search_rules_params = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchRulesResponse') end - # Return records that match the query. + # Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param search_params [SearchParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -2673,11 +2673,11 @@ def search_single_index_with_http_info(index_name, search_params = nil, request_ @api_client.call_api(:POST, path, new_options) end - # Return records that match the query. + # Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting. # # Required API Key ACLs: # - search - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param search_params [SearchParams] # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SearchResponse] @@ -2686,11 +2686,11 @@ def search_single_index(index_name, search_params = nil, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponse') end - # Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + # Searches for synonyms in your index. # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param search_synonyms_params [SearchSynonymsParams] Body of the `searchSynonyms` operation. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response @@ -2719,11 +2719,11 @@ def search_synonyms_with_http_info(index_name, search_synonyms_params = nil, req @api_client.call_api(:POST, path, new_options) end - # Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. + # Searches for synonyms in your index. # # Required API Key ACLs: # - settings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param search_synonyms_params [SearchSynonymsParams] Body of the `searchSynonyms` operation. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SearchSynonymsResponse] @@ -2732,7 +2732,7 @@ def search_synonyms(index_name, search_synonyms_params = nil, request_options = @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchSynonymsResponse') end - # Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + # Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). # # Required API Key ACLs: # - admin @@ -2764,7 +2764,7 @@ def search_user_ids_with_http_info(search_user_ids_params, request_options = {}) @api_client.call_api(:POST, path, new_options) end - # Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + # Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). # # Required API Key ACLs: # - admin @@ -2776,7 +2776,7 @@ def search_user_ids(search_user_ids_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchUserIdsResponse') end - # Set stop word settings for a specific language. + # Turns standard stop word dictionary entries on or off for a given language. # # Required API Key ACLs: # - editSettings @@ -2808,7 +2808,7 @@ def set_dictionary_settings_with_http_info(dictionary_settings_params, request_o @api_client.call_api(:PUT, path, new_options) end - # Set stop word settings for a specific language. + # Turns standard stop word dictionary entries on or off for a given language. # # Required API Key ACLs: # - editSettings @@ -2820,13 +2820,13 @@ def set_dictionary_settings(dictionary_settings_params, request_options = {}) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + # Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param index_settings [IndexSettings] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def set_settings_with_http_info(index_name, index_settings, forward_to_replicas = nil, request_options = {}) @@ -2859,13 +2859,13 @@ def set_settings_with_http_info(index_name, index_settings, forward_to_replicas @api_client.call_api(:PUT, path, new_options) end - # Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. + # Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index. # # Required API Key ACLs: # - editSettings - # @param index_name [String] Index on which to perform the request. (required) + # @param index_name [String] Name of the index on which to perform the operation. (required) # @param index_settings [IndexSettings] (required) - # @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices. + # @param forward_to_replicas [Boolean] Whether changes are applied to replica indices. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [UpdatedAtResponse] def set_settings(index_name, index_settings, forward_to_replicas = nil, request_options = {}) @@ -2873,7 +2873,7 @@ def set_settings(index_name, index_settings, forward_to_replicas = nil, request_ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse') end - # Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + # Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. # # Required API Key ACLs: # - admin @@ -2910,7 +2910,7 @@ def update_api_key_with_http_info(key, api_key, request_options = {}) @api_client.call_api(:PUT, path, new_options) end - # Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key. + # Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value. # # Required API Key ACLs: # - admin diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/ab_test_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/ab_test_response.rb index e3f6cac66b..cd1c17031d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/ab_test_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/ab_test_response.rb @@ -12,7 +12,7 @@ class ABTestResponse # Unique A/B test ID. attr_accessor :ab_test_id - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/search_no_result_event.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/search_no_result_event.rb index 62fe1ca94d..b7afac0e9b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/search_no_result_event.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/search_no_result_event.rb @@ -12,7 +12,7 @@ class SearchNoResultEvent # Number of occurrences. attr_accessor :count - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search.rb index 9497e57d53..50dfa0f5de 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search.rb @@ -12,7 +12,7 @@ class TopSearch # Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). attr_accessor :count - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb index 083ddcd4bc..71fec3977a 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb @@ -30,7 +30,7 @@ class TopSearchWithAnalytics # Number of converted clicks. attr_accessor :conversion_count - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb index 6ca61f9fa9..8f23477d89 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + # Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. module AroundPrecision class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision_from_value_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision_from_value_inner.rb index e0ab0a7741..a9f1b57868 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision_from_value_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision_from_value_inner.rb @@ -5,9 +5,12 @@ module Algolia module Recommend + # Range object with lower and upper values in meters to define custom ranges. class AroundPrecisionFromValueInner + # Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. attr_accessor :from + # Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_radius.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_radius.rb index 9f61b10469..da77019dd8 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_radius.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_radius.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + # Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. module AroundRadius class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filter.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filter.rb index abb0596ff0..af5c620b17 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filter.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filter.rb @@ -5,15 +5,15 @@ module Algolia module Recommend - # Automatic facet Filter. + # Filter or optional filter to be applied to the search. class AutomaticFacetFilter - # Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + # Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. attr_accessor :facet - # Score for the filter. Typically used for optional or disjunctive filters. + # Filter scores to give different weights to individual filters. attr_accessor :score - # Whether the filter is disjunctive (true) or conjunctive (false). + # Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. attr_accessor :disjunctive # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filters.rb index 53a650fb26..9baa053c98 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/automatic_facet_filters.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + # Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. module AutomaticFacetFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommend_request.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommend_request.rb index d37fc99ca5..afaad8d42e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommend_request.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommend_request.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class BaseRecommendRequest - # Algolia index name. + # Index name. attr_accessor :index_name # Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommendations_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommendations_query.rb index d5214fbffa..a160694d12 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommendations_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommendations_query.rb @@ -8,7 +8,7 @@ module Recommend class BaseRecommendationsQuery attr_accessor :model - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id attr_accessor :query_parameters diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb index 9d5dd589e6..84775b32f4 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class BaseRecommendedForYouQueryParameters - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params.rb index f4153d382f..10171a85ea 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params.rb @@ -6,13 +6,13 @@ module Algolia module Recommend class BaseSearchParams - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -23,80 +23,77 @@ class BaseSearchParams attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test # Attribute mapping from ruby-style variable name to JSON key. @@ -128,7 +125,6 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, @@ -172,7 +168,6 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, @@ -328,12 +323,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -361,6 +350,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -393,6 +396,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -425,7 +446,6 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && @@ -444,7 +464,7 @@ def eql?(other) # @return [Integer] Hash code def hash [query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params_without_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params_without_query.rb index fc7a80d0f7..37d0f56ffb 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params_without_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_params_without_query.rb @@ -6,10 +6,10 @@ module Algolia module Recommend class BaseSearchParamsWithoutQuery - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -20,80 +20,77 @@ class BaseSearchParamsWithoutQuery attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test # Attribute mapping from ruby-style variable name to JSON key. @@ -124,7 +121,6 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, @@ -167,7 +163,6 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, @@ -311,12 +306,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -344,6 +333,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -376,6 +379,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -407,7 +428,6 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && @@ -426,7 +446,7 @@ def eql?(other) # @return [Integer] Hash code def hash [similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_response.rb index b73cb77757..3d066df046 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/base_search_response.rb @@ -15,7 +15,7 @@ class BaseSearchResponse # Computed geographical location. attr_accessor :around_lat_lng - # Automatically-computed radius. + # Distance from a central coordinate provided by `aroundLatLng`. attr_accessor :automatic_radius attr_accessor :exhaustive @@ -29,7 +29,7 @@ class BaseSearchResponse # See the `typo` field of the `exhaustive` object in the response. attr_accessor :exhaustive_typo - # Mapping of each facet name to the corresponding facet counts. + # Facet counts. attr_accessor :facets # Statistics for numerical facets. @@ -47,16 +47,16 @@ class BaseSearchResponse # Warnings about the query. attr_accessor :message - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits - # Number of pages of results for the current query. + # Number of pages of results. attr_accessor :nb_pages # Number of hits selected and sorted by the relevant sort algorithm. attr_accessor :nb_sorted_hits - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # 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. @@ -81,7 +81,7 @@ class BaseSearchResponse # Host name of the server that processed the request. attr_accessor :server_used - # Lets you store custom data in your indices. + # An object with custom data. You can store up to 32 kB as custom data. attr_accessor :user_data # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). @@ -354,6 +354,20 @@ def hits_per_page=(hits_per_page) @hits_per_page = hits_per_page end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/condition.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/condition.rb index 95851c2a51..1ce96d4435 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/condition.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/condition.rb @@ -6,17 +6,20 @@ module Algolia module Recommend class Condition - # Query pattern syntax. + # Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". attr_accessor :pattern attr_accessor :anchoring - # Whether the pattern matches on plurals, synonyms, and typos. + # Whether the pattern should match plurals, synonyms, and typos. attr_accessor :alternatives - # Rule context format: [A-Za-z0-9_-]+). + # An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. attr_accessor :context + # Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + attr_accessor :filters + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -45,7 +48,8 @@ def self.attribute_map :pattern => :pattern, :anchoring => :anchoring, :alternatives => :alternatives, - :context => :context + :context => :context, + :filters => :filters } end @@ -60,7 +64,8 @@ def self.types_mapping :pattern => :String, :anchoring => :Anchoring, :alternatives => :Boolean, - :context => :String + :context => :String, + :filters => :String } end @@ -101,6 +106,25 @@ def initialize(attributes = {}) if attributes.key?(:context) self.context = attributes[:context] end + + if attributes.key?(:filters) + self.filters = attributes[:filters] + end + end + + # Custom attribute writer method with validation + # @param [Object] context Value to be assigned + def context=(context) + if context.nil? + raise ArgumentError, 'context cannot be nil' + end + + pattern = /[A-Za-z0-9_-]+/ + if context !~ pattern + raise ArgumentError, "invalid value for \"context\", must conform to the pattern #{pattern}." + end + + @context = context end # Checks equality by comparing each attribute. @@ -112,7 +136,8 @@ def ==(other) pattern == other.pattern && anchoring == other.anchoring && alternatives == other.alternatives && - context == other.context + context == other.context && + filters == other.filters end # @see the `==` method @@ -124,7 +149,7 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [pattern, anchoring, alternatives, context].hash + [pattern, anchoring, alternatives, context, filters].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence.rb index 59af5a5d4a..b0e20fe45b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence.rb @@ -5,20 +5,20 @@ module Algolia module Recommend - # [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + # Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). class Consequence attr_accessor :params - # Records to promote. + # Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. attr_accessor :promote - # Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + # Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. attr_accessor :filter_promotes - # Records to hide. By default, you can hide up to 50 records per rule. + # Records you want to hide from the search results. attr_accessor :hide - # Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + # A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. attr_accessor :user_data # Attribute mapping from ruby-style variable name to JSON key. @@ -97,6 +97,34 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] promote Value to be assigned + def promote=(promote) + if promote.nil? + raise ArgumentError, 'promote cannot be nil' + end + + if promote.length > 300 + raise ArgumentError, 'invalid value for "promote", number of items must be less than or equal to 300.' + end + + @promote = promote + end + + # Custom attribute writer method with validation + # @param [Object] hide Value to be assigned + def hide=(hide) + if hide.nil? + raise ArgumentError, 'hide cannot be nil' + end + + if hide.length > 50 + raise ArgumentError, 'invalid value for "hide", number of items must be less than or equal to 50.' + end + + @hide = hide + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_hide.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_hide.rb index e40443b560..48295bda56 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_hide.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_hide.rb @@ -5,9 +5,9 @@ module Algolia module Recommend - # Unique identifier of the record to hide. + # Object ID of the record to hide. class ConsequenceHide - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_params.rb index ba23e1db78..ba9409af8e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_params.rb @@ -6,10 +6,10 @@ module Algolia module Recommend class ConsequenceParams - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -20,149 +20,143 @@ class ConsequenceParams attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -173,49 +167,49 @@ class ConsequenceParams attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -276,14 +270,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -367,14 +359,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -570,12 +560,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -602,12 +586,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -821,6 +799,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -853,6 +845,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -903,6 +913,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -934,14 +958,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -1001,7 +1023,7 @@ def eql?(other) # @return [Integer] Hash code def hash [similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, query, automatic_facet_filters, automatic_optional_facet_filters].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, query, automatic_facet_filters, automatic_optional_facet_filters].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query.rb index 84708b12bf..9d0a800fca 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + # Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. module ConsequenceQuery class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query_object.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query_object.rb index d50f74b9c1..4d19014d86 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query_object.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/consequence_query_object.rb @@ -6,10 +6,10 @@ module Algolia module Recommend class ConsequenceQueryObject - # Words to remove. + # Words to remove from the search query. attr_accessor :remove - # Edits to apply. + # Changes to make to the search query. attr_accessor :edits # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/deleted_at_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/deleted_at_response.rb index eb91ff9f93..7c4015e6a2 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/deleted_at_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/deleted_at_response.rb @@ -7,7 +7,7 @@ module Algolia module Recommend # Response, taskID, and deletion timestamp. class DeletedAtResponse - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id # Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/distinct.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/distinct.rb index f252aca590..f8f5c87963 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/distinct.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/distinct.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + # Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. module Distinct class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/edit.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/edit.rb index 6574d054cc..b618d05a12 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/edit.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/edit.rb @@ -11,7 +11,7 @@ class Edit # Text or patterns to remove from the query string. attr_accessor :delete - # Text that should be inserted in place of the removed text inside the query string. + # Text to be added in place of the deleted text inside the query string. attr_accessor :insert class EnumAttributeValidator diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_filters.rb index af19f41ef6..8e39aab7af 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_filters.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + # Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. module FacetFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_ordering.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_ordering.rb index 3bed63b9a4..49ade4cce5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_ordering.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facet_ordering.rb @@ -5,11 +5,11 @@ module Algolia module Recommend - # Defines the ordering of facets (widgets). + # Order of facet names and facet values in your UI. class FacetOrdering attr_accessor :facets - # Ordering of facet values within an individual facet. + # Order of facet values. One object for each facet. attr_accessor :values # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facets.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facets.rb index 0905bcee31..1486e7b8c7 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facets.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/facets.rb @@ -5,9 +5,9 @@ module Algolia module Recommend - # Ordering of facets (widgets). + # Order of facet names. class Facets - # Pinned order of facet lists. + # Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. attr_accessor :order # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/highlight_result_option.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/highlight_result_option.rb index 9050760df6..3b85152c00 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/highlight_result_option.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/highlight_result_option.rb @@ -5,14 +5,14 @@ module Algolia module Recommend - # Show highlighted section and words matched on a query. + # Surround words that match the query with HTML tags for highlighting. class HighlightResultOption - # Markup text with `facetQuery` matches highlighted. + # Highlighted attribute value, including HTML tags. attr_accessor :value attr_accessor :match_level - # List of words from the query that matched the object. + # List of matched words from the search query. attr_accessor :matched_words # Whether the entire attribute value is highlighted. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ignore_plurals.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ignore_plurals.rb index b85d090771..af376d024c 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ignore_plurals.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ignore_plurals.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + # Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. module IgnorePlurals class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/index_settings_as_search_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/index_settings_as_search_params.rb index bad47ab886..1f5c1b67c2 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/index_settings_as_search_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/index_settings_as_search_params.rb @@ -6,73 +6,70 @@ module Algolia module Recommend class IndexSettingsAsSearchParams - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -83,49 +80,49 @@ class IndexSettingsAsSearchParams attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -155,7 +152,6 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -211,7 +207,6 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -283,12 +278,6 @@ def initialize(attributes = {}) h[k.to_sym] = v end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -540,13 +529,26 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) return true if equal?(other) self.class == other.class && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -602,8 +604,8 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, - highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash + [attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, + snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/numeric_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/numeric_filters.rb index 656e08b63f..5db00625a0 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/numeric_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/numeric_filters.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + # Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. module NumericFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/optional_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/optional_filters.rb index 07fa70637b..e652899681 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/optional_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/optional_filters.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. module OptionalFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/params.rb index 876f15da5c..eb0c12e61f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/params.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Additional search parameters. + # Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. class Params attr_accessor :query diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_id.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_id.rb index 4ad31c7e88..faab3c645d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_id.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_id.rb @@ -7,10 +7,10 @@ module Algolia module Recommend # Record to promote. class PromoteObjectID - # Unique identifier of the record to promote. + # Unique record identifier. attr_accessor :object_id - # The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + # Position in the search results where you want to show the promoted records. attr_accessor :position # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_ids.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_ids.rb index 7a14ba239e..883ead3f16 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_ids.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/promote_object_ids.rb @@ -7,10 +7,10 @@ module Algolia module Recommend # Records to promote. class PromoteObjectIDs - # Unique identifiers of the records to promote. + # Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. attr_accessor :object_ids - # The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + # Position in the search results where you want to show the promoted records. attr_accessor :position # Attribute mapping from ruby-style variable name to JSON key. @@ -71,6 +71,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] object_ids Value to be assigned + def object_ids=(object_ids) + if object_ids.nil? + raise ArgumentError, 'object_ids cannot be nil' + end + + if object_ids.length > 100 + raise ArgumentError, 'invalid value for "object_ids", number of items must be less than or equal to 100.' + end + + @object_ids = object_ids + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ranking_info.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ranking_info.rb index 2b93108efe..a9bf58fcd2 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ranking_info.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/ranking_info.rb @@ -5,11 +5,12 @@ module Algolia module Recommend + # Object with detailed information about the record's ranking. class RankingInfo - # This field is reserved for advanced usage. + # Whether a filter matched the query. attr_accessor :filters - # Position of the most important matched attribute in the attributes to index list. + # Position of the first matched word in the best matching attribute of the record. attr_accessor :first_matched_word # Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). @@ -28,19 +29,19 @@ class RankingInfo # Number of typos encountered when matching the record. attr_accessor :nb_typos - # Present and set to true if a Rule promoted the hit. + # Whether the record was promoted by a rule. attr_accessor :promoted - # When the query contains more than one word, the sum of the distances between matched words (in meters). + # Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. attr_accessor :proximity_distance - # Custom ranking for the object, expressed as a single integer value. + # Overall ranking of the record, expressed as a single integer. This attribute is internal. attr_accessor :user_score - # Number of matched words, including prefixes and typos. + # Number of matched words. attr_accessor :words - # Wether the record are promoted by the re-ranking strategy. + # Whether the record is re-ranked. attr_accessor :promoted_by_re_ranking # Attribute mapping from ruby-style variable name to JSON key. @@ -177,6 +178,118 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] filters Value to be assigned + def filters=(filters) + if filters.nil? + raise ArgumentError, 'filters cannot be nil' + end + + if filters < 0 + raise ArgumentError, 'invalid value for "filters", must be greater than or equal to 0.' + end + + @filters = filters + end + + # Custom attribute writer method with validation + # @param [Object] first_matched_word Value to be assigned + def first_matched_word=(first_matched_word) + if first_matched_word.nil? + raise ArgumentError, 'first_matched_word cannot be nil' + end + + if first_matched_word < 0 + raise ArgumentError, 'invalid value for "first_matched_word", must be greater than or equal to 0.' + end + + @first_matched_word = first_matched_word + end + + # Custom attribute writer method with validation + # @param [Object] geo_distance Value to be assigned + def geo_distance=(geo_distance) + if geo_distance.nil? + raise ArgumentError, 'geo_distance cannot be nil' + end + + if geo_distance < 0 + raise ArgumentError, 'invalid value for "geo_distance", must be greater than or equal to 0.' + end + + @geo_distance = geo_distance + end + + # Custom attribute writer method with validation + # @param [Object] geo_precision Value to be assigned + def geo_precision=(geo_precision) + if geo_precision.nil? + raise ArgumentError, 'geo_precision cannot be nil' + end + + if geo_precision < 1 + raise ArgumentError, 'invalid value for "geo_precision", must be greater than or equal to 1.' + end + + @geo_precision = geo_precision + end + + # Custom attribute writer method with validation + # @param [Object] nb_exact_words Value to be assigned + def nb_exact_words=(nb_exact_words) + if nb_exact_words.nil? + raise ArgumentError, 'nb_exact_words cannot be nil' + end + + if nb_exact_words < 0 + raise ArgumentError, 'invalid value for "nb_exact_words", must be greater than or equal to 0.' + end + + @nb_exact_words = nb_exact_words + end + + # Custom attribute writer method with validation + # @param [Object] nb_typos Value to be assigned + def nb_typos=(nb_typos) + if nb_typos.nil? + raise ArgumentError, 'nb_typos cannot be nil' + end + + if nb_typos < 0 + raise ArgumentError, 'invalid value for "nb_typos", must be greater than or equal to 0.' + end + + @nb_typos = nb_typos + end + + # Custom attribute writer method with validation + # @param [Object] proximity_distance Value to be assigned + def proximity_distance=(proximity_distance) + if proximity_distance.nil? + raise ArgumentError, 'proximity_distance cannot be nil' + end + + if proximity_distance < 0 + raise ArgumentError, 'invalid value for "proximity_distance", must be greater than or equal to 0.' + end + + @proximity_distance = proximity_distance + end + + # Custom attribute writer method with validation + # @param [Object] words Value to be assigned + def words=(words) + if words.nil? + raise ArgumentError, 'words cannot be nil' + end + + if words < 1 + raise ArgumentError, 'invalid value for "words", must be greater than or equal to 1.' + end + + @words = words + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/re_ranking_apply_filter.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/re_ranking_apply_filter.rb index 067aec6d03..47ab8fc28d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/re_ranking_apply_filter.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/re_ranking_apply_filter.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + # Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. module ReRankingApplyFilter class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_hit.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_hit.rb index 114e61365f..478837029d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_hit.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_hit.rb @@ -7,13 +7,13 @@ module Algolia module Recommend # Recommend hit. class RecommendHit - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id - # Show highlighted section and words matched on a query. + # Surround words that match the query with HTML tags for highlighting. attr_accessor :_highlight_result - # Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + # Snippets that show the context around a matching search query. attr_accessor :_snippet_result attr_accessor :_ranking_info diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_hits.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_hits.rb index b5e100bceb..0f5b774f38 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_hits.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_hits.rb @@ -8,7 +8,7 @@ module Recommend class RecommendationsHits attr_accessor :hits - # Text to search for in an index. + # Search query. attr_accessor :query # URL-encoded string of all search parameters. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_query.rb index e49ef22676..be4dc5c011 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_query.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class RecommendationsQuery - # Algolia index name. + # Index name. attr_accessor :index_name # Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. @@ -17,7 +17,7 @@ class RecommendationsQuery attr_accessor :model - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id attr_accessor :query_parameters diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_results.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_results.rb index 382d6b7b1e..d9461f778a 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_results.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommendations_results.rb @@ -15,7 +15,7 @@ class RecommendationsResults # Computed geographical location. attr_accessor :around_lat_lng - # Automatically-computed radius. + # Distance from a central coordinate provided by `aroundLatLng`. attr_accessor :automatic_radius attr_accessor :exhaustive @@ -29,7 +29,7 @@ class RecommendationsResults # See the `typo` field of the `exhaustive` object in the response. attr_accessor :exhaustive_typo - # Mapping of each facet name to the corresponding facet counts. + # Facet counts. attr_accessor :facets # Statistics for numerical facets. @@ -47,16 +47,16 @@ class RecommendationsResults # Warnings about the query. attr_accessor :message - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits - # Number of pages of results for the current query. + # Number of pages of results. attr_accessor :nb_pages # Number of hits selected and sorted by the relevant sort algorithm. attr_accessor :nb_sorted_hits - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # 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. @@ -81,7 +81,7 @@ class RecommendationsResults # Host name of the server that processed the request. attr_accessor :server_used - # Lets you store custom data in your indices. + # An object with custom data. You can store up to 32 kB as custom data. attr_accessor :user_data # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). @@ -89,7 +89,7 @@ class RecommendationsResults attr_accessor :hits - # Text to search for in an index. + # Search query. attr_accessor :query # URL-encoded string of all search parameters. @@ -394,6 +394,20 @@ def hits_per_page=(hits_per_page) @hits_per_page = hits_per_page end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query.rb index 579745953b..14bb471e80 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class RecommendedForYouQuery - # Algolia index name. + # Index name. attr_accessor :index_name # Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb index 8a1465ce89..f69340d7ec 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb @@ -6,13 +6,13 @@ module Algolia module Recommend class RecommendedForYouQueryParameters - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -23,149 +23,143 @@ class RecommendedForYouQueryParameters attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -176,49 +170,49 @@ class RecommendedForYouQueryParameters attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -274,14 +268,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -363,14 +355,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -568,12 +558,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -600,12 +584,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -807,6 +785,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -839,6 +831,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -889,6 +899,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -921,14 +945,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -985,7 +1007,7 @@ def eql?(other) # @return [Integer] Hash code def hash [query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/remove_stop_words.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/remove_stop_words.rb index 8abc18d496..b9f2bf9dcd 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/remove_stop_words.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/remove_stop_words.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + # Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. module RemoveStopWords class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/rendering_content.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/rendering_content.rb index 40c17f8b0f..d9c68ec3d4 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/rendering_content.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/rendering_content.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + # Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. class RenderingContent attr_accessor :facet_ordering diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_object.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_object.rb index 8d2518bcab..afd606a815 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_object.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_object.rb @@ -6,13 +6,13 @@ module Algolia module Recommend class SearchParamsObject - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -23,149 +23,143 @@ class SearchParamsObject attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -176,49 +170,49 @@ class SearchParamsObject attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -274,14 +268,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -363,14 +355,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -566,12 +556,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -598,12 +582,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -805,6 +783,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -837,6 +829,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -887,6 +897,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -919,14 +943,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -983,7 +1005,7 @@ def eql?(other) # @return [Integer] Hash code def hash [query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_query.rb index 7b48ec9eec..e0c65e00ee 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_params_query.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class SearchParamsQuery - # Text to search for in an index. + # Search query. attr_accessor :query # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_params.rb index 535c604b7a..b55b2247fe 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_params.rb @@ -7,13 +7,13 @@ module Algolia module Recommend # Recommend rules search parameters. class SearchRecommendRulesParams - # Full-text query. + # Search query. attr_accessor :query # Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). attr_accessor :context - # Requested page (the first page is page 0). + # Requested page of the API response. attr_accessor :page # Maximum number of hits per page. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_response.rb index 8ba26edf99..9f97726768 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/search_recommend_rules_response.rb @@ -9,13 +9,13 @@ class SearchRecommendRulesResponse # Fetched rules. attr_accessor :hits - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Number of pages of results for the current query. + # Number of pages of results. attr_accessor :nb_pages # Attribute mapping from ruby-style variable name to JSON key. @@ -92,6 +92,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/semantic_search.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/semantic_search.rb index 853af56e3b..7ef54df4c3 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/semantic_search.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/semantic_search.rb @@ -5,9 +5,9 @@ module Algolia module Recommend - # Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + # Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. class SemanticSearch - # Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + # Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. attr_accessor :event_sources # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/snippet_result_option.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/snippet_result_option.rb index 91f3ae4c53..0eec2a6a15 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/snippet_result_option.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/snippet_result_option.rb @@ -5,9 +5,9 @@ module Algolia module Recommend - # Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + # Snippets that show the context around a matching search query. class SnippetResultOption - # Markup text with `facetQuery` matches highlighted. + # Highlighted attribute value, including HTML tags. attr_accessor :value attr_accessor :match_level diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/tag_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/tag_filters.rb index 085718f7d1..1170af392c 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/tag_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/tag_filters.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + # Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. module TagFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_facets_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_facets_query.rb index ea957432e5..43fd52a9e7 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_facets_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_facets_query.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class TrendingFacetsQuery - # Algolia index name. + # Index name. attr_accessor :index_name # Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_items_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_items_query.rb index 492de01cc1..fdbdec5c57 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_items_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/trending_items_query.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class TrendingItemsQuery - # Algolia index name. + # Index name. attr_accessor :index_name # Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/typo_tolerance.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/typo_tolerance.rb index 189387584c..e896aa70fc 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/typo_tolerance.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/typo_tolerance.rb @@ -5,7 +5,7 @@ module Algolia module Recommend - # Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + # Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. module TypoTolerance class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/value.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/value.rb index 6d3f90f69b..1e34c7d72b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/value.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/value.rb @@ -6,7 +6,7 @@ module Algolia module Recommend class Value - # Pinned order of facet lists. + # Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. attr_accessor :order attr_accessor :sort_remaining_by diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/add_api_key_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/add_api_key_response.rb index 6e16cfb4f4..fed7f0eae0 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/add_api_key_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/add_api_key_response.rb @@ -9,7 +9,7 @@ class AddApiKeyResponse # API key. attr_accessor :key - # Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + # Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. attr_accessor :created_at # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/api_key.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/api_key.rb index 670b4d3965..00d2c16e94 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/api_key.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/api_key.rb @@ -7,28 +7,28 @@ module Algolia module Search # API key object. class ApiKey - # [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + # Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). attr_accessor :acl - # Description of an API key for you and your team members. + # Description of an API key to help you identify this API key. attr_accessor :description - # Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + # Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". attr_accessor :indexes - # Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + # Maximum number of results this API key can retrieve in one query. By default, there's no limit. attr_accessor :max_hits_per_query - # Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + # Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. attr_accessor :max_queries_per_ip_per_hour - # Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + # Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. attr_accessor :query_parameters - # Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + # Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). attr_accessor :referers - # Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + # Duration (in seconds) after which the API key expires. By default, API keys don't expire. attr_accessor :validity # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb index ee61663826..35656e94c8 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + # Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. module AroundPrecision class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision_from_value_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision_from_value_inner.rb index 258d87ae9b..4ef507587b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision_from_value_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision_from_value_inner.rb @@ -5,9 +5,12 @@ module Algolia module Search + # Range object with lower and upper values in meters to define custom ranges. class AroundPrecisionFromValueInner + # Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. attr_accessor :from + # Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_radius.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_radius.rb index 316433464c..6ffc1ccb74 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_radius.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_radius.rb @@ -5,7 +5,7 @@ module Algolia module Search - # [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters). + # Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates. module AroundRadius class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filter.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filter.rb index d2cadceb75..77ce27f5b6 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filter.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filter.rb @@ -5,15 +5,15 @@ module Algolia module Search - # Automatic facet Filter. + # Filter or optional filter to be applied to the search. class AutomaticFacetFilter - # Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + # Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. attr_accessor :facet - # Score for the filter. Typically used for optional or disjunctive filters. + # Filter scores to give different weights to individual filters. attr_accessor :score - # Whether the filter is disjunctive (true) or conjunctive (false). + # Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation. attr_accessor :disjunctive # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filters.rb index d272ec2399..5d43117ca6 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/automatic_facet_filters.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + # Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies. module AutomaticFacetFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_index_settings.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_index_settings.rb index 621e67ed6b..382cf1e239 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_index_settings.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_index_settings.rb @@ -6,57 +6,61 @@ module Algolia module Search class BaseIndexSettings - # Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + attr_accessor :attributes_for_faceting + + # Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). attr_accessor :replicas - # Maximum number of hits accessible through pagination. + # Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. attr_accessor :pagination_limited_to - # Attributes that can't be retrieved at query time. + # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. attr_accessor :unretrievable_attributes - # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. attr_accessor :disable_typo_tolerance_on_words - # Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. attr_accessor :attributes_to_transliterate - # Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + # Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. attr_accessor :camel_case_attributes - # Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + # Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). attr_accessor :decompounded_attributes - # Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :index_languages - # Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + # Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). attr_accessor :disable_prefix_on_attributes - # Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + # Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. attr_accessor :allow_compression_of_integer_array - # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. attr_accessor :numeric_attributes_for_filtering - # Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. attr_accessor :separators_to_index - # [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + # Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. attr_accessor :searchable_attributes - # Lets you store custom data in your indices. + # An object with custom data. You can store up to 32 kB as custom data. attr_accessor :user_data - # A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). attr_accessor :custom_normalization - # Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + # Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. attr_accessor :attribute_for_distinct # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :attributes_for_faceting => :attributesForFaceting, :replicas => :replicas, :pagination_limited_to => :paginationLimitedTo, :unretrievable_attributes => :unretrievableAttributes, @@ -84,6 +88,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { + :attributes_for_faceting => :'Array', :replicas => :'Array', :pagination_limited_to => :Integer, :unretrievable_attributes => :'Array', @@ -127,6 +132,12 @@ def initialize(attributes = {}) h[k.to_sym] = v end + if attributes.key?(:attributes_for_faceting) + if (value = attributes[:attributes_for_faceting]).is_a?(Array) + self.attributes_for_faceting = value + end + end + if attributes.key?(:replicas) if (value = attributes[:replicas]).is_a?(Array) self.replicas = value @@ -212,12 +223,27 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] pagination_limited_to Value to be assigned + def pagination_limited_to=(pagination_limited_to) + if pagination_limited_to.nil? + raise ArgumentError, 'pagination_limited_to cannot be nil' + end + + if pagination_limited_to > 20_000 + raise ArgumentError, 'invalid value for "pagination_limited_to", must be smaller than or equal to 20000.' + end + + @pagination_limited_to = pagination_limited_to + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) return true if equal?(other) self.class == other.class && + attributes_for_faceting == other.attributes_for_faceting && replicas == other.replicas && pagination_limited_to == other.pagination_limited_to && unretrievable_attributes == other.unretrievable_attributes && @@ -245,8 +271,8 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes, decompounded_attributes, - index_languages, disable_prefix_on_attributes, allow_compression_of_integer_array, numeric_attributes_for_filtering, separators_to_index, searchable_attributes, user_data, custom_normalization, attribute_for_distinct].hash + [attributes_for_faceting, replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes, + decompounded_attributes, index_languages, disable_prefix_on_attributes, allow_compression_of_integer_array, numeric_attributes_for_filtering, separators_to_index, searchable_attributes, user_data, custom_normalization, attribute_for_distinct].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params.rb index c718f3037c..7ce1d62a49 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params.rb @@ -6,13 +6,13 @@ module Algolia module Search class BaseSearchParams - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -23,80 +23,77 @@ class BaseSearchParams attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test # Attribute mapping from ruby-style variable name to JSON key. @@ -128,7 +125,6 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, @@ -172,7 +168,6 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, @@ -328,12 +323,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -361,6 +350,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -393,6 +396,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -425,7 +446,6 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && @@ -444,7 +464,7 @@ def eql?(other) # @return [Integer] Hash code def hash [query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params_without_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params_without_query.rb index c8f76159ec..f12d6b2e87 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params_without_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_params_without_query.rb @@ -6,10 +6,10 @@ module Algolia module Search class BaseSearchParamsWithoutQuery - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -20,80 +20,77 @@ class BaseSearchParamsWithoutQuery attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test # Attribute mapping from ruby-style variable name to JSON key. @@ -124,7 +121,6 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, @@ -167,7 +163,6 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, @@ -311,12 +306,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -344,6 +333,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -376,6 +379,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -407,7 +428,6 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && @@ -426,7 +446,7 @@ def eql?(other) # @return [Integer] Hash code def hash [similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_response.rb index f805472bc3..07be49947e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/base_search_response.rb @@ -15,7 +15,7 @@ class BaseSearchResponse # Computed geographical location. attr_accessor :around_lat_lng - # Automatically-computed radius. + # Distance from a central coordinate provided by `aroundLatLng`. attr_accessor :automatic_radius attr_accessor :exhaustive @@ -29,7 +29,7 @@ class BaseSearchResponse # See the `typo` field of the `exhaustive` object in the response. attr_accessor :exhaustive_typo - # Mapping of each facet name to the corresponding facet counts. + # Facet counts. attr_accessor :facets # Statistics for numerical facets. @@ -47,16 +47,16 @@ class BaseSearchResponse # Warnings about the query. attr_accessor :message - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits - # Number of pages of results for the current query. + # Number of pages of results. attr_accessor :nb_pages # Number of hits selected and sorted by the relevant sort algorithm. attr_accessor :nb_sorted_hits - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # 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. @@ -81,7 +81,7 @@ class BaseSearchResponse # Host name of the server that processed the request. attr_accessor :server_used - # Lets you store custom data in your indices. + # An object with custom data. You can store up to 32 kB as custom data. attr_accessor :user_data # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). @@ -354,6 +354,20 @@ def hits_per_page=(hits_per_page) @hits_per_page = hits_per_page end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_dictionary_entries_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_dictionary_entries_params.rb index 3640a0d06c..b988a65913 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_dictionary_entries_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_dictionary_entries_params.rb @@ -5,12 +5,12 @@ module Algolia module Search - # `batchDictionaryEntries` parameters. + # Request body for updating dictionary entries. class BatchDictionaryEntriesParams - # Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + # Whether to replace all custom entries in the dictionary with the ones sent with this request. attr_accessor :clear_existing_dictionary_entries - # Operations to batch. + # List of additions and deletions to your dictionaries. attr_accessor :requests # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_response.rb index b15a8af470..d1aef92f9b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/batch_response.rb @@ -6,10 +6,10 @@ module Algolia module Search class BatchResponse - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id - # Unique object (record) identifiers. + # Unique record identifiers. attr_accessor :object_ids # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_params_object.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_params_object.rb index bccdb9af30..d7b9d83194 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_params_object.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_params_object.rb @@ -6,13 +6,13 @@ module Algolia module Search class BrowseParamsObject - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -23,149 +23,143 @@ class BrowseParamsObject attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -176,54 +170,54 @@ class BrowseParamsObject attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter - # Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + # Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. attr_accessor :cursor class EnumAttributeValidator @@ -277,14 +271,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -367,14 +359,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -571,12 +561,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -603,12 +587,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -814,6 +792,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -846,6 +838,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -896,6 +906,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -928,14 +952,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -993,7 +1015,7 @@ def eql?(other) # @return [Integer] Hash code def hash [query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, cursor].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, cursor].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_response.rb index 6275bfe1b5..5b76e9e27f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_response.rb @@ -15,7 +15,7 @@ class BrowseResponse # Computed geographical location. attr_accessor :around_lat_lng - # Automatically-computed radius. + # Distance from a central coordinate provided by `aroundLatLng`. attr_accessor :automatic_radius attr_accessor :exhaustive @@ -29,7 +29,7 @@ class BrowseResponse # See the `typo` field of the `exhaustive` object in the response. attr_accessor :exhaustive_typo - # Mapping of each facet name to the corresponding facet counts. + # Facet counts. attr_accessor :facets # Statistics for numerical facets. @@ -47,16 +47,16 @@ class BrowseResponse # Warnings about the query. attr_accessor :message - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits - # Number of pages of results for the current query. + # Number of pages of results. attr_accessor :nb_pages # Number of hits selected and sorted by the relevant sort algorithm. attr_accessor :nb_sorted_hits - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # 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. @@ -81,21 +81,22 @@ class BrowseResponse # Host name of the server that processed the request. attr_accessor :server_used - # Lets you store custom data in your indices. + # An object with custom data. You can store up to 32 kB as custom data. attr_accessor :user_data # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). attr_accessor :query_id + # Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. attr_accessor :hits - # Text to search for in an index. + # Search query. attr_accessor :query # URL-encoded string of all search parameters. attr_accessor :params - # Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + # Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. attr_accessor :cursor # Attribute mapping from ruby-style variable name to JSON key. @@ -408,6 +409,20 @@ def hits_per_page=(hits_per_page) @hits_per_page = hits_per_page end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/built_in_operation.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/built_in_operation.rb index 3f77113f1e..f7ffcb1629 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/built_in_operation.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/built_in_operation.rb @@ -5,11 +5,11 @@ module Algolia module Search - # To update an attribute without pushing the entire record, you can use these built-in operations. + # Update to perform on the attribute. class BuiltInOperation attr_accessor :_operation - # Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + # Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value. attr_accessor :value class EnumAttributeValidator diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/condition.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/condition.rb index 7b4106d2aa..fc9081b3e0 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/condition.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/condition.rb @@ -6,17 +6,20 @@ module Algolia module Search class Condition - # Query pattern syntax. + # Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". attr_accessor :pattern attr_accessor :anchoring - # Whether the pattern matches on plurals, synonyms, and typos. + # Whether the pattern should match plurals, synonyms, and typos. attr_accessor :alternatives - # Rule context format: [A-Za-z0-9_-]+). + # An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. attr_accessor :context + # Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. + attr_accessor :filters + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -45,7 +48,8 @@ def self.attribute_map :pattern => :pattern, :anchoring => :anchoring, :alternatives => :alternatives, - :context => :context + :context => :context, + :filters => :filters } end @@ -60,7 +64,8 @@ def self.types_mapping :pattern => :String, :anchoring => :Anchoring, :alternatives => :Boolean, - :context => :String + :context => :String, + :filters => :String } end @@ -101,6 +106,25 @@ def initialize(attributes = {}) if attributes.key?(:context) self.context = attributes[:context] end + + if attributes.key?(:filters) + self.filters = attributes[:filters] + end + end + + # Custom attribute writer method with validation + # @param [Object] context Value to be assigned + def context=(context) + if context.nil? + raise ArgumentError, 'context cannot be nil' + end + + pattern = /[A-Za-z0-9_-]+/ + if context !~ pattern + raise ArgumentError, "invalid value for \"context\", must conform to the pattern #{pattern}." + end + + @context = context end # Checks equality by comparing each attribute. @@ -112,7 +136,8 @@ def ==(other) pattern == other.pattern && anchoring == other.anchoring && alternatives == other.alternatives && - context == other.context + context == other.context && + filters == other.filters end # @see the `==` method @@ -124,7 +149,7 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [pattern, anchoring, alternatives, context].hash + [pattern, anchoring, alternatives, context, filters].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence.rb index 1f8320d403..de28e514f3 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence.rb @@ -5,20 +5,20 @@ module Algolia module Search - # [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. + # Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). class Consequence attr_accessor :params - # Records to promote. + # Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each. attr_accessor :promote - # Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + # Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. attr_accessor :filter_promotes - # Records to hide. By default, you can hide up to 50 records per rule. + # Records you want to hide from the search results. attr_accessor :hide - # Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON. + # A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON. attr_accessor :user_data # Attribute mapping from ruby-style variable name to JSON key. @@ -97,6 +97,34 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] promote Value to be assigned + def promote=(promote) + if promote.nil? + raise ArgumentError, 'promote cannot be nil' + end + + if promote.length > 300 + raise ArgumentError, 'invalid value for "promote", number of items must be less than or equal to 300.' + end + + @promote = promote + end + + # Custom attribute writer method with validation + # @param [Object] hide Value to be assigned + def hide=(hide) + if hide.nil? + raise ArgumentError, 'hide cannot be nil' + end + + if hide.length > 50 + raise ArgumentError, 'invalid value for "hide", number of items must be less than or equal to 50.' + end + + @hide = hide + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_hide.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_hide.rb index c457237ff2..0bc848d5bc 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_hide.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_hide.rb @@ -5,9 +5,9 @@ module Algolia module Search - # Unique identifier of the record to hide. + # Object ID of the record to hide. class ConsequenceHide - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_params.rb index 8b0e26ddd2..6640586acf 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_params.rb @@ -6,10 +6,10 @@ module Algolia module Search class ConsequenceParams - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -20,149 +20,143 @@ class ConsequenceParams attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -173,49 +167,49 @@ class ConsequenceParams attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -276,14 +270,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -367,14 +359,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -570,12 +560,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -602,12 +586,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -821,6 +799,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -853,6 +845,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -903,6 +913,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -934,14 +958,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -1001,7 +1023,7 @@ def eql?(other) # @return [Integer] Hash code def hash [similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, query, automatic_facet_filters, automatic_optional_facet_filters].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, query, automatic_facet_filters, automatic_optional_facet_filters].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query.rb index 5d04180e9b..778e1d1145 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query.rb @@ -5,7 +5,7 @@ module Algolia module Search - # When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can't do both). + # Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. module ConsequenceQuery class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query_object.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query_object.rb index fb28b49d26..d337ff0ced 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query_object.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_query_object.rb @@ -6,10 +6,10 @@ module Algolia module Search class ConsequenceQueryObject - # Words to remove. + # Words to remove from the search query. attr_accessor :remove - # Edits to apply. + # Changes to make to the search query. attr_accessor :edits # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/created_at_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/created_at_response.rb index 1f8b563d60..9cd4d47453 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/created_at_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/created_at_response.rb @@ -7,7 +7,7 @@ module Algolia module Search # Response and creation timestamp. class CreatedAtResponse - # Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + # Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. attr_accessor :created_at # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/cursor.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/cursor.rb index 7418d1cf0c..4ff501e439 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/cursor.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/cursor.rb @@ -6,7 +6,7 @@ module Algolia module Search class Cursor - # Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response. + # Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute. attr_accessor :cursor # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/delete_by_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/delete_by_params.rb index 923bc42e6b..d5f9e4deef 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/delete_by_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/delete_by_params.rb @@ -8,22 +8,22 @@ module Search class DeleteByParams attr_accessor :facet_filters - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :numeric_filters attr_accessor :tag_filters - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng attr_accessor :around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/deleted_at_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/deleted_at_response.rb index b18f3fb6b8..9b05275f80 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/deleted_at_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/deleted_at_response.rb @@ -7,7 +7,7 @@ module Algolia module Search # Response, taskID, and deletion timestamp. class DeletedAtResponse - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id # Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_entry.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_entry.rb index 3ca2b99085..dc7a3637fa 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_entry.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_entry.rb @@ -7,19 +7,19 @@ module Algolia module Search # Dictionary entry. class DictionaryEntry - # Unique identifier for a dictionary object. + # Unique identifier for the dictionary entry. attr_accessor :object_id - # [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + # ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). attr_accessor :language - # Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the linking \"e\". + # Matching dictionary word for `stopwords` and `compounds` dictionaries. attr_accessor :word - # Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the custom dictionary and setting its `state` to `disabled`. + # Matching words in the `plurals` dictionary including declensions. attr_accessor :words - # For compound entries, governs the behavior of the `word` parameter. + # Invividual components of a compound word in the `compounds` dictionary. attr_accessor :decomposition attr_accessor :state diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_language.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_language.rb index a6d3521de3..68b00d15bc 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_language.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_language.rb @@ -5,9 +5,9 @@ module Algolia module Search - # Custom entries for a dictionary. + # Dictionary type. If `null`, this dictionary type isn't supported for the language. class DictionaryLanguage - # If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, that feature isn't available or isn't supported for that language. + # Number of custom dictionary entries. attr_accessor :nb_custom_entries # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_settings_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_settings_params.rb index 0473a7a2e5..25f53dc462 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_settings_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/dictionary_settings_params.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Enable or turn off the built-in Algolia stop words for a specific language. + # Turn on or off the built-in Algolia stop words for a specific language. class DictionarySettingsParams attr_accessor :disable_standard_entries diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/distinct.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/distinct.rb index af35d68376..2233c75a0f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/distinct.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/distinct.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + # Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set. module Distinct class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/edit.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/edit.rb index e84227ed8b..2c1e334143 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/edit.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/edit.rb @@ -11,7 +11,7 @@ class Edit # Text or patterns to remove from the query string. attr_accessor :delete - # Text that should be inserted in place of the removed text inside the query string. + # Text to be added in place of the deleted text inside the query string. attr_accessor :insert class EnumAttributeValidator diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_filters.rb index 856dbda2b3..4ad8e0f345 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_filters.rb @@ -5,7 +5,7 @@ module Algolia module Search - # [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + # Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. module FacetFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_hits.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_hits.rb index c48ac19a1e..99f13e3fd5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_hits.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_hits.rb @@ -9,10 +9,10 @@ class FacetHits # Facet value. attr_accessor :value - # Markup text with `facetQuery` matches highlighted. + # Highlighted attribute value, including HTML tags. attr_accessor :highlighted - # Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + # Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). attr_accessor :count # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_ordering.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_ordering.rb index 5a971b67f0..43433df84d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_ordering.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facet_ordering.rb @@ -5,11 +5,11 @@ module Algolia module Search - # Defines the ordering of facets (widgets). + # Order of facet names and facet values in your UI. class FacetOrdering attr_accessor :facets - # Ordering of facet values within an individual facet. + # Order of facet values. One object for each facet. attr_accessor :values # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facets.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facets.rb index c2ad9af5ce..34ba9b65c8 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/facets.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/facets.rb @@ -5,9 +5,9 @@ module Algolia module Search - # Ordering of facets (widgets). + # Order of facet names. class Facets - # Pinned order of facet lists. + # Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. attr_accessor :order # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_api_key_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_api_key_response.rb index 0169b95296..6fe0543747 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_api_key_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_api_key_response.rb @@ -12,28 +12,28 @@ class GetApiKeyResponse # Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). attr_accessor :created_at - # [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. + # Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). attr_accessor :acl - # Description of an API key for you and your team members. + # Description of an API key to help you identify this API key. attr_accessor :description - # Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". + # Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". attr_accessor :indexes - # Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + # Maximum number of results this API key can retrieve in one query. By default, there's no limit. attr_accessor :max_hits_per_query - # Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. + # Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit. attr_accessor :max_queries_per_ip_per_hour - # Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. + # Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range. attr_accessor :query_parameters - # Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". + # Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). attr_accessor :referers - # Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. + # Duration (in seconds) after which the API key expires. By default, API keys don't expire. attr_accessor :validity # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_request.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_request.rb index 5b58c3cc63..195d805243 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_request.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_request.rb @@ -5,15 +5,15 @@ module Algolia module Search - # Record retrieval operation. + # Request body for retrieving records. class GetObjectsRequest # Attributes to retrieve. If not specified, all retrievable attributes are returned. attr_accessor :attributes_to_retrieve - # Record's objectID. + # Object ID for the record to retrieve. attr_accessor :object_id - # Name of the index containing the required records. + # Index from which to retrieve the records. attr_accessor :index_name # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_response.rb index 719339051c..7fa9e2d7ac 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/get_objects_response.rb @@ -6,7 +6,7 @@ module Algolia module Search class GetObjectsResponse - # Retrieved results. + # Retrieved records. attr_accessor :results # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/has_pending_mappings_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/has_pending_mappings_response.rb index 2f4143b8b4..293bbd21d5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/has_pending_mappings_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/has_pending_mappings_response.rb @@ -6,7 +6,7 @@ module Algolia module Search class HasPendingMappingsResponse - # Indicates whether there are clusters undergoing migration, creation, or deletion. + # Whether there are clusters undergoing migration, creation, or deletion. attr_accessor :pending # Cluster pending mapping state: migrating, creating, deleting. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/highlight_result_option.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/highlight_result_option.rb index 450e1a5801..ca0405bbc0 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/highlight_result_option.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/highlight_result_option.rb @@ -5,14 +5,14 @@ module Algolia module Search - # Show highlighted section and words matched on a query. + # Surround words that match the query with HTML tags for highlighting. class HighlightResultOption - # Markup text with `facetQuery` matches highlighted. + # Highlighted attribute value, including HTML tags. attr_accessor :value attr_accessor :match_level - # List of words from the query that matched the object. + # List of matched words from the search query. attr_accessor :matched_words # Whether the entire attribute value is highlighted. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/hit.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/hit.rb index 2dc9bbec37..82c9c14e16 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/hit.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/hit.rb @@ -5,15 +5,15 @@ module Algolia module Search - # A single hit. + # Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking. class Hit - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id - # Show highlighted section and words matched on a query. + # Surround words that match the query with HTML tags for highlighting. attr_accessor :_highlight_result - # Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + # Snippets that show the context around a matching search query. attr_accessor :_snippet_result attr_accessor :_ranking_info diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/ignore_plurals.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/ignore_plurals.rb index a8524262ca..a2cda1cf3b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/ignore_plurals.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/ignore_plurals.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). + # Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index. module IgnorePlurals class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings.rb index eeaa056bf7..90583955e8 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings.rb @@ -5,123 +5,123 @@ module Algolia module Search - # Algolia index settings. + # Index settings. class IndexSettings - # Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings. + # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers**
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. + attr_accessor :attributes_for_faceting + + # Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). attr_accessor :replicas - # Maximum number of hits accessible through pagination. + # Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. attr_accessor :pagination_limited_to - # Attributes that can't be retrieved at query time. + # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. attr_accessor :unretrievable_attributes - # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words. attr_accessor :disable_typo_tolerance_on_words - # Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. attr_accessor :attributes_to_transliterate - # Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + # Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. attr_accessor :camel_case_attributes - # Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies. + # Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). attr_accessor :decompounded_attributes - # Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :index_languages - # Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + # Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). attr_accessor :disable_prefix_on_attributes - # Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. + # Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered. attr_accessor :allow_compression_of_integer_array - # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and `!=`.
Without modifier, all numeric comparisons are supported. attr_accessor :numeric_attributes_for_filtering - # Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches. attr_accessor :separators_to_index - # [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + # Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the end. attr_accessor :searchable_attributes - # Lets you store custom data in your indices. + # An object with custom data. You can store up to 32 kB as custom data. attr_accessor :user_data - # A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). attr_accessor :custom_normalization - # Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + # Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. attr_accessor :attribute_for_distinct - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -132,49 +132,49 @@ class IndexSettings attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -204,6 +204,7 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :attributes_for_faceting => :attributesForFaceting, :replicas => :replicas, :pagination_limited_to => :paginationLimitedTo, :unretrievable_attributes => :unretrievableAttributes, @@ -220,7 +221,6 @@ def self.attribute_map :user_data => :userData, :custom_normalization => :customNormalization, :attribute_for_distinct => :attributeForDistinct, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -276,6 +276,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { + :attributes_for_faceting => :'Array', :replicas => :'Array', :pagination_limited_to => :Integer, :unretrievable_attributes => :'Array', @@ -292,7 +293,6 @@ def self.types_mapping :user_data => :Object, :custom_normalization => :'Hash>', :attribute_for_distinct => :String, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -372,6 +372,12 @@ def initialize(attributes = {}) h[k.to_sym] = v end + if attributes.key?(:attributes_for_faceting) + if (value = attributes[:attributes_for_faceting]).is_a?(Array) + self.attributes_for_faceting = value + end + end + if attributes.key?(:replicas) if (value = attributes[:replicas]).is_a?(Array) self.replicas = value @@ -456,12 +462,6 @@ def initialize(attributes = {}) self.attribute_for_distinct = attributes[:attribute_for_distinct] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -663,6 +663,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] pagination_limited_to Value to be assigned + def pagination_limited_to=(pagination_limited_to) + if pagination_limited_to.nil? + raise ArgumentError, 'pagination_limited_to cannot be nil' + end + + if pagination_limited_to > 20_000 + raise ArgumentError, 'invalid value for "pagination_limited_to", must be smaller than or equal to 20000.' + end + + @pagination_limited_to = pagination_limited_to + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -713,12 +727,27 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) return true if equal?(other) self.class == other.class && + attributes_for_faceting == other.attributes_for_faceting && replicas == other.replicas && pagination_limited_to == other.pagination_limited_to && unretrievable_attributes == other.unretrievable_attributes && @@ -735,7 +764,6 @@ def ==(other) user_data == other.user_data && custom_normalization == other.custom_normalization && attribute_for_distinct == other.attribute_for_distinct && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -791,8 +819,8 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes, decompounded_attributes, - index_languages, disable_prefix_on_attributes, allow_compression_of_integer_array, numeric_attributes_for_filtering, separators_to_index, searchable_attributes, user_data, custom_normalization, attribute_for_distinct, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash + [attributes_for_faceting, replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes, + decompounded_attributes, index_languages, disable_prefix_on_attributes, allow_compression_of_integer_array, numeric_attributes_for_filtering, separators_to_index, searchable_attributes, user_data, custom_normalization, attribute_for_distinct, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings_as_search_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings_as_search_params.rb index c763215bb9..a85a1bdd94 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings_as_search_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings_as_search_params.rb @@ -6,73 +6,70 @@ module Algolia module Search class IndexSettingsAsSearchParams - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -83,49 +80,49 @@ class IndexSettingsAsSearchParams attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -155,7 +152,6 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -211,7 +207,6 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -283,12 +278,6 @@ def initialize(attributes = {}) h[k.to_sym] = v end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -540,13 +529,26 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) return true if equal?(other) self.class == other.class && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -602,8 +604,8 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, - highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash + [attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, + snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/log.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/log.rb index 35c702d25c..4d411138a5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/log.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/log.rb @@ -6,37 +6,37 @@ module Algolia module Search class Log - # Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + # Timestamp of the API request in ISO 8601 format. attr_accessor :timestamp - # HTTP method of the performed request. + # HTTP method of the request. attr_accessor :method - # HTTP response code. + # HTTP status code of the response. attr_accessor :answer_code - # Request body. Truncated after 1,000 characters. + # Request body. attr_accessor :query_body - # Answer body. Truncated after 1,000 characters. + # Response body. attr_accessor :answer - # Request URL. + # URL of the API endpoint. attr_accessor :url # IP address of the client that performed the request. attr_accessor :ip - # Request headers (API key is obfuscated). + # Request headers (API keys are obfuscated). attr_accessor :query_headers # SHA1 signature of the log entry. attr_accessor :sha1 - # Number of API calls. + # Number of API requests. attr_accessor :nb_api_calls - # Processing time for the query. Doesn't include network time. + # Processing time for the query in milliseconds. This doesn't include latency due to the network. attr_accessor :processing_time_ms # Index targeted by the query. @@ -45,10 +45,10 @@ class Log # Query parameters sent with the request. attr_accessor :_query_params - # Number of hits returned for the query. + # Number of search results (hits) returned for the query. attr_accessor :query_nb_hits - # Performed queries for the given request. + # Queries performed for the given request. attr_accessor :inner_queries # Attribute mapping from ruby-style variable name to JSON key. @@ -205,6 +205,34 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] query_body Value to be assigned + def query_body=(query_body) + if query_body.nil? + raise ArgumentError, 'query_body cannot be nil' + end + + if query_body.to_s.length > 1000 + raise ArgumentError, 'invalid value for "query_body", the character length must be smaller than or equal to 1000.' + end + + @query_body = query_body + end + + # Custom attribute writer method with validation + # @param [Object] answer Value to be assigned + def answer=(answer) + if answer.nil? + raise ArgumentError, 'answer cannot be nil' + end + + if answer.to_s.length > 1000 + raise ArgumentError, 'invalid value for "answer", the character length must be smaller than or equal to 1000.' + end + + @answer = answer + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/log_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/log_query.rb index 5bf2860f40..30e918643d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/log_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/log_query.rb @@ -9,7 +9,7 @@ class LogQuery # Index targeted by the query. attr_accessor :index_name - # User identifier. + # A user identifier. attr_accessor :user_token # Unique query identifier. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/multiple_batch_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/multiple_batch_response.rb index 5361d155dc..624defaaa8 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/multiple_batch_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/multiple_batch_response.rb @@ -6,10 +6,10 @@ module Algolia module Search class MultipleBatchResponse - # TaskIDs per index. + # Task IDs. One for each index. attr_accessor :task_id - # Unique object (record) identifiers. + # Unique record identifiers. attr_accessor :object_ids # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/numeric_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/numeric_filters.rb index 43e1d2064c..d208e98f55 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/numeric_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/numeric_filters.rb @@ -5,7 +5,7 @@ module Algolia module Search - # [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + # Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`. module NumericFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/operation_index_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/operation_index_params.rb index 60d3ef148b..a05381717f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/operation_index_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/operation_index_params.rb @@ -8,10 +8,10 @@ module Search class OperationIndexParams attr_accessor :operation - # Algolia index name. + # Index name. attr_accessor :destination - # **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + # **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules. attr_accessor :scope class EnumAttributeValidator diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/optional_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/optional_filters.rb index 0cebc5e60b..88e1bd271f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/optional_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/optional_filters.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don't match the optional filter are still included in the results, only their ranking is affected. + # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes. module OptionalFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/params.rb index 3bc89efc57..d96479b4f5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/params.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Additional search parameters. + # Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. class Params attr_accessor :query diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_id.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_id.rb index 06c330f3cf..d39e98dc87 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_id.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_id.rb @@ -7,10 +7,10 @@ module Algolia module Search # Record to promote. class PromoteObjectID - # Unique identifier of the record to promote. + # Unique record identifier. attr_accessor :object_id - # The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + # Position in the search results where you want to show the promoted records. attr_accessor :position # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_ids.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_ids.rb index 15c3504291..ac677384e6 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_ids.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/promote_object_ids.rb @@ -7,10 +7,10 @@ module Algolia module Search # Records to promote. class PromoteObjectIDs - # Unique identifiers of the records to promote. + # Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results. attr_accessor :object_ids - # The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + # Position in the search results where you want to show the promoted records. attr_accessor :position # Attribute mapping from ruby-style variable name to JSON key. @@ -71,6 +71,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] object_ids Value to be assigned + def object_ids=(object_ids) + if object_ids.nil? + raise ArgumentError, 'object_ids cannot be nil' + end + + if object_ids.length > 100 + raise ArgumentError, 'invalid value for "object_ids", number of items must be less than or equal to 100.' + end + + @object_ids = object_ids + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/ranking_info.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/ranking_info.rb index 3cd625586f..e60e2bcb3e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/ranking_info.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/ranking_info.rb @@ -5,11 +5,12 @@ module Algolia module Search + # Object with detailed information about the record's ranking. class RankingInfo - # This field is reserved for advanced usage. + # Whether a filter matched the query. attr_accessor :filters - # Position of the most important matched attribute in the attributes to index list. + # Position of the first matched word in the best matching attribute of the record. attr_accessor :first_matched_word # Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). @@ -28,19 +29,19 @@ class RankingInfo # Number of typos encountered when matching the record. attr_accessor :nb_typos - # Present and set to true if a Rule promoted the hit. + # Whether the record was promoted by a rule. attr_accessor :promoted - # When the query contains more than one word, the sum of the distances between matched words (in meters). + # Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. attr_accessor :proximity_distance - # Custom ranking for the object, expressed as a single integer value. + # Overall ranking of the record, expressed as a single integer. This attribute is internal. attr_accessor :user_score - # Number of matched words, including prefixes and typos. + # Number of matched words. attr_accessor :words - # Wether the record are promoted by the re-ranking strategy. + # Whether the record is re-ranked. attr_accessor :promoted_by_re_ranking # Attribute mapping from ruby-style variable name to JSON key. @@ -177,6 +178,118 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] filters Value to be assigned + def filters=(filters) + if filters.nil? + raise ArgumentError, 'filters cannot be nil' + end + + if filters < 0 + raise ArgumentError, 'invalid value for "filters", must be greater than or equal to 0.' + end + + @filters = filters + end + + # Custom attribute writer method with validation + # @param [Object] first_matched_word Value to be assigned + def first_matched_word=(first_matched_word) + if first_matched_word.nil? + raise ArgumentError, 'first_matched_word cannot be nil' + end + + if first_matched_word < 0 + raise ArgumentError, 'invalid value for "first_matched_word", must be greater than or equal to 0.' + end + + @first_matched_word = first_matched_word + end + + # Custom attribute writer method with validation + # @param [Object] geo_distance Value to be assigned + def geo_distance=(geo_distance) + if geo_distance.nil? + raise ArgumentError, 'geo_distance cannot be nil' + end + + if geo_distance < 0 + raise ArgumentError, 'invalid value for "geo_distance", must be greater than or equal to 0.' + end + + @geo_distance = geo_distance + end + + # Custom attribute writer method with validation + # @param [Object] geo_precision Value to be assigned + def geo_precision=(geo_precision) + if geo_precision.nil? + raise ArgumentError, 'geo_precision cannot be nil' + end + + if geo_precision < 1 + raise ArgumentError, 'invalid value for "geo_precision", must be greater than or equal to 1.' + end + + @geo_precision = geo_precision + end + + # Custom attribute writer method with validation + # @param [Object] nb_exact_words Value to be assigned + def nb_exact_words=(nb_exact_words) + if nb_exact_words.nil? + raise ArgumentError, 'nb_exact_words cannot be nil' + end + + if nb_exact_words < 0 + raise ArgumentError, 'invalid value for "nb_exact_words", must be greater than or equal to 0.' + end + + @nb_exact_words = nb_exact_words + end + + # Custom attribute writer method with validation + # @param [Object] nb_typos Value to be assigned + def nb_typos=(nb_typos) + if nb_typos.nil? + raise ArgumentError, 'nb_typos cannot be nil' + end + + if nb_typos < 0 + raise ArgumentError, 'invalid value for "nb_typos", must be greater than or equal to 0.' + end + + @nb_typos = nb_typos + end + + # Custom attribute writer method with validation + # @param [Object] proximity_distance Value to be assigned + def proximity_distance=(proximity_distance) + if proximity_distance.nil? + raise ArgumentError, 'proximity_distance cannot be nil' + end + + if proximity_distance < 0 + raise ArgumentError, 'invalid value for "proximity_distance", must be greater than or equal to 0.' + end + + @proximity_distance = proximity_distance + end + + # Custom attribute writer method with validation + # @param [Object] words Value to be assigned + def words=(words) + if words.nil? + raise ArgumentError, 'words cannot be nil' + end + + if words < 1 + raise ArgumentError, 'invalid value for "words", must be greater than or equal to 1.' + end + + @words = words + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/re_ranking_apply_filter.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/re_ranking_apply_filter.rb index 8980fae0a9..cfc848aca2 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/re_ranking_apply_filter.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/re_ranking_apply_filter.rb @@ -5,7 +5,7 @@ module Algolia module Search - # When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. + # Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters. module ReRankingApplyFilter class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/remove_stop_words.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/remove_stop_words.rb index 58abb29c8c..e6cc6b905f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/remove_stop_words.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/remove_stop_words.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search. + # Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index. module RemoveStopWords class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/rendering_content.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/rendering_content.rb index b36c3c1a56..b202a347b9 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/rendering_content.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/rendering_content.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + # Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code. class RenderingContent attr_accessor :facet_ordering diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/rule.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/rule.rb index 5200241c4a..cbf79fe82c 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/rule.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/rule.rb @@ -7,21 +7,21 @@ module Algolia module Search # Rule object. class Rule - # Unique identifier for a rule object. + # Unique identifier of a rule object. attr_accessor :object_id - # [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule. + # Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). attr_accessor :conditions attr_accessor :consequence - # Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + # Description of the rule's purpose to help you distinguish between different rules. attr_accessor :description - # Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + # Whether the rule is active. attr_accessor :enabled - # If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must not be empty. + # Time periods when the rule is active. attr_accessor :validity # Attribute mapping from ruby-style variable name to JSON key. @@ -106,6 +106,24 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] conditions Value to be assigned + def conditions=(conditions) + if conditions.nil? + raise ArgumentError, 'conditions cannot be nil' + end + + if conditions.length > 25 + raise ArgumentError, 'invalid value for "conditions", number of items must be less than or equal to 25.' + end + + if conditions.length < 0 + raise ArgumentError, 'invalid value for "conditions", number of items must be greater than or equal to 0.' + end + + @conditions = conditions + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_object_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_object_response.rb index e3edbcb69e..673f4cb960 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_object_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_object_response.rb @@ -6,13 +6,13 @@ module Algolia module Search class SaveObjectResponse - # Date of creation (ISO-8601 format). + # Timestamp when the record was added, in ISO 8601 format. attr_accessor :created_at - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_synonym_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_synonym_response.rb index 3da5b1f133..d431346051 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_synonym_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/save_synonym_response.rb @@ -6,7 +6,7 @@ module Algolia module Search class SaveSynonymResponse - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id # Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_params.rb index bc371a1269..8b3bc95c20 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_params.rb @@ -5,18 +5,18 @@ module Algolia module Search - # `searchDictionaryEntries` parameters. + # Search parameter. class SearchDictionaryEntriesParams - # Text to search for in an index. + # Search query. attr_accessor :query - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # Number of hits per page. attr_accessor :hits_per_page - # [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + # ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). attr_accessor :language # Attribute mapping from ruby-style variable name to JSON key. @@ -85,6 +85,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_response.rb new file mode 100644 index 0000000000..37796b1304 --- /dev/null +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_dictionary_entries_response.rb @@ -0,0 +1,251 @@ +# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +require 'date' +require 'time' + +module Algolia + module Search + class SearchDictionaryEntriesResponse + # Dictionary entries matching the search criteria. + attr_accessor :hits + + # Requested page of the API response. + attr_accessor :page + + # Number of results (hits). + attr_accessor :nb_hits + + # Number of pages of results. + attr_accessor :nb_pages + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :hits => :hits, + :page => :page, + :nb_hits => :nbHits, + :nb_pages => :nbPages + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.types_mapping + { + :hits => :'Array', + :page => :Integer, + :nb_hits => :Integer, + :nb_pages => :Integer + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + unless attributes.is_a?(Hash) + raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::SearchDictionaryEntriesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) do |(k, v), h| + unless self.class.attribute_map.key?(k.to_sym) + raise ArgumentError, + "`#{k}` is not a valid attribute in `Algolia::SearchDictionaryEntriesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + + h[k.to_sym] = v + end + + if attributes.key?(:hits) + if (value = attributes[:hits]).is_a?(Array) + self.hits = value + end + else + self.hits = nil + end + + if attributes.key?(:page) + self.page = attributes[:page] + else + self.page = nil + end + + if attributes.key?(:nb_hits) + self.nb_hits = attributes[:nb_hits] + else + self.nb_hits = nil + end + + if attributes.key?(:nb_pages) + self.nb_pages = attributes[:nb_pages] + else + self.nb_pages = nil + end + end + + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + + self.class == other.class && + hits == other.hits && + page == other.page && + nb_hits == other.nb_hits && + nb_pages == other.nb_pages + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [hits, page, nb_hits, nb_pages].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + types_mapping.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Algolia::Search.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + def to_json(*_args) + to_hash.to_json + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end + end +end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_request.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_request.rb index 760bf64120..72f750120b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_request.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_request.rb @@ -12,7 +12,7 @@ class SearchForFacetValuesRequest # Text to search inside the facet's values. attr_accessor :facet_query - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_response.rb index 3f776599c4..80f0ab9fd1 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facet_values_response.rb @@ -6,6 +6,7 @@ module Algolia module Search class SearchForFacetValuesResponse + # Matching facet values. attr_accessor :facet_hits # See the `facetsCount` field of the `exhaustive` object in the response. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets.rb index aef291af99..03a5f57e8e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets.rb @@ -9,13 +9,13 @@ class SearchForFacets # Search parameters as a URL-encoded query string. attr_accessor :params - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -26,149 +26,143 @@ class SearchForFacets attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -179,49 +173,49 @@ class SearchForFacets attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -229,7 +223,7 @@ class SearchForFacets # Facet name. attr_accessor :facet - # Algolia index name. + # Index name. attr_accessor :index_name # Text to search inside the facet's values. @@ -289,14 +283,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -383,14 +375,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -594,12 +584,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -626,12 +610,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -855,6 +833,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -887,6 +879,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -937,6 +947,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -970,14 +994,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -1038,7 +1060,7 @@ def eql?(other) # @return [Integer] Hash code def hash [params, query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, facet, index_name, facet_query, type].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, facet, index_name, facet_query, type].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets_options.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets_options.rb index 69951c313e..7689ef3b27 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets_options.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets_options.rb @@ -9,13 +9,13 @@ class SearchForFacetsOptions # Facet name. attr_accessor :facet - # Algolia index name. + # Index name. attr_accessor :index_name # Text to search inside the facet's values. attr_accessor :facet_query - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits attr_accessor :type diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits.rb index b997d78ced..99ffdc2206 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits.rb @@ -9,13 +9,13 @@ class SearchForHits # Search parameters as a URL-encoded query string. attr_accessor :params - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -26,149 +26,143 @@ class SearchForHits attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -179,54 +173,54 @@ class SearchForHits attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter - # Algolia index name. + # Index name. attr_accessor :index_name attr_accessor :type @@ -283,14 +277,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -375,14 +367,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -584,12 +574,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -616,12 +600,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -833,6 +811,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -865,6 +857,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -915,6 +925,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -948,14 +972,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -1014,7 +1036,7 @@ def eql?(other) # @return [Integer] Hash code def hash [params, query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, index_name, type].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter, index_name, type].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits_options.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits_options.rb index 3809562e52..717d96a73a 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits_options.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits_options.rb @@ -6,7 +6,7 @@ module Algolia module Search class SearchForHitsOptions - # Algolia index name. + # Index name. attr_accessor :index_name attr_accessor :type diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_hits.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_hits.rb index 4f58aa8515..de83d8c68f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_hits.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_hits.rb @@ -6,9 +6,10 @@ module Algolia module Search class SearchHits + # Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. attr_accessor :hits - # Text to search for in an index. + # Search query. attr_accessor :query # URL-encoded string of all search parameters. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_object.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_object.rb index 2a790225bd..897ff80a9a 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_object.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_object.rb @@ -6,13 +6,13 @@ module Algolia module Search class SearchParamsObject - # Text to search for in an index. + # Search query. attr_accessor :query - # Overrides the query parameter and performs a more generic search. + # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results. attr_accessor :similar_query - # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters. + # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). attr_accessor :filters attr_accessor :facet_filters @@ -23,149 +23,143 @@ class SearchParamsObject attr_accessor :tag_filters - # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed. + # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). attr_accessor :sum_or_filters_scores - # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + # Restricts a search to a subset of your searchable attributes. attr_accessor :restrict_searchable_attributes - # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values. + # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). attr_accessor :facets - # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control. + # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`. attr_accessor :faceting_after_distinct - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page - # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Position of the first hit to retrieve. attr_accessor :offset - # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + # Number of hits to retrieve (used in combination with `offset`). attr_accessor :length - # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area. + # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`. attr_accessor :around_lat_lng - # Search for entries around a location. The location is automatically computed from the requester's IP address. + # Whether to obtain the coordinates from the request's IP address. attr_accessor :around_lat_lng_via_ip attr_accessor :around_radius attr_accessor :around_precision - # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box - # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates). + # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored, if you also specify `insideBoundingBox`. attr_accessor :inside_polygon - # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries. + # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`. attr_accessor :natural_languages - # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries. + # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules. attr_accessor :rule_contexts - # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). attr_accessor :personalization_impact - # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search. + # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). attr_accessor :user_token - # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + # Whether the search response should include detailed ranking information. attr_accessor :get_ranking_info - # Enriches the API's response with information about how the query was processed. - attr_accessor :explain - - # Whether to take into account an index's synonyms for a particular search. + # Whether to take into account an index's synonyms for this search. attr_accessor :synonyms - # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/). attr_accessor :click_analytics - # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + # Whether this search will be included in Analytics. attr_accessor :analytics # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). attr_accessor :analytics_tags - # Whether to include or exclude a query from the processing-time percentile computation. + # Whether to include this search when calculating processing-time percentiles. attr_accessor :percentile_computation - # Incidates whether this search will be considered in A/B testing. + # Whether to enable A/B testing for this search. attr_accessor :enable_ab_test - # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - attr_accessor :attributes_for_faceting - - # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve - # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. attr_accessor :custom_ranking - # Relevancy threshold below which less relevant results aren't included in the results. + # Relevancy threshold below which less relevant results aren't included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results. attr_accessor :relevancy_strictness - # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). + # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). attr_accessor :attributes_to_highlight - # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`. + # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted. attr_accessor :attributes_to_snippet - # HTML string to insert before the highlighted parts in all highlight and snippet results. + # HTML tag to insert before the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_pre_tag - # HTML string to insert after the highlighted parts in all highlight and snippet results. + # HTML tag to insert after the highlighted parts in all highlighted results and snippets. attr_accessor :highlight_post_tag # String used as an ellipsis indicator when a snippet is truncated. attr_accessor :snippet_ellipsis_text - # Restrict highlighting and snippeting to items that matched the query. + # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted. attr_accessor :restrict_highlight_and_snippet_arrays # Number of hits per page. attr_accessor :hits_per_page - # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor1_typo - # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). attr_accessor :min_word_sizefor2_typos attr_accessor :typo_tolerance - # Whether to allow typos on numbers (\"numeric tokens\") in the query string. + # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers. attr_accessor :allow_typos_on_numeric_tokens - # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos. attr_accessor :disable_typo_tolerance_on_attributes attr_accessor :ignore_plurals attr_accessor :remove_stop_words - # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics. attr_accessor :keep_diacritics_on_characters - # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection. + # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). attr_accessor :query_languages - # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query. + # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. attr_accessor :decompound_query - # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + # Whether to enable rules. attr_accessor :enable_rules - # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled. + # Whether to enable Personalization. attr_accessor :enable_personalization attr_accessor :query_type @@ -176,49 +170,49 @@ class SearchParamsObject attr_accessor :semantic_search - # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query. + # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words - # Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes attr_accessor :exact_on_single_word_query - # Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
singleWordSynonym
Single-word synonyms, such as \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
. attr_accessor :alternatives_as_exact - # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + # Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This setting only has an effect if `advancedSyntax` is true. attr_accessor :advanced_syntax_features attr_accessor :distinct - # Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. attr_accessor :replace_synonyms_in_highlight - # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score. attr_accessor :min_proximity - # Attributes to include in the API response for search and browse queries. + # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). + # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). attr_accessor :max_facet_hits # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet - # Controls how facet values are fetched. + # Order in which to retrieve facet values.
count
Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value.
alpha
Retrieve facet values alphabetically.
This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by - # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. + # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. attr_accessor :attribute_criteria_computed_by_min_proximity attr_accessor :rendering_content - # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. attr_accessor :enable_re_ranking attr_accessor :re_ranking_apply_filter @@ -274,14 +268,12 @@ def self.attribute_map :personalization_impact => :personalizationImpact, :user_token => :userToken, :get_ranking_info => :getRankingInfo, - :explain => :explain, :synonyms => :synonyms, :click_analytics => :clickAnalytics, :analytics => :analytics, :analytics_tags => :analyticsTags, :percentile_computation => :percentileComputation, :enable_ab_test => :enableABTest, - :attributes_for_faceting => :attributesForFaceting, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :custom_ranking => :customRanking, @@ -363,14 +355,12 @@ def self.types_mapping :personalization_impact => :Integer, :user_token => :String, :get_ranking_info => :Boolean, - :explain => :'Array', :synonyms => :Boolean, :click_analytics => :Boolean, :analytics => :Boolean, :analytics_tags => :'Array', :percentile_computation => :Boolean, :enable_ab_test => :Boolean, - :attributes_for_faceting => :'Array', :attributes_to_retrieve => :'Array', :ranking => :'Array', :custom_ranking => :'Array', @@ -566,12 +556,6 @@ def initialize(attributes = {}) self.get_ranking_info = attributes[:get_ranking_info] end - if attributes.key?(:explain) - if (value = attributes[:explain]).is_a?(Array) - self.explain = value - end - end - if attributes.key?(:synonyms) self.synonyms = attributes[:synonyms] end @@ -598,12 +582,6 @@ def initialize(attributes = {}) self.enable_ab_test = attributes[:enable_ab_test] end - if attributes.key?(:attributes_for_faceting) - if (value = attributes[:attributes_for_faceting]).is_a?(Array) - self.attributes_for_faceting = value - end - end - if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -805,6 +783,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] length Value to be assigned def length=(length) @@ -837,6 +829,24 @@ def minimum_around_radius=(minimum_around_radius) @minimum_around_radius = minimum_around_radius end + # Custom attribute writer method with validation + # @param [Object] personalization_impact Value to be assigned + def personalization_impact=(personalization_impact) + if personalization_impact.nil? + raise ArgumentError, 'personalization_impact cannot be nil' + end + + if personalization_impact > 100 + raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.' + end + + if personalization_impact < 0 + raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.' + end + + @personalization_impact = personalization_impact + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) @@ -887,6 +897,20 @@ def max_facet_hits=(max_facet_hits) @max_facet_hits = max_facet_hits end + # Custom attribute writer method with validation + # @param [Object] max_values_per_facet Value to be assigned + def max_values_per_facet=(max_values_per_facet) + if max_values_per_facet.nil? + raise ArgumentError, 'max_values_per_facet cannot be nil' + end + + if max_values_per_facet > 1000 + raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.' + end + + @max_values_per_facet = max_values_per_facet + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -919,14 +943,12 @@ def ==(other) personalization_impact == other.personalization_impact && user_token == other.user_token && get_ranking_info == other.get_ranking_info && - explain == other.explain && synonyms == other.synonyms && click_analytics == other.click_analytics && analytics == other.analytics && analytics_tags == other.analytics_tags && percentile_computation == other.percentile_computation && enable_ab_test == other.enable_ab_test && - attributes_for_faceting == other.attributes_for_faceting && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && custom_ranking == other.custom_ranking && @@ -983,7 +1005,7 @@ def eql?(other) # @return [Integer] Hash code def hash [query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets, - faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash + faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_query.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_query.rb index 231f41217c..c07a249825 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_query.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_query.rb @@ -6,7 +6,7 @@ module Algolia module Search class SearchParamsQuery - # Text to search for in an index. + # Search query. attr_accessor :query # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_response.rb index 38bf063dcb..5d306e2315 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_response.rb @@ -15,7 +15,7 @@ class SearchResponse # Computed geographical location. attr_accessor :around_lat_lng - # Automatically-computed radius. + # Distance from a central coordinate provided by `aroundLatLng`. attr_accessor :automatic_radius attr_accessor :exhaustive @@ -29,7 +29,7 @@ class SearchResponse # See the `typo` field of the `exhaustive` object in the response. attr_accessor :exhaustive_typo - # Mapping of each facet name to the corresponding facet counts. + # Facet counts. attr_accessor :facets # Statistics for numerical facets. @@ -47,16 +47,16 @@ class SearchResponse # Warnings about the query. attr_accessor :message - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits - # Number of pages of results for the current query. + # Number of pages of results. attr_accessor :nb_pages # Number of hits selected and sorted by the relevant sort algorithm. attr_accessor :nb_sorted_hits - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # 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. @@ -81,15 +81,16 @@ class SearchResponse # Host name of the server that processed the request. attr_accessor :server_used - # Lets you store custom data in your indices. + # An object with custom data. You can store up to 32 kB as custom data. attr_accessor :user_data # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). attr_accessor :query_id + # Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. attr_accessor :hits - # Text to search for in an index. + # Search query. attr_accessor :query # URL-encoded string of all search parameters. @@ -394,6 +395,20 @@ def hits_per_page=(hits_per_page) @hits_per_page = hits_per_page end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_params.rb index 6c1cccbea3..f77b564f4b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_params.rb @@ -7,26 +7,23 @@ module Algolia module Search # Rules search parameters. class SearchRulesParams - # Rule object query. + # Search query for rules. attr_accessor :query attr_accessor :anchoring - # Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + # Only return rules that match the context (exact match). attr_accessor :context - # Requested page (the first page is page 0). + # Requested page of the API response. attr_accessor :page # Maximum number of hits per page. attr_accessor :hits_per_page - # Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + # If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned. attr_accessor :enabled - # Request options to send with the API call. - attr_accessor :request_options - class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -57,8 +54,7 @@ def self.attribute_map :context => :context, :page => :page, :hits_per_page => :hitsPerPage, - :enabled => :enabled, - :request_options => :requestOptions + :enabled => :enabled } end @@ -75,8 +71,7 @@ def self.types_mapping :context => :String, :page => :Integer, :hits_per_page => :Integer, - :enabled => :Boolean, - :request_options => :'Array' + :enabled => :Boolean } end @@ -127,12 +122,6 @@ def initialize(attributes = {}) if attributes.key?(:enabled) self.enabled = attributes[:enabled] end - - if attributes.key?(:request_options) - if (value = attributes[:request_options]).is_a?(Array) - self.request_options = value - end - end end # Custom attribute writer method with validation @@ -178,8 +167,7 @@ def ==(other) context == other.context && page == other.page && hits_per_page == other.hits_per_page && - enabled == other.enabled && - request_options == other.request_options + enabled == other.enabled end # @see the `==` method @@ -191,7 +179,7 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [query, anchoring, context, page, hits_per_page, enabled, request_options].hash + [query, anchoring, context, page, hits_per_page, enabled].hash end # Builds the object from hash diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_response.rb index 3aacec8743..e938610aaf 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_rules_response.rb @@ -6,10 +6,10 @@ module Algolia module Search class SearchRulesResponse - # Fetched rules. + # Rules that matched the search criteria. attr_accessor :hits - # Number of fetched rules. + # Number of rules that matched the search criteria. attr_accessor :nb_hits # Current page. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_params.rb index d1c1477d23..f22f868e2f 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_params.rb @@ -6,12 +6,12 @@ module Algolia module Search class SearchSynonymsParams - # Text to search for in an index. + # Search query. attr_accessor :query attr_accessor :type - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # Number of hits per page. @@ -103,6 +103,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_response.rb index 34c803723f..ad7de403d1 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_synonyms_response.rb @@ -6,10 +6,10 @@ module Algolia module Search class SearchSynonymsResponse - # Synonym objects. + # Matching synonyms. attr_accessor :hits - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits attr_accessor :additional_properties diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_params.rb index 4d1a4f24a2..211bfb95cf 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_params.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_params.rb @@ -13,7 +13,7 @@ class SearchUserIdsParams # Cluster name. attr_accessor :cluster_name - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # Number of hits per page. @@ -85,6 +85,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_response.rb index 064ddb3916..fe3d448782 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_user_ids_response.rb @@ -10,10 +10,10 @@ class SearchUserIdsResponse # User objects that match the query. attr_accessor :hits - # Number of hits the search query matched. + # Number of results (hits). attr_accessor :nb_hits - # Page to retrieve (the first page is `0`, not `1`). + # Page of search results to retrieve. attr_accessor :page # Maximum number of hits per page. @@ -104,6 +104,20 @@ def initialize(attributes = {}) end end + # Custom attribute writer method with validation + # @param [Object] page Value to be assigned + def page=(page) + if page.nil? + raise ArgumentError, 'page cannot be nil' + end + + if page < 0 + raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.' + end + + @page = page + end + # Custom attribute writer method with validation # @param [Object] hits_per_page Value to be assigned def hits_per_page=(hits_per_page) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/secured_api_key_restrictions.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/secured_api_key_restrictions.rb index 95de431a07..de55f553a0 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/secured_api_key_restrictions.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/secured_api_key_restrictions.rb @@ -8,19 +8,19 @@ module Search class SecuredAPIKeyRestrictions attr_accessor :search_params - # Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). + # Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. attr_accessor :filters - # Unix timestamp used to set the expiration date of the API key. + # Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. attr_accessor :valid_until - # Index names that can be queried. + # Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". attr_accessor :restrict_indices - # IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + # IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. attr_accessor :restrict_sources - # Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. + # Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. attr_accessor :user_token # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/semantic_search.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/semantic_search.rb index 66eab42d44..996363cd5a 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/semantic_search.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/semantic_search.rb @@ -5,9 +5,9 @@ module Algolia module Search - # Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. + # Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. class SemanticSearch - # Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source. + # Indices from which to collect click and conversion events. If null, the current index and all its replicas are used. attr_accessor :event_sources # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/snippet_result_option.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/snippet_result_option.rb index c5bbf3bdec..f531ee4ce6 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/snippet_result_option.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/snippet_result_option.rb @@ -5,9 +5,9 @@ module Algolia module Search - # Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + # Snippets that show the context around a matching search query. class SnippetResultOption - # Markup text with `facetQuery` matches highlighted. + # Highlighted attribute value, including HTML tags. attr_accessor :value attr_accessor :match_level diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/tag_filters.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/tag_filters.rb index ac91ed21f8..bed3665fa9 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/tag_filters.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/tag_filters.rb @@ -5,7 +5,7 @@ module Algolia module Search - # [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + # Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for `facetFilters`. module TagFilters class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/time_range.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/time_range.rb index 7ad44af65b..7c06bc9ee4 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/time_range.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/time_range.rb @@ -6,10 +6,10 @@ module Algolia module Search class TimeRange - # Lower bound of the time range (Unix timestamp). + # When the rule should start to be active, in Unix epoch time. attr_accessor :from - # Upper bound of the time range (Unix timestamp). + # When the rule should stop to be active, in Unix epoch time. attr_accessor :_until # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/typo_tolerance.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/typo_tolerance.rb index 2b876be2e4..ae59d3d60e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/typo_tolerance.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/typo_tolerance.rb @@ -5,7 +5,7 @@ module Algolia module Search - # Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + # Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active. module TypoTolerance class << self # List of class defined in oneOf (OpenAPI v3) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_response.rb index 59bd985529..d228e5507e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_response.rb @@ -7,7 +7,7 @@ module Algolia module Search # Response, taskID, and update timestamp. class UpdatedAtResponse - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id # Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_with_object_id_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_with_object_id_response.rb index d9cde50c62..bffc430973 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_with_object_id_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_at_with_object_id_response.rb @@ -7,13 +7,13 @@ module Algolia module Search # Response, taskID, unique object identifier, and an update timestamp. class UpdatedAtWithObjectIdResponse - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id # Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. attr_accessor :updated_at - # Unique object identifier. + # Unique record identifier. attr_accessor :object_id # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_rule_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_rule_response.rb index 145eb4fc96..2034fdc8eb 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_rule_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/updated_rule_response.rb @@ -6,13 +6,13 @@ module Algolia module Search class UpdatedRuleResponse - # Unique object identifier. + # Unique identifier of a rule object. attr_accessor :object_id # Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. attr_accessor :updated_at - # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the `task` operation and this `taskID`. + # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. attr_accessor :task_id # Attribute mapping from ruby-style variable name to JSON key. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_hit.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_hit.rb index fddc488627..2127a2a6a1 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_hit.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_hit.rb @@ -6,7 +6,7 @@ module Algolia module Search class UserHit - # userID of the user. + # User ID. attr_accessor :user_id # Cluster name. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_id.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_id.rb index 4757847de5..08b82ed1a0 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_id.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/user_id.rb @@ -7,7 +7,7 @@ module Algolia module Search # Unique user ID. class UserId - # userID of the user. + # User ID. attr_accessor :user_id # Cluster to which the user is assigned. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/value.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/value.rb index 6a6a34b175..a07b666f73 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/value.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/value.rb @@ -6,7 +6,7 @@ module Algolia module Search class Value - # Pinned order of facet lists. + # Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list. attr_accessor :order attr_accessor :sort_remaining_by diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/ABTestResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/ABTestResponse.scala index 27259348a4..562ca52fe9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/ABTestResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/ABTestResponse.scala @@ -15,7 +15,8 @@ package algoliasearch.abtesting * Unique A/B test ID. * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. */ case class ABTestResponse( index: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/SearchNoResultEvent.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/SearchNoResultEvent.scala index 52743fffde..fa8675f066 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/SearchNoResultEvent.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/SearchNoResultEvent.scala @@ -16,7 +16,7 @@ package algoliasearch.analytics * @param count * Number of occurrences. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). */ case class SearchNoResultEvent( search: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearch.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearch.scala index 2cc63c407e..d5e072ead2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearch.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearch.scala @@ -16,7 +16,7 @@ package algoliasearch.analytics * @param count * Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). */ case class TopSearch( search: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala index beb4cc32c6..d8fd1b75eb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala @@ -30,7 +30,7 @@ package algoliasearch.analytics * @param conversionCount * Number of converted clicks. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). */ case class TopSearchWithAnalytics( search: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AbtestingClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AbtestingClient.scala index 3ed827ebe9..47f0e3a94a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AbtestingClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AbtestingClient.scala @@ -235,9 +235,9 @@ class AbtestingClient( * - analytics * * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param indexPrefix * Only return A/B tests for indices starting with this prefix. * @param indexSuffix diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AnalyticsClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AnalyticsClient.scala index 5d35f7075c..32f260ba9b 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AnalyticsClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/AnalyticsClient.scala @@ -190,11 +190,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -230,11 +230,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -269,11 +269,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -307,11 +307,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -346,11 +346,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -384,11 +384,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -422,11 +422,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -460,15 +460,15 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -506,15 +506,15 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -554,7 +554,7 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. */ def getStatus(index: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -576,15 +576,15 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -624,17 +624,17 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param search * User query. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -676,17 +676,17 @@ class AnalyticsClient( * @param attribute * Attribute name. * @param index - * Index name to target. + * Index name. * @param search * User query. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -729,17 +729,17 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param search * User query. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -779,20 +779,20 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param search * User query. * @param clickAnalytics * Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) * rates for a search. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -834,22 +834,22 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param clickAnalytics * Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) * rates for a search. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param orderBy * Reorder the results. * @param direction * Sorting direction of the results: ascending or descending. * @param limit - * Number of records to return (page size). + * Number of items to return. * @param offset - * Position of the starting record. Used for paging. 0 is the first record. + * Position of the first item to return. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. @@ -893,11 +893,11 @@ class AnalyticsClient( * - analytics * * @param index - * Index name to target. + * Index name. * @param startDate - * Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * Start date (`YYYY-MM-DD`) of the period to analyze. * @param endDate - * End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + * End date (`YYYY-MM-DD`) of the period to analyze. * @param tags * Filter analytics on the * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/RecommendClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/RecommendClient.scala index b31207b026..858c3a4049 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/RecommendClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/RecommendClient.scala @@ -177,11 +177,11 @@ class RecommendClient( * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param model * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * @param objectID - * Unique record (object) identifier. + * Unique record identifier. */ def deleteRecommendRule( indexName: String, @@ -207,11 +207,11 @@ class RecommendClient( * - settings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param model * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * @param objectID - * Unique record (object) identifier. + * Unique record identifier. */ def getRecommendRule( indexName: String, @@ -238,7 +238,7 @@ class RecommendClient( * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param model * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). * @param taskID @@ -297,7 +297,7 @@ class RecommendClient( * - settings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param model * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala index 82c30eae47..690eb44c04 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala @@ -46,6 +46,7 @@ import algoliasearch.search.Rule import algoliasearch.search.SaveObjectResponse import algoliasearch.search.SaveSynonymResponse import algoliasearch.search.SearchDictionaryEntriesParams +import algoliasearch.search.SearchDictionaryEntriesResponse import algoliasearch.search.SearchForFacetValuesRequest import algoliasearch.search.SearchForFacetValuesResponse import algoliasearch.search.SearchMethodParams @@ -125,8 +126,7 @@ class SearchClient( options = clientOptions ) { - /** Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API - * key. The response returns an API key string. + /** Creates a new API key with specific permissions and restrictions. * * Required API Key ACLs: * - admin @@ -145,20 +145,20 @@ class SearchClient( execute[AddApiKeyResponse](request, requestOptions) } - /** If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some - * attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) - * instead. To add multiple records to your index in a single API request, use the [`batch` - * operation](#tag/Records/operation/batch). + /** If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added + * to the index. To update _some_ attributes of an existing record, use the [`partial` + * operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use + * the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID - * Unique record (object) identifier. + * Unique record identifier. * @param body - * Algolia record. + * The record, a schemaless object with attributes that are useful in the context of search and discovery. */ def addOrUpdateObject(indexName: String, objectID: String, body: Any, requestOptions: Option[RequestOptions] = None)( implicit ec: ExecutionContext @@ -176,7 +176,7 @@ class SearchClient( execute[UpdatedAtWithObjectIdResponse](request, requestOptions) } - /** Add a source to the list of allowed sources. + /** Adds a source to the list of allowed sources. * * Required API Key ACLs: * - admin @@ -198,14 +198,14 @@ class SearchClient( execute[CreatedAtResponse](request, requestOptions) } - /** Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data + /** Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data * linked to the user ID. * * Required API Key ACLs: * - admin * * @param xAlgoliaUserID - * userID to assign. + * User ID to assign. */ def assignUserId( xAlgoliaUserID: String, @@ -225,12 +225,12 @@ class SearchClient( execute[CreatedAtResponse](request, requestOptions) } - /** To reduce the time spent on network round trips, you can perform several write actions in a single API call. - * Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual - * operations of the same name. + /** Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency + * and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to + * the individual API requests of the same name. * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def batch(indexName: String, batchWriteParams: BatchWriteParams, requestOptions: Option[RequestOptions] = None)( implicit ec: ExecutionContext @@ -247,13 +247,13 @@ class SearchClient( execute[BatchResponse](request, requestOptions) } - /** Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + /** Assigns multiple user IDs to a cluster. **You can't move users with this operation**. * * Required API Key ACLs: * - admin * * @param xAlgoliaUserID - * userID to assign. + * User ID to assign. */ def batchAssignUserIds( xAlgoliaUserID: String, @@ -276,13 +276,13 @@ class SearchClient( execute[CreatedAtResponse](request, requestOptions) } - /** Add or remove a batch of dictionary entries. + /** Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. * * Required API Key ACLs: * - editSettings * * @param dictionaryName - * Dictionary to search in. + * Dictionary type in which to search. */ def batchDictionaryEntries( dictionaryName: DictionaryType, @@ -304,14 +304,17 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't - * support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + /** Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with + * attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if + * you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are + * ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: + * typo-tolerance, number of matched words, proximity, geo distance. * * Required API Key ACLs: * - browse * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def browse( indexName: String, @@ -329,13 +332,13 @@ class SearchClient( execute[BrowseResponse](request, requestOptions) } - /** Delete the records but leave settings and index-specific API keys untouched. + /** Deletes only the records from an index while keeping settings, synonyms, and rules. * * Required API Key ACLs: * - deleteIndex * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def clearObjects(indexName: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -350,15 +353,15 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Delete all rules in the index. + /** Deletes all rules from the index. * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ def clearRules( indexName: String, @@ -376,15 +379,15 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Delete all synonyms in the index. + /** Deletes all synonyms from the index. * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ def clearSynonyms( indexName: String, @@ -502,7 +505,7 @@ class SearchClient( execute[T](request, requestOptions) } - /** Delete an existing API key. The request must be authenticated with the admin API key. + /** Deletes the API key. * * Required API Key ACLs: * - admin @@ -523,14 +526,15 @@ class SearchClient( execute[DeleteApiKeyResponse](request, requestOptions) } - /** This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. - * It doesn't accept empty filters or queries. + /** This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the + * [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` + * operation](tag/Records/operation/batch). * * Required API Key ACLs: * - deleteIndex * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def deleteBy(indexName: String, deleteByParams: DeleteByParams, requestOptions: Option[RequestOptions] = None)( implicit ec: ExecutionContext @@ -547,13 +551,18 @@ class SearchClient( execute[DeletedAtResponse](request, requestOptions) } - /** Delete an existing index. + /** Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to + * delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has + * replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, + * you must first unlink it from its primary index before you can delete it. For more information, see [Delete + * replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). * * Required API Key ACLs: * - deleteIndex * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def deleteIndex(indexName: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -568,16 +577,17 @@ class SearchClient( execute[DeletedAtResponse](request, requestOptions) } - /** To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) - * instead. + /** Deletes a record by its object ID. To delete more than one record, use the [`batch` + * operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` + * operation](#tag/Records/operation/deleteBy). * * Required API Key ACLs: * - deleteObject * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID - * Unique record (object) identifier. + * Unique record identifier. */ def deleteObject(indexName: String, objectID: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -593,18 +603,18 @@ class SearchClient( execute[DeletedAtResponse](request, requestOptions) } - /** Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + /** Deletes a rule by its ID. To find the object ID for rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID * Unique identifier of a rule object. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ def deleteRule( indexName: String, @@ -624,7 +634,7 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Remove a source from the list of allowed sources. + /** Deletes a source from the list of allowed sources. * * Required API Key ACLs: * - admin @@ -645,18 +655,18 @@ class SearchClient( execute[DeleteSourceResponse](request, requestOptions) } - /** Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` + /** Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID * Unique identifier of a synonym object. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ def deleteSynonym( indexName: String, @@ -676,9 +686,9 @@ class SearchClient( execute[DeletedAtResponse](request, requestOptions) } - /** Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can - * request information for any of your application's keys. When authenticating with other API keys, you can only - * retrieve information for that key. + /** Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request + * information for any of your application's keys. When authenticating with other API keys, you can only retrieve + * information for that key. * * @param key * API key. @@ -696,14 +706,7 @@ class SearchClient( execute[GetApiKeyResponse](request, requestOptions) } - /** Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. + /** Lists supported languages with their supported dictionary types and number of custom entries. * * Required API Key ACLs: * - settings @@ -720,7 +723,7 @@ class SearchClient( execute[Map[String, Languages]](request, requestOptions) } - /** Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + /** Retrieves the languages for which standard dictionary entries are turned off. * * Required API Key ACLs: * - settings @@ -738,25 +741,22 @@ class SearchClient( } /** The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last - * seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your - * [operations + * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last + * seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) - * cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + * but doesn't appear in the logs itself. * * Required API Key ACLs: * - logs * * @param offset - * First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. + * First log entry to retrieve. The most recent entries are listed first. * @param length * Maximum number of entries to retrieve. * @param indexName - * Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. + * Index for which to retrieve log entries. By default, log entries are retrieved for all indices. * @param `type` - * Type of log entries to retrieve. When omitted, all log entries are retrieved. + * Type of log entries to retrieve. By default, all log entries are retrieved. */ def getLogs( offset: Option[Int] = None, @@ -778,20 +778,20 @@ class SearchClient( execute[GetLogsResponse](request, requestOptions) } - /** To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + /** Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` + * operation](#tag/Records/operation/getObjects). * * Required API Key ACLs: * - search * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID - * Unique record (object) identifier. + * Unique record identifier. * @param attributesToRetrieve * Attributes to include with the records in the response. This is useful to reduce the size of the API response. - * By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - * won't be retrieved unless the request is authenticated with the admin API key. + * By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in + * `unretrievableAttributes` won't be retrieved unless the request is authenticated with the admin API key. */ def getObject( indexName: String, @@ -811,8 +811,8 @@ class SearchClient( execute[Map[String, String]](request, requestOptions) } - /** Retrieve one or more records, potentially from different indices, in a single API operation. Results will be - * received in the same order as the requests. + /** Retrieves one or more records, potentially from different indices. Records are returned in the same order as the + * requests. * * Required API Key ACLs: * - search @@ -835,14 +835,14 @@ class SearchClient( execute[GetObjectsResponse](request, requestOptions) } - /** Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + /** Retrieves a rule by its ID. To find the object ID of rules, use the [`search` * operation](#tag/Rules/operation/searchRules). * * Required API Key ACLs: * - settings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID * Unique identifier of a rule object. */ @@ -860,14 +860,13 @@ class SearchClient( execute[Rule](request, requestOptions) } - /** Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + /** Retrieves an object with non-null index settings. * * Required API Key ACLs: * - search * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def getSettings(indexName: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -882,7 +881,7 @@ class SearchClient( execute[IndexSettings](request, requestOptions) } - /** Get all allowed sources (IP addresses). + /** Retrieves all allowed IP addresses with access to your application. * * Required API Key ACLs: * - admin @@ -898,14 +897,14 @@ class SearchClient( execute[Seq[Source]](request, requestOptions) } - /** Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` + /** Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` * operation](#tag/Synonyms/operation/searchSynonyms). * * Required API Key ACLs: * - settings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID * Unique identifier of a synonym object. */ @@ -923,14 +922,15 @@ class SearchClient( execute[SynonymHit](request, requestOptions) } - /** Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the - * status of that task. + /** Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or + * indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' + * responses include a task ID that you can use to check the status. * * Required API Key ACLs: * - addObject * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param taskID * Unique task identifier. */ @@ -948,8 +948,8 @@ class SearchClient( execute[GetTaskResponse](request, requestOptions) } - /** Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. + /** Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get + * the data from the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin @@ -966,14 +966,14 @@ class SearchClient( execute[GetTopUserIdsResponse](request, requestOptions) } - /** Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the - * different clusters, the response isn't real-time. + /** Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different + * clusters, the response isn't real-time. * * Required API Key ACLs: * - admin * * @param userID - * userID to assign. + * User ID to assign. */ def getUserId(userID: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -995,7 +995,7 @@ class SearchClient( * - admin * * @param getClusters - * Indicates whether to include the cluster's pending mapping state in the response. + * Whether to include the cluster's pending mapping state in the response. */ def hasPendingMappings(getClusters: Option[Boolean] = None, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -1010,7 +1010,7 @@ class SearchClient( execute[HasPendingMappingsResponse](request, requestOptions) } - /** List all API keys associated with your Algolia application, including their permissions and restrictions. + /** Lists all API keys associated with your Algolia application, including their permissions and restrictions. * * Required API Key ACLs: * - admin @@ -1027,7 +1027,7 @@ class SearchClient( execute[ListApiKeysResponse](request, requestOptions) } - /** List the available clusters in a multi-cluster setup. + /** Lists the available clusters in a multi-cluster setup. * * Required API Key ACLs: * - admin @@ -1044,17 +1044,16 @@ class SearchClient( execute[ListClustersResponse](request, requestOptions) } - /** List indices in an Algolia application. + /** Lists all indices in the current Algolia application. The request follows any index restrictions of the API key + * you use to make the request. * * Required API Key ACLs: * - listIndexes * * @param page - * Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the - * number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not - * paginated. + * Requested page of the API response. If `null`, the API response is not paginated. * @param hitsPerPage - * Maximum number of hits per page. + * Number of hits per page. */ def listIndices( page: Option[Int] = None, @@ -1072,18 +1071,16 @@ class SearchClient( execute[ListIndicesResponse](request, requestOptions) } - /** List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data - * from the different clusters, the response isn't real-time. + /** Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from + * the different clusters, the response isn't real-time. * * Required API Key ACLs: * - admin * * @param page - * Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the - * number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not - * paginated. + * Requested page of the API response. If `null`, the API response is not paginated. * @param hitsPerPage - * Maximum number of hits per page. + * Number of hits per page. */ def listUserIds( page: Option[Int] = None, @@ -1101,9 +1098,8 @@ class SearchClient( execute[ListUserIdsResponse](request, requestOptions) } - /** To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a - * multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order - * they are specified. The supported actions are equivalent to the individual operations of the same name. + /** Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the + * order they are specified. - Actions are equivalent to the individual API requests of the same name. */ def multipleBatch(batchParams: BatchParams, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -1119,21 +1115,27 @@ class SearchClient( execute[MultipleBatchResponse](request, requestOptions) } - /** This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, - * and rules to a `destination` index. If the destination index exists, it will be replaced, except for - * index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice - * between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to - * create a new index with the same records and configuration as an existing one. > **Note**: When considering - * copying or moving, be aware of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + /** Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are + * overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, + * it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and + * default settings. - The API keys of the source index are merged with the existing keys in the destination index. - + * You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index + * that already has replicas. - Be aware of the [size + * limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - + * Related guide: [Copy + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) + * **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, + * the analytics data keep their original name and a new set of analytics data is started for the new name. To access + * the original analytics in the dashboard, create an index with the original name. - If the destination index has + * replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: + * [Move + * indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). * * Required API Key ACLs: * - addObject * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def operationIndex( indexName: String, @@ -1152,22 +1154,22 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Add new attributes or update current ones in an existing record. You can use any first-level attribute but not - * nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. + /** Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't + * exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, + * this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify + * a nested attribute, the engine treats it as a replacement for its first-level ancestor. * * Required API Key ACLs: * - addObject * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID - * Unique record (object) identifier. + * Unique record identifier. * @param attributesToUpdate - * Object with attributes to update. + * Attributes with their values. * @param createIfNotExists - * Indicates whether to create a new record if it doesn't exist yet. + * Whether to create a new record if it doesn't exist. */ def partialUpdateObject( indexName: String, @@ -1190,13 +1192,13 @@ class SearchClient( execute[UpdatedAtWithObjectIdResponse](request, requestOptions) } - /** Remove a userID and its associated data from the multi-clusters. + /** Deletes a user ID and its associated data from the clusters. * * Required API Key ACLs: * - admin * * @param userID - * userID to assign. + * User ID to assign. */ def removeUserId(userID: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -1211,7 +1213,7 @@ class SearchClient( execute[RemoveUserIdResponse](request, requestOptions) } - /** Replace all allowed sources. + /** Replaces the list of allowed sources. * * Required API Key ACLs: * - admin @@ -1233,8 +1235,8 @@ class SearchClient( execute[ReplaceSourceResponse](request, requestOptions) } - /** Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin - * API key. + /** Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys + * per application. If you create more, the oldest API keys are deleted and can't be restored. * * Required API Key ACLs: * - admin @@ -1255,17 +1257,20 @@ class SearchClient( execute[AddApiKeyResponse](request, requestOptions) } - /** Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia - * automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add - * multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). + /** Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an + * auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing + * record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your index. + * \- If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of + * a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple + * records, use the [`batch` operation](#tag/Records/operation/batch). * * Required API Key ACLs: * - addObject * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param body - * The Algolia record. + * The record, a schemaless object with attributes that are useful in the context of search and discovery. */ def saveObject(indexName: String, body: Any, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -1282,17 +1287,18 @@ class SearchClient( execute[SaveObjectResponse](request, requestOptions) } - /** To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + /** If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To + * create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID * Unique identifier of a rule object. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ def saveRule( indexName: String, @@ -1315,17 +1321,18 @@ class SearchClient( execute[UpdatedRuleResponse](request, requestOptions) } - /** Create or update multiple rules. + /** Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. + * Otherwise, existing rules are replaced. * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. * @param clearExistingRules - * Indicates whether existing rules should be deleted before adding this batch. + * Whether existing rules should be deleted before adding this batch. */ def saveRules( indexName: String, @@ -1348,21 +1355,19 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing - * synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API - * request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + /** If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym + * is replaced. To add multiple synonyms in a single API request, use the [`batch` + * operation](#tag/Synonyms/operation/saveSynonyms). * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param objectID * Unique identifier of a synonym object. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ def saveSynonym( indexName: String, @@ -1385,17 +1390,17 @@ class SearchClient( execute[SaveSynonymResponse](request, requestOptions) } - /** Create or update multiple synonyms. + /** If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. * @param replaceExistingSynonyms - * Indicates whether to replace all synonyms in the index with the ones sent with this request. + * Whether to replace all synonyms in the index with the ones sent with this request. */ def saveSynonyms( indexName: String, @@ -1418,13 +1423,15 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Send multiple search queries to one or more indices. + /** Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for + * different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the + * same index—for example, with different filters. * * Required API Key ACLs: * - search * * @param searchMethodParams - * Query requests and strategies. Results will be received in the same order as the queries. + * Muli-search request body. Results are returned in the same order as the requests. */ def search(searchMethodParams: SearchMethodParams, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext @@ -1441,26 +1448,19 @@ class SearchClient( execute[SearchResponses](request, requestOptions) } - /** Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. + /** Searches for standard and custom dictionary entries. * * Required API Key ACLs: * - settings * * @param dictionaryName - * Dictionary to search in. + * Dictionary type in which to search. */ def searchDictionaryEntries( dictionaryName: DictionaryType, searchDictionaryEntriesParams: SearchDictionaryEntriesParams, requestOptions: Option[RequestOptions] = None - )(implicit ec: ExecutionContext): Future[UpdatedAtResponse] = Future { + )(implicit ec: ExecutionContext): Future[SearchDictionaryEntriesResponse] = Future { requireNotNull(dictionaryName, "Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.") requireNotNull( searchDictionaryEntriesParams, @@ -1474,22 +1474,21 @@ class SearchClient( .withBody(searchDictionaryEntriesParams) .withRead(true) .build() - execute[UpdatedAtResponse](request, requestOptions) + execute[SearchDictionaryEntriesResponse](request, requestOptions) } - /** [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search criteria. > - * **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a - * maximum of 10 values but you can adjust this with `maxFacetHits`. + /** Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You + * can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have + * **more than 65 searchable facets and searchable attributes combined**. * * Required API Key ACLs: * - search * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param facetName - * Facet name. + * Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` + * index setting with the `searchable()` modifier. */ def searchForFacetValues( indexName: String, @@ -1510,14 +1509,13 @@ class SearchClient( execute[SearchForFacetValuesResponse](request, requestOptions) } - /** Search for rules in your index. You can control the search with parameters. To list all rules, send an empty - * request body. + /** Searches for rules in your index. * * Required API Key ACLs: * - settings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def searchRules( indexName: String, @@ -1536,13 +1534,15 @@ class SearchClient( execute[SearchRulesResponse](request, requestOptions) } - /** Return records that match the query. + /** Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 + * hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the + * `paginatedLimitedTo` index setting. * * Required API Key ACLs: * - search * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. */ def searchSingleIndex( indexName: String, @@ -1561,14 +1561,13 @@ class SearchClient( execute[SearchResponse](request, requestOptions) } - /** Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, - * send an empty request body. + /** Searches for synonyms in your index. * * Required API Key ACLs: * - settings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param searchSynonymsParams * Body of the `searchSynonyms` operation. */ @@ -1589,10 +1588,10 @@ class SearchClient( execute[SearchSynonymsResponse](request, requestOptions) } - /** Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. - * To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every - * 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search - * will show an old value until the next time the mapping is rebuilt (every 12 hours). + /** Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To + * ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 + * hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will + * show an old value until the next time the mapping is rebuilt (every 12 hours). * * Required API Key ACLs: * - admin @@ -1612,7 +1611,7 @@ class SearchClient( execute[SearchUserIdsResponse](request, requestOptions) } - /** Set stop word settings for a specific language. + /** Turns standard stop word dictionary entries on or off for a given language. * * Required API Key ACLs: * - editSettings @@ -1635,16 +1634,17 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - * Specifying null for a setting resets it to its default value. + /** Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to + * reset a setting to its default value. For best performance, update the index settings before you add new records + * to your index. * * Required API Key ACLs: * - editSettings * * @param indexName - * Index on which to perform the request. + * Name of the index on which to perform the operation. * @param forwardToReplicas - * Indicates whether changed index settings are forwarded to the replica indices. + * Whether changes are applied to replica indices. */ def setSettings( indexName: String, @@ -1665,8 +1665,8 @@ class SearchClient( execute[UpdatedAtResponse](request, requestOptions) } - /** Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default - * value. The request must be authenticated with the admin API key. + /** Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default + * value. * * Required API Key ACLs: * - admin diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Anchoring.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Anchoring.scala index f18b4e1689..1ad115627f 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Anchoring.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Anchoring.scala @@ -15,8 +15,10 @@ import org.json4s._ sealed trait Anchoring -/** Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an - * exact match (`is`), or a partial match (`contains`). +/** Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of + * the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query + * exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with + * `anchoring: is`. */ object Anchoring { case object Is extends Anchoring { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala index 3486976570..3e2b8efd5a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala @@ -13,9 +13,8 @@ package algoliasearch.recommend import org.json4s._ -/** Precision of a geographical search (in meters), to [group results that are more or less the same distance from a - * central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +/** Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion + * considers all matches within the same range of distances to be equal. */ sealed trait AroundPrecision diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecisionFromValueInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecisionFromValueInner.scala index 23a38bf38a..56dcd29aeb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecisionFromValueInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecisionFromValueInner.scala @@ -11,7 +11,12 @@ */ package algoliasearch.recommend -/** AroundPrecisionFromValueInner +/** Range object with lower and upper values in meters to define custom ranges. + * + * @param from + * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + * @param value + * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ case class AroundPrecisionFromValueInner( from: Option[Int] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadius.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadius.scala index a902fd972e..6efff561e1 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadius.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadius.scala @@ -15,9 +15,10 @@ import algoliasearch.recommend.AroundRadiusAll._ import org.json4s._ -/** [Maximum - * radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - * for a geographical search (in meters). +/** Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` + * and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of + * hits around the central location. The search radius is small if there are many hits close to the central + * coordinates. */ sealed trait AroundRadius diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadiusAll.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadiusAll.scala index 7fa0c06e91..ffb973f410 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadiusAll.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundRadiusAll.scala @@ -15,7 +15,7 @@ import org.json4s._ sealed trait AroundRadiusAll extends AroundRadiusTrait -/** AroundRadiusAll enumeration +/** Return all records with a valid `_geoloc` attribute. Don't filter by distance. */ object AroundRadiusAll { case object All extends AroundRadiusAll { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilter.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilter.scala index e2675ed0a4..0a0ff1553e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilter.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilter.scala @@ -11,14 +11,17 @@ */ package algoliasearch.recommend -/** Automatic facet Filter. +/** Filter or optional filter to be applied to the search. * * @param facet - * Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + * Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with + * `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. * @param score - * Score for the filter. Typically used for optional or disjunctive filters. + * Filter scores to give different weights to individual filters. * @param disjunctive - * Whether the filter is disjunctive (true) or conjunctive (false). + * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are + * combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` + * operation. */ case class AutomaticFacetFilter( facet: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilters.scala index c80a012b7c..811e130fc9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AutomaticFacetFilters.scala @@ -13,8 +13,9 @@ package algoliasearch.recommend import org.json4s._ -/** Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value - * placeholder in the query pattern. +/** Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For + * example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the + * results to show the top-ranked comedy movies. */ sealed trait AutomaticFacetFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendRequest.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendRequest.scala index 9d11698574..e7705b16a2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendRequest.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendRequest.scala @@ -14,7 +14,7 @@ package algoliasearch.recommend /** BaseRecommendRequest * * @param indexName - * Algolia index name. + * Index name. * @param threshold * Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each * recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendationsQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendationsQuery.scala index 44b5ed59e6..25490c920e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendationsQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendationsQuery.scala @@ -16,7 +16,7 @@ import algoliasearch.recommend.RecommendationModels._ /** BaseRecommendationsQuery * * @param objectID - * Unique object identifier. + * Unique record identifier. */ case class BaseRecommendationsQuery( model: RecommendationModels, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendedForYouQueryParameters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendedForYouQueryParameters.scala index 5de6680a6e..fa0ef1f346 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendedForYouQueryParameters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseRecommendedForYouQueryParameters.scala @@ -14,8 +14,8 @@ package algoliasearch.recommend /** BaseRecommendedForYouQueryParameters * * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). */ case class BaseRecommendedForYouQueryParameters( userToken: String diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParams.scala index e83645bb7d..e233882fb7 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParams.scala @@ -14,95 +14,101 @@ package algoliasearch.recommend /** BaseSearchParams * * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. + * Whether to enable A/B testing for this search. */ case class BaseSearchParams( query: Option[String] = scala.None, @@ -131,7 +137,6 @@ case class BaseSearchParams( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParamsWithoutQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParamsWithoutQuery.scala index 48e402eda4..375ebcb6aa 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParamsWithoutQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchParamsWithoutQuery.scala @@ -14,93 +14,99 @@ package algoliasearch.recommend /** BaseSearchParamsWithoutQuery * * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. + * Whether to enable A/B testing for this search. */ case class BaseSearchParamsWithoutQuery( similarQuery: Option[String] = scala.None, @@ -128,7 +134,6 @@ case class BaseSearchParamsWithoutQuery( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchResponse.scala index 5f06fbee8d..44bdddab57 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseSearchResponse.scala @@ -23,7 +23,7 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param aroundLatLng * Computed geographical location. * @param automaticRadius - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustiveFacetsCount * See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits @@ -31,7 +31,7 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param exhaustiveTypo * See the `typo` field of the `exhaustive` object in the response. * @param facets - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. * @param facetsStats * Statistics for numerical facets. * @param hitsPerPage @@ -43,13 +43,13 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param message * Warnings about the query. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). * @param nbPages - * Number of pages of results for the current query. + * Number of pages of results. * @param nbSortedHits * Number of hits selected and sorted by the relevant sort algorithm. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param parsedQuery * 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. @@ -65,7 +65,7 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param serverUsed * Host name of the server that processed the request. * @param userData - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. * @param queryID * Unique identifier for the query. This is used for [click * analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Condition.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Condition.scala index a23362cfcc..70efeee595 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Condition.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Condition.scala @@ -16,15 +16,25 @@ import algoliasearch.recommend.Anchoring._ /** Condition * * @param pattern - * Query pattern syntax. + * Query pattern that triggers the rule. You can use either a literal string, or a special pattern + * `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal + * string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when + * users search for a genre, such as \"comedy\". * @param alternatives - * Whether the pattern matches on plurals, synonyms, and typos. + * Whether the pattern should match plurals, synonyms, and typos. * @param context - * Rule context format: [A-Za-z0-9_-]+). + * An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` + * parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching + * `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. + * @param filters + * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is + * triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` + * parameter. */ case class Condition( pattern: Option[String] = scala.None, anchoring: Option[Anchoring] = scala.None, alternatives: Option[Boolean] = scala.None, - context: Option[String] = scala.None + context: Option[String] = scala.None, + filters: Option[String] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Consequence.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Consequence.scala index 1b8373b056..c00ab88a7e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Consequence.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Consequence.scala @@ -11,18 +11,21 @@ */ package algoliasearch.recommend -/** [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +/** Effect of the rule. For more information, see + * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). * * @param promote - * Records to promote. + * Records you want to pin to a specific position in the search results. You can promote up to 300 records, either + * individually, or as groups of up to 100 records each. * @param filterPromotes - * Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match - * the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + * Whether promoted records must match an active filter for the consequence to be applied. This ensures that user + * actions (filtering the search) are given a higher precendence. For example, if you promote a record with the + * `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. * @param hide - * Records to hide. By default, you can hide up to 50 records per rule. + * Records you want to hide from the search results. * @param userData - * Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by - * the API. It's limited to 1kB of minified JSON. + * A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't + * interpreted by the API and is limited to 1 kB of minified JSON. */ case class Consequence( params: Option[ConsequenceParams] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceHide.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceHide.scala index 3a0afd11e3..e379e0521d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceHide.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceHide.scala @@ -11,10 +11,10 @@ */ package algoliasearch.recommend -/** Unique identifier of the record to hide. +/** Object ID of the record to hide. * * @param objectID - * Unique object identifier. + * Unique record identifier. */ case class ConsequenceHide( objectID: String diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceParams.scala index aa37f7cf6c..085da22a11 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceParams.scala @@ -21,191 +21,264 @@ import algoliasearch.recommend.RemoveWordsIfNoResults._ /** ConsequenceParams * * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class ConsequenceParams( similarQuery: Option[String] = scala.None, @@ -233,14 +306,12 @@ case class ConsequenceParams( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQuery.scala index 41abb37a69..55ee883b14 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQuery.scala @@ -13,8 +13,8 @@ package algoliasearch.recommend import org.json4s._ -/** When providing a string, it replaces the entire query string. When providing an object, it describes incremental - * edits to be made to the query string (but you can't do both). +/** Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that + * string. If `consequenceQuery` is an object, it describes incremental edits made to the query. */ sealed trait ConsequenceQuery diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQueryObject.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQueryObject.scala index d3d278f46c..40aea18bcc 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQueryObject.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ConsequenceQueryObject.scala @@ -14,9 +14,9 @@ package algoliasearch.recommend /** ConsequenceQueryObject * * @param remove - * Words to remove. + * Words to remove from the search query. * @param edits - * Edits to apply. + * Changes to make to the search query. */ case class ConsequenceQueryObject( remove: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/DeletedAtResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/DeletedAtResponse.scala index ae0c54c4c3..1a600437db 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/DeletedAtResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/DeletedAtResponse.scala @@ -15,7 +15,8 @@ package algoliasearch.recommend * * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. * @param deletedAt * Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Distinct.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Distinct.scala index c820f9436a..0462d4254d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Distinct.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Distinct.scala @@ -13,8 +13,11 @@ package algoliasearch.recommend import org.json4s._ -/** Enables [deduplication or grouping of results (Algolia's _distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +/** Determines how many records of a group are included in the search results. Records with the same value for the + * `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the + * group are returned. This is useful for [deduplication and + * grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * The `distinct` setting is ignored if `attributeForDistinct` is not set. */ sealed trait Distinct diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Edit.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Edit.scala index addf6804ff..e74cef8437 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Edit.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Edit.scala @@ -18,7 +18,7 @@ import algoliasearch.recommend.EditType._ * @param delete * Text or patterns to remove from the query string. * @param insert - * Text that should be inserted in place of the removed text inside the query string. + * Text to be added in place of the deleted text inside the query string. */ case class Edit( `type`: Option[EditType] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ExactOnSingleWordQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ExactOnSingleWordQuery.scala index bbbebe7ffe..011533e76b 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ExactOnSingleWordQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ExactOnSingleWordQuery.scala @@ -17,7 +17,13 @@ sealed trait ExactOnSingleWordQuery /** Determines how the [Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - * is computed when the query contains only one word. + * is computed when the search query has only one word.
attribute
The Exact ranking + * criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the + * value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored + * on single-word searches.
word
The Exact ranking criterion is 1 if the query word is + * found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
+ *
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches + * won't. */ object ExactOnSingleWordQuery { case object Attribute extends ExactOnSingleWordQuery { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetFilters.scala index bd7bb4bdb6..a50709bfc0 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetFilters.scala @@ -13,7 +13,11 @@ package algoliasearch.recommend import org.json4s._ -/** [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +/** Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the + * `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, + * filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR + * filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that + * start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ sealed trait FacetFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetOrdering.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetOrdering.scala index f73539b441..0633917a06 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetOrdering.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FacetOrdering.scala @@ -11,10 +11,10 @@ */ package algoliasearch.recommend -/** Defines the ordering of facets (widgets). +/** Order of facet names and facet values in your UI. * * @param values - * Ordering of facet values within an individual facet. + * Order of facet values. One object for each facet. */ case class FacetOrdering( facets: Option[Facets] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Facets.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Facets.scala index 9eb44a68d7..3c34b24bcb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Facets.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Facets.scala @@ -11,10 +11,11 @@ */ package algoliasearch.recommend -/** Ordering of facets (widgets). +/** Order of facet names. * * @param order - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the + * top of the list. */ case class Facets( order: Option[Seq[String]] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/HighlightResultOption.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/HighlightResultOption.scala index 8d259f3213..b968f4a7d6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/HighlightResultOption.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/HighlightResultOption.scala @@ -13,12 +13,12 @@ package algoliasearch.recommend import algoliasearch.recommend.MatchLevel._ -/** Show highlighted section and words matched on a query. +/** Surround words that match the query with HTML tags for highlighting. * * @param value - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. * @param matchedWords - * List of words from the query that matched the object. + * List of matched words from the search query. * @param fullyHighlighted * Whether the entire attribute value is highlighted. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IgnorePlurals.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IgnorePlurals.scala index acad8d63b3..09572fc5a8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IgnorePlurals.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IgnorePlurals.scala @@ -13,14 +13,8 @@ package algoliasearch.recommend import org.json4s._ -/** Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction - * with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This - * list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, - * where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either - * [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that - * singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). +/** Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the + * languages used in your index. */ sealed trait IgnorePlurals diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IndexSettingsAsSearchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IndexSettingsAsSearchParams.scala index d97c353952..698d5e6051 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IndexSettingsAsSearchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/IndexSettingsAsSearchParams.scala @@ -20,107 +20,173 @@ import algoliasearch.recommend.RemoveWordsIfNoResults._ /** IndexSettingsAsSearchParams * - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class IndexSettingsAsSearchParams( - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/MatchLevel.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/MatchLevel.scala index 1f83ff21a4..edee21c032 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/MatchLevel.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/MatchLevel.scala @@ -15,7 +15,7 @@ import org.json4s._ sealed trait MatchLevel -/** Indicates how well the attribute matched the search query. +/** Whether the whole query string matches or only a part. */ object MatchLevel { case object None extends MatchLevel { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Mode.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Mode.scala index f27b6ab393..b13f5dc074 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Mode.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Mode.scala @@ -15,7 +15,8 @@ import org.json4s._ sealed trait Mode -/** Search mode the index will use to query for results. +/** Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled + * NeuralSearch for you. */ object Mode { case object NeuralSearch extends Mode { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/NumericFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/NumericFilters.scala index d74083d879..5e8152b143 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/NumericFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/NumericFilters.scala @@ -13,7 +13,10 @@ package algoliasearch.recommend import org.json4s._ -/** [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +/** Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations + * with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are + * precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and + * upper boundaries. The same combination rules apply as for `facetFilters`. */ sealed trait NumericFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/OptionalFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/OptionalFilters.scala index d00dc5037f..7f51732ec3 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/OptionalFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/OptionalFilters.scala @@ -13,9 +13,11 @@ package algoliasearch.recommend import org.json4s._ -/** Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower - * for negative optional filters. In contrast to regular filters, records that don't match the optional filter are - * still included in the results, only their ranking is affected. +/** Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't + * exclude records from the search results. Records that match the optional filter rank before records that don't + * match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - + * Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - + * Optional filters don't work with numeric attributes. */ sealed trait OptionalFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Params.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Params.scala index ca04419724..12375b95c9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Params.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Params.scala @@ -11,7 +11,8 @@ */ package algoliasearch.recommend -/** Additional search parameters. +/** Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, + * `automaticOptionalFacetFilters`, and `query`. */ case class Params( query: Option[ConsequenceQuery] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectID.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectID.scala index 1304576267..efd749b059 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectID.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectID.scala @@ -14,10 +14,9 @@ package algoliasearch.recommend /** Record to promote. * * @param objectID - * Unique identifier of the record to promote. + * Unique record identifier. * @param position - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. - * For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ case class PromoteObjectID( objectID: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectIDs.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectIDs.scala index ebe415bf58..2dc9cf5886 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectIDs.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/PromoteObjectIDs.scala @@ -14,10 +14,10 @@ package algoliasearch.recommend /** Records to promote. * * @param objectIDs - * Unique identifiers of the records to promote. + * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, + * if you want to promote four records to position `0`, they will be the first four search results. * @param position - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. - * For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ case class PromoteObjectIDs( objectIDs: Seq[String], diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/QueryType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/QueryType.scala index 92a253ec45..10fe312544 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/QueryType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/QueryType.scala @@ -15,8 +15,11 @@ import org.json4s._ sealed trait QueryType -/** Determines how query words are [interpreted as - * prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/** Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as + * prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words + * as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see + * [Prefix + * searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ object QueryType { case object PrefixLast extends QueryType { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RankingInfo.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RankingInfo.scala index 8c1203f68d..edd8bd70d5 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RankingInfo.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RankingInfo.scala @@ -11,12 +11,12 @@ */ package algoliasearch.recommend -/** RankingInfo +/** Object with detailed information about the record's ranking. * * @param filters - * This field is reserved for advanced usage. + * Whether a filter matched the query. * @param firstMatchedWord - * Position of the most important matched attribute in the attributes to index list. + * Position of the first matched word in the best matching attribute of the record. * @param geoDistance * Distance between the geo location in the search query and the best matching geo location in the record, divided by * the geo precision (in meters). @@ -27,15 +27,15 @@ package algoliasearch.recommend * @param nbTypos * Number of typos encountered when matching the record. * @param promoted - * Present and set to true if a Rule promoted the hit. + * Whether the record was promoted by a rule. * @param proximityDistance - * When the query contains more than one word, the sum of the distances between matched words (in meters). + * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. * @param userScore - * Custom ranking for the object, expressed as a single integer value. + * Overall ranking of the record, expressed as a single integer. This attribute is internal. * @param words - * Number of matched words, including prefixes and typos. + * Number of matched words. * @param promotedByReRanking - * Wether the record are promoted by the re-ranking strategy. + * Whether the record is re-ranked. */ case class RankingInfo( filters: Int, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ReRankingApplyFilter.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ReRankingApplyFilter.scala index b9a9346f1c..af847975ef 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ReRankingApplyFilter.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/ReRankingApplyFilter.scala @@ -13,8 +13,8 @@ package algoliasearch.recommend import org.json4s._ -/** When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that - * match these filters will be affected by Dynamic Re-Ranking. +/** Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these + * filters. */ sealed trait ReRankingApplyFilter diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendHit.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendHit.scala index ffa5dd6455..39c6d9cd84 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendHit.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendHit.scala @@ -17,11 +17,11 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ /** Recommend hit. * * @param objectID - * Unique object identifier. + * Unique record identifier. * @param highlightResult - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. * @param snippetResult - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. * @param score * Recommendation score. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsHits.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsHits.scala index 78944c1a09..6dd25f11d8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsHits.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsHits.scala @@ -14,7 +14,7 @@ package algoliasearch.recommend /** RecommendationsHits * * @param query - * Text to search for in an index. + * Search query. * @param params * URL-encoded string of all search parameters. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsQuery.scala index 780f66f3c5..3feb64cad3 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsQuery.scala @@ -16,7 +16,7 @@ import algoliasearch.recommend.RecommendationModels._ /** RecommendationsQuery * * @param indexName - * Algolia index name. + * Index name. * @param threshold * Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each * recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the @@ -24,7 +24,7 @@ import algoliasearch.recommend.RecommendationModels._ * @param maxRecommendations * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. * @param objectID - * Unique object identifier. + * Unique record identifier. */ case class RecommendationsQuery( indexName: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsResults.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsResults.scala index cf13fa06e8..289bb0df0a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsResults.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendationsResults.scala @@ -20,7 +20,7 @@ package algoliasearch.recommend * @param aroundLatLng * Computed geographical location. * @param automaticRadius - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustiveFacetsCount * See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits @@ -28,7 +28,7 @@ package algoliasearch.recommend * @param exhaustiveTypo * See the `typo` field of the `exhaustive` object in the response. * @param facets - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. * @param facetsStats * Statistics for numerical facets. * @param hitsPerPage @@ -40,13 +40,13 @@ package algoliasearch.recommend * @param message * Warnings about the query. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). * @param nbPages - * Number of pages of results for the current query. + * Number of pages of results. * @param nbSortedHits * Number of hits selected and sorted by the relevant sort algorithm. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param parsedQuery * 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. @@ -62,12 +62,12 @@ package algoliasearch.recommend * @param serverUsed * Host name of the server that processed the request. * @param userData - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. * @param queryID * Unique identifier for the query. This is used for [click * analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). * @param query - * Text to search for in an index. + * Search query. * @param params * URL-encoded string of all search parameters. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQuery.scala index 7d9f23e507..749a57167f 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQuery.scala @@ -16,7 +16,7 @@ import algoliasearch.recommend.RecommendedForYouModel._ /** RecommendedForYouQuery * * @param indexName - * Algolia index name. + * Index name. * @param threshold * Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each * recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQueryParameters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQueryParameters.scala index 1b471cf21a..cc0bc37daa 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQueryParameters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendedForYouQueryParameters.scala @@ -21,193 +21,266 @@ import algoliasearch.recommend.RemoveWordsIfNoResults._ /** RecommendedForYouQueryParameters * * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class RecommendedForYouQueryParameters( query: Option[String] = scala.None, @@ -236,14 +309,12 @@ case class RecommendedForYouQueryParameters( personalizationImpact: Option[Int] = scala.None, userToken: String, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveStopWords.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveStopWords.scala index e372076b9c..ff82ff7154 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveStopWords.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveStopWords.scala @@ -13,13 +13,9 @@ package algoliasearch.recommend import org.json4s._ -/** Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the - * `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override - * any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop - * words are removed from consideration in a search. The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop - * words to be taken into account in a search. +/** Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or + * pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You + * should only use this feature for the languages used in your index. */ sealed trait RemoveStopWords diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveWordsIfNoResults.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveWordsIfNoResults.scala index 92c3dd245e..5729bf0659 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveWordsIfNoResults.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RemoveWordsIfNoResults.scala @@ -15,9 +15,14 @@ import org.json4s._ sealed trait RemoveWordsIfNoResults -/** Strategy to [remove - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - * from the query when it doesn't match any hits. +/** Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty + * search results.
none
No words are removed when a query doesn't return results.
+ *
lastWords
Treat the last (then second to last, then third to last) word as optional, until + * there are results or at most 5 words have been removed.
firstWords
Treat the first + * (then second, then third) word as optional, until there are results or at most 5 words have been removed.
+ *
allOptional
Treat all words as optional.
For more information, see [Remove + * words to improve + * results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ object RemoveWordsIfNoResults { case object None extends RemoveWordsIfNoResults { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RenderingContent.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RenderingContent.scala index f2d76ce185..a27a6e513e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RenderingContent.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RenderingContent.scala @@ -11,10 +11,8 @@ */ package algoliasearch.recommend -/** Extra content for the search UI, for example, to control the [ordering and display of - * facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - * You can set a default value and dynamically override it with - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +/** Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the + * order of facet names and values without changing your frontend code. */ case class RenderingContent( facetOrdering: Option[FacetOrdering] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsObject.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsObject.scala index 92972fc9a3..e2e9ec16e2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsObject.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsObject.scala @@ -21,193 +21,266 @@ import algoliasearch.recommend.RemoveWordsIfNoResults._ /** SearchParamsObject * * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class SearchParamsObject( query: Option[String] = scala.None, @@ -236,14 +309,12 @@ case class SearchParamsObject( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsQuery.scala index 6580e54157..aa60b2613e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchParamsQuery.scala @@ -14,7 +14,7 @@ package algoliasearch.recommend /** SearchParamsQuery * * @param query - * Text to search for in an index. + * Search query. */ case class SearchParamsQuery( query: Option[String] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesParams.scala index 0c96c0c727..32a4fdb7cc 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesParams.scala @@ -14,12 +14,12 @@ package algoliasearch.recommend /** Recommend rules search parameters. * * @param query - * Full-text query. + * Search query. * @param context * Restricts responses to the specified [contextual * rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). * @param page - * Requested page (the first page is page 0). + * Requested page of the API response. * @param hitsPerPage * Maximum number of hits per page. * @param enabled diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesResponse.scala index d42b975b61..8b6034eda5 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SearchRecommendRulesResponse.scala @@ -16,11 +16,11 @@ package algoliasearch.recommend * @param hits * Fetched rules. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param nbPages - * Number of pages of results for the current query. + * Number of pages of results. */ case class SearchRecommendRulesResponse( hits: Seq[RuleResponse], diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SemanticSearch.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SemanticSearch.scala index a2a0ae5896..56731e720d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SemanticSearch.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SemanticSearch.scala @@ -11,11 +11,11 @@ */ package algoliasearch.recommend -/** Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +/** Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. * * @param eventSources - * Indices from which to collect click and conversion events. If null, the current index and replica group will be - * used as the event source. + * Indices from which to collect click and conversion events. If null, the current index and all its replicas are + * used. */ case class SemanticSearch( eventSources: Option[Seq[String]] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SnippetResultOption.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SnippetResultOption.scala index 78d6b7a3fe..9ef9179ddd 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SnippetResultOption.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SnippetResultOption.scala @@ -13,10 +13,10 @@ package algoliasearch.recommend import algoliasearch.recommend.MatchLevel._ -/** Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +/** Snippets that show the context around a matching search query. * * @param value - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ case class SnippetResultOption( value: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SortRemainingBy.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SortRemainingBy.scala index ae20504848..318b04aabe 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SortRemainingBy.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/SortRemainingBy.scala @@ -15,8 +15,10 @@ import org.json4s._ sealed trait SortRemainingBy -/** How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - - * `hidden`: show only pinned values. +/** Order of facet values that aren't explicitly positioned with the `order` setting.
count
+ *
Order remaining facet values by decreasing count. The count is the number of matching records containing this + * facet value.
alpha
Sort facet values alphabetically.
+ *
hidden
Don't show facet values that aren't explicitly positioned.
. */ object SortRemainingBy { case object Count extends SortRemainingBy { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TagFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TagFilters.scala index e275ec774b..23e75a86b5 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TagFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TagFilters.scala @@ -13,7 +13,10 @@ package algoliasearch.recommend import org.json4s._ -/** [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +/** Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports + * all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used + * for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules + * apply as for `facetFilters`. */ sealed trait TagFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TaskStatus.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TaskStatus.scala index 04dfc767cc..e441adcc3a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TaskStatus.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TaskStatus.scala @@ -15,7 +15,7 @@ import org.json4s._ sealed trait TaskStatus -/** _published_ if the task has been processed, _notPublished_ otherwise. +/** Task status, `published` if the task is completed, `notPublished` otherwise. */ object TaskStatus { case object Published extends TaskStatus { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingFacetsQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingFacetsQuery.scala index 310a2a338e..b797fccf2c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingFacetsQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingFacetsQuery.scala @@ -16,7 +16,7 @@ import algoliasearch.recommend.TrendingFacetsModel._ /** TrendingFacetsQuery * * @param indexName - * Algolia index name. + * Index name. * @param threshold * Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each * recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingItemsQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingItemsQuery.scala index 604031b39c..8289d63815 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingItemsQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TrendingItemsQuery.scala @@ -16,7 +16,7 @@ import algoliasearch.recommend.TrendingItemsModel._ /** TrendingItemsQuery * * @param indexName - * Algolia index name. + * Index name. * @param threshold * Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each * recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoTolerance.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoTolerance.scala index c6ce270d72..b6bfca942c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoTolerance.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoTolerance.scala @@ -15,9 +15,11 @@ import algoliasearch.recommend.TypoToleranceEnum._ import org.json4s._ -/** Controls whether [typo +/** Whether [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled - * and how it is applied. + * and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and + * concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * is also active. */ sealed trait TypoTolerance diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoToleranceEnum.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoToleranceEnum.scala index 96e46a622e..ca59d736a5 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoToleranceEnum.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/TypoToleranceEnum.scala @@ -15,7 +15,10 @@ import org.json4s._ sealed trait TypoToleranceEnum extends TypoToleranceTrait -/** TypoToleranceEnum enumeration +/** - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only + * include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - + * `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is + * applied first in the `ranking` setting. */ object TypoToleranceEnum { case object Min extends TypoToleranceEnum { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Value.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Value.scala index 56fae2ba2a..31d0eee486 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Value.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Value.scala @@ -16,7 +16,8 @@ import algoliasearch.recommend.SortRemainingBy._ /** Value * * @param order - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the + * top of the list. */ case class Value( order: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Acl.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Acl.scala index 09b170d1df..7abbf5f71c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Acl.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Acl.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,14 +38,7 @@ import org.json4s._ sealed trait Acl -/** API key permissions: `addObject`: required to add or update records, copy or move an index. `analytics`: required to - * access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. - * `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required - * to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and - * indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required - * to search records `seeUnretrievableAttributes`: required to retrieve - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for - * all operations that return records. `settings`: required to examine index settings. +/** Access control list permissions. */ object Acl { case object AddObject extends Acl { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Action.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Action.scala index dafdd5b3ad..f098ad2117 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Action.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Action.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,7 @@ import org.json4s._ sealed trait Action -/** Type of batch operation. +/** Type of indexing operation. */ object Action { case object AddObject extends Action { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AddApiKeyResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AddApiKeyResponse.scala index fd0c7b2176..37f0b14be1 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AddApiKeyResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AddApiKeyResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,7 +39,7 @@ package algoliasearch.search * @param key * API key. * @param createdAt - * Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ case class AddApiKeyResponse( key: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AdvancedSyntaxFeatures.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AdvancedSyntaxFeatures.scala index 3db47d05a8..5ea2ec7f7f 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AdvancedSyntaxFeatures.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AdvancedSyntaxFeatures.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AlternativesAsExact.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AlternativesAsExact.scala index f87ec05059..9f23368ccd 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AlternativesAsExact.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AlternativesAsExact.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Anchoring.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Anchoring.scala index f50a57cf10..3354df8d43 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Anchoring.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Anchoring.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,8 +38,10 @@ import org.json4s._ sealed trait Anchoring -/** Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an - * exact match (`is`), or a partial match (`contains`). +/** Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of + * the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query + * exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with + * `anchoring: is`. */ object Anchoring { case object Is extends Anchoring { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKey.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKey.scala index e60ad7ce15..1b1c07640b 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKey.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKey.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,41 +39,36 @@ import algoliasearch.search.Acl._ /** API key object. * * @param acl - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the - * key. + * Permissions that determine the type of API requests this key can make. The required ACL is listed in each + * endpoint's reference. For more information, see [access control + * list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). * @param description - * Description of an API key for you and your team members. + * Description of an API key to help you identify this API key. * @param indexes - * Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. - * Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For - * example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - - * `*_products_*` matches all indices containing \"_products_\". + * Index names or patterns that this API key can access. By default, an API key can access all indices in the same + * application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting + * with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing + * \"_products_\". * @param maxHitsPerQuery - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this - * parameter to protect you from third-party attempts to retrieve your entire content by massively querying the - * index. + * Maximum number of results this API key can retrieve in one query. By default, there's no limit. * @param maxQueriesPerIPPerHour - * Maximum number of API calls per hour allowed from a given IP address or [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed - * with this key, a check is performed. If there were more than the specified number of calls within the last hour, - * the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect - * you from third-party attempts to retrieve your entire content by massively querying the index. + * Maximum number of API requests allowed per IP address or [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, + * the API returns an error with status code `429`. By default, there's no limit. * @param queryParameters - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each - * query made with this API key. It's a URL-encoded query string. + * Query parameters to add when making API requests with this API key. To restrict this API key to specific IP + * addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of + * IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted + * range. * @param referers - * Restrict this API key to specific - * [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - * If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with - * \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` - * allows everything in the domain \"algolia.com\". + * Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing + * wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" + * \- `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the + * domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. + * For more information, see [HTTP referrer + * restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). * @param validity - * Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The - * default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For - * example, in mobile apps, you can't [control when users update your - * app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So - * instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your - * mobile app's backend. + * Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ case class ApiKey( acl: Seq[Acl], diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKeyOperation.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKeyOperation.scala index 85dfa7982d..c549809dfb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKeyOperation.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ApiKeyOperation.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala index 32660b8bb3..1c50fe7622 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,9 +36,8 @@ package algoliasearch.search import org.json4s._ -/** Precision of a geographical search (in meters), to [group results that are more or less the same distance from a - * central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +/** Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion + * considers all matches within the same range of distances to be equal. */ sealed trait AroundPrecision diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecisionFromValueInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecisionFromValueInner.scala index 360b17abc0..65b1ecb355 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecisionFromValueInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecisionFromValueInner.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,7 +34,12 @@ */ package algoliasearch.search -/** AroundPrecisionFromValueInner +/** Range object with lower and upper values in meters to define custom ranges. + * + * @param from + * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. + * @param value + * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ case class AroundPrecisionFromValueInner( from: Option[Int] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadius.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadius.scala index 7719649708..3219a8636c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadius.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadius.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,9 +38,10 @@ import algoliasearch.search.AroundRadiusAll._ import org.json4s._ -/** [Maximum - * radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - * for a geographical search (in meters). +/** Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` + * and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of + * hits around the central location. The search radius is small if there are many hits close to the central + * coordinates. */ sealed trait AroundRadius diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadiusAll.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadiusAll.scala index 35532de2fc..fda7455538 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadiusAll.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundRadiusAll.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,7 @@ import org.json4s._ sealed trait AroundRadiusAll extends AroundRadiusTrait -/** AroundRadiusAll enumeration +/** Return all records with a valid `_geoloc` attribute. Don't filter by distance. */ object AroundRadiusAll { case object All extends AroundRadiusAll { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AssignUserIdParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AssignUserIdParams.scala index abb808dbfd..3a2778aaa8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AssignUserIdParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AssignUserIdParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AttributeToUpdate.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AttributeToUpdate.scala index 99070cca36..0243ad6070 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AttributeToUpdate.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AttributeToUpdate.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilter.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilter.scala index 742722c2ee..45d7e80719 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilter.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilter.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,14 +34,17 @@ */ package algoliasearch.search -/** Automatic facet Filter. +/** Filter or optional filter to be applied to the search. * * @param facet - * Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + * Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with + * `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. * @param score - * Score for the filter. Typically used for optional or disjunctive filters. + * Filter scores to give different weights to individual filters. * @param disjunctive - * Whether the filter is disjunctive (true) or conjunctive (false). + * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are + * combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` + * operation. */ case class AutomaticFacetFilter( facet: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilters.scala index 4d6ea7efdb..7bf4d09aab 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AutomaticFacetFilters.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,8 +36,9 @@ package algoliasearch.search import org.json4s._ -/** Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value - * placeholder in the query pattern. +/** Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For + * example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the + * results to show the top-ranked comedy movies. */ sealed trait AutomaticFacetFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseGetApiKeyResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseGetApiKeyResponse.scala index 60a757b2c6..b2152486cd 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseGetApiKeyResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseGetApiKeyResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala index 8bfd56faae..d323f5e08c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,59 +36,109 @@ package algoliasearch.search /** BaseIndexSettings * + * @param attributesForFaceting + * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + * Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search + * results. By default, no attribute is used for faceting. **Modifiers**
+ *
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue + * the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
+ *
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with + * `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: + * `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. * @param replicas - * Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - * which are copies of a primary index with the same records but different settings. + * Creates [replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas + * are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to + * offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a + * primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete + * set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, + * standalone index that will no longer by synced with the primary index. **Modifier**
+ *
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the + * number of records and are optimized for [Relevant + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + *
Without modifier, a standard replica is created, which duplicates your record count and is used for + * strict, or [exhaustive + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). * @param paginationLimitedTo - * Maximum number of hits accessible through pagination. + * Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down + * your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. * @param unretrievableAttributes - * Attributes that can't be retrieved at query time. + * Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking + * or to [restrict + * access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't + * want to include it in the search results. * @param disableTypoToleranceOnWords * Words for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also + * turns off [word splitting and + * concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * for the specified words. * @param attributesToTransliterate - * Attributes in your index to which [Japanese - * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - * applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + * Attributes, for which you want to support [Japanese + * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + * Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must + * set the indexing language to Japanese. * @param camelCaseAttributes - * Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. * @param decompoundedAttributes - * Attributes in your index to which [word + * Searchable attributes to which Algolia should apply [word * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * (decompounding) applies. + * (decompounding). Compound words are formed by combining two or more individual words, and are particularly + * prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are + * indexed separately. You can specify different lists for different languages. Decompounding is supported for these + * languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). * @param indexLanguages - * Set the languages of your index, for language-specific processing steps such as - * [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - * and - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific + * processing steps, such as word detection and dictionary settings. **You should always specify an indexing + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param disablePrefixOnAttributes - * Attributes for which you want to turn off [prefix + * Searchable attributes for which you want to turn off [prefix * matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). * @param allowCompressionOfIntegerArray - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the + * Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the * compressed arrays may be reordered. * @param numericAttributesForFiltering * Numeric attributes that can be used as [numerical * filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of + * numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that + * doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
+ *
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and + * `!=`.
Without modifier, all numeric comparisons are supported. * @param separatorsToIndex - * Controls which separators are added to an Algolia index as part of - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - * Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * Controls which separators are indexed. Separators are all non-letter characters except spaces and currency + * characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia + * treats separator characters as separate words. For example, a search for `C#` would report two matches. * @param searchableAttributes - * [Attributes used for - * searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including - * determining [if matches at the beginning of a word are important (ordered) or not - * (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * Attributes used for searching. By default, all attributes are searchable and the + * [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + * ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected + * attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in + * the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a + * comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always + * unordered. For more information, see [Searchable + * attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + * **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the + * attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the + * end. * @param userData - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. * @param customNormalization - * A list of characters and their normalized replacements to override Algolia's default + * Characters and their normalized replacements. This overrides Algolia's default * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * @param attributeForDistinct - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * Attribute that should be used to establish groups of results. All records with the same value for this attribute + * are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how + * many items per group are included in the search results. If you want to use the same attribute also for faceting, + * use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ + * deduplication, which will result in accurate facet counts. */ case class BaseIndexSettings( + attributesForFaceting: Option[Seq[String]] = scala.None, replicas: Option[Seq[String]] = scala.None, paginationLimitedTo: Option[Int] = scala.None, unretrievableAttributes: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParams.scala index c99e0d798d..fa6733b399 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,95 +37,101 @@ package algoliasearch.search /** BaseSearchParams * * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. + * Whether to enable A/B testing for this search. */ case class BaseSearchParams( query: Option[String] = scala.None, @@ -131,7 +160,6 @@ case class BaseSearchParams( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParamsWithoutQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParamsWithoutQuery.scala index 4e35993081..efb460c64c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParamsWithoutQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchParamsWithoutQuery.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,93 +37,99 @@ package algoliasearch.search /** BaseSearchParamsWithoutQuery * * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. + * Whether to enable A/B testing for this search. */ case class BaseSearchParamsWithoutQuery( similarQuery: Option[String] = scala.None, @@ -128,7 +157,6 @@ case class BaseSearchParamsWithoutQuery( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchResponse.scala index 7509fa828f..83d96765ff 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseSearchResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -23,7 +46,7 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param aroundLatLng * Computed geographical location. * @param automaticRadius - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustiveFacetsCount * See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits @@ -31,7 +54,7 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param exhaustiveTypo * See the `typo` field of the `exhaustive` object in the response. * @param facets - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. * @param facetsStats * Statistics for numerical facets. * @param hitsPerPage @@ -43,13 +66,13 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param message * Warnings about the query. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). * @param nbPages - * Number of pages of results for the current query. + * Number of pages of results. * @param nbSortedHits * Number of hits selected and sorted by the relevant sort algorithm. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param parsedQuery * 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. @@ -65,7 +88,7 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ * @param serverUsed * Host name of the server that processed the request. * @param userData - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. * @param queryID * Unique identifier for the query. This is used for [click * analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchAssignUserIdsParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchAssignUserIdsParams.scala index 5693c1439d..1238dd1678 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchAssignUserIdsParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchAssignUserIdsParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesParams.scala index 5c2810dd96..bcdaf72bc2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,12 +34,12 @@ */ package algoliasearch.search -/** `batchDictionaryEntries` parameters. +/** Request body for updating dictionary entries. * * @param clearExistingDictionaryEntries - * Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + * Whether to replace all custom entries in the dictionary with the ones sent with this request. * @param requests - * Operations to batch. + * List of additions and deletions to your dictionaries. */ case class BatchDictionaryEntriesParams( clearExistingDictionaryEntries: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesRequest.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesRequest.scala index 862ca2295d..36d21cdaf9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesRequest.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchDictionaryEntriesRequest.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchParams.scala index 7cb8343fbf..6c2a1cc5fb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchRequest.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchRequest.scala index e8bc952494..2b4959ba0c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchRequest.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchRequest.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchResponse.scala index 78cf98fac4..c2aeba4091 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,9 +38,10 @@ package algoliasearch.search * * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. * @param objectIDs - * Unique object (record) identifiers. + * Unique record identifiers. */ case class BatchResponse( taskID: Long, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchWriteParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchWriteParams.scala index b4551d1cf3..6f7032807e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchWriteParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BatchWriteParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParams.scala index 15168a344a..2ce2088f85 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala index 89509a7c1b..1b9b4bfcf9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -21,197 +44,269 @@ import algoliasearch.search.RemoveWordsIfNoResults._ /** BrowseParamsObject * * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param cursor - * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass - * this value to the subsequent browse call to get the next page of results. When the end of the index has been - * reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the response of a + * previous request. The last page of the response does not return a `cursor` attribute. */ case class BrowseParamsObject( query: Option[String] = scala.None, @@ -240,14 +335,12 @@ case class BrowseParamsObject( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseResponse.scala index 33f4f797f0..73e1278e83 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -20,7 +43,7 @@ package algoliasearch.search * @param aroundLatLng * Computed geographical location. * @param automaticRadius - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustiveFacetsCount * See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits @@ -28,7 +51,7 @@ package algoliasearch.search * @param exhaustiveTypo * See the `typo` field of the `exhaustive` object in the response. * @param facets - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. * @param facetsStats * Statistics for numerical facets. * @param hitsPerPage @@ -40,13 +63,13 @@ package algoliasearch.search * @param message * Warnings about the query. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). * @param nbPages - * Number of pages of results for the current query. + * Number of pages of results. * @param nbSortedHits * Number of hits selected and sorted by the relevant sort algorithm. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param parsedQuery * 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. @@ -62,18 +85,20 @@ package algoliasearch.search * @param serverUsed * Host name of the server that processed the request. * @param userData - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. * @param queryID * Unique identifier for the query. This is used for [click * analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). + * @param hits + * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional + * attributes, such as, for highlighting. * @param query - * Text to search for in an index. + * Search query. * @param params * URL-encoded string of all search parameters. * @param cursor - * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass - * this value to the subsequent browse call to get the next page of results. When the end of the index has been - * reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the response of a + * previous request. The last page of the response does not return a `cursor` attribute. */ case class BrowseResponse( abTestID: Option[Int] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperation.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperation.scala index 231ad5988b..726309ed96 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperation.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperation.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,10 +36,11 @@ package algoliasearch.search import algoliasearch.search.BuiltInOperationType._ -/** To update an attribute without pushing the entire record, you can use these built-in operations. +/** Update to perform on the attribute. * * @param value - * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value. + * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` + * value. */ case class BuiltInOperation( _operation: BuiltInOperationType, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperationType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperationType.scala index de522f3bc9..09b9c40346 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperationType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BuiltInOperationType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,7 @@ import org.json4s._ sealed trait BuiltInOperationType -/** Operation to apply to the attribute. +/** How to change the attribute. */ object BuiltInOperationType { case object Increment extends BuiltInOperationType { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Condition.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Condition.scala index f43a972291..51487d01d4 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Condition.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Condition.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,15 +39,25 @@ import algoliasearch.search.Anchoring._ /** Condition * * @param pattern - * Query pattern syntax. + * Query pattern that triggers the rule. You can use either a literal string, or a special pattern + * `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal + * string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when + * users search for a genre, such as \"comedy\". * @param alternatives - * Whether the pattern matches on plurals, synonyms, and typos. + * Whether the pattern should match plurals, synonyms, and typos. * @param context - * Rule context format: [A-Za-z0-9_-]+). + * An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` + * parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching + * `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. + * @param filters + * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is + * triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` + * parameter. */ case class Condition( pattern: Option[String] = scala.None, anchoring: Option[Anchoring] = scala.None, alternatives: Option[Boolean] = scala.None, - context: Option[String] = scala.None + context: Option[String] = scala.None, + filters: Option[String] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Consequence.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Consequence.scala index fe9a8ff2a0..5af2d6a49e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Consequence.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Consequence.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,18 +34,21 @@ */ package algoliasearch.search -/** [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +/** Effect of the rule. For more information, see + * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). * * @param promote - * Records to promote. + * Records you want to pin to a specific position in the search results. You can promote up to 300 records, either + * individually, or as groups of up to 100 records each. * @param filterPromotes - * Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match - * the filters of the current search. When `false`, the promoted results will show up regardless of the filters. + * Whether promoted records must match an active filter for the consequence to be applied. This ensures that user + * actions (filtering the search) are given a higher precendence. For example, if you promote a record with the + * `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. * @param hide - * Records to hide. By default, you can hide up to 50 records per rule. + * Records you want to hide from the search results. * @param userData - * Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by - * the API. It's limited to 1kB of minified JSON. + * A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't + * interpreted by the API and is limited to 1 kB of minified JSON. */ case class Consequence( params: Option[ConsequenceParams] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceHide.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceHide.scala index 93ed0f416e..c9182ead62 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceHide.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceHide.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,10 +34,10 @@ */ package algoliasearch.search -/** Unique identifier of the record to hide. +/** Object ID of the record to hide. * * @param objectID - * Unique object identifier. + * Unique record identifier. */ case class ConsequenceHide( objectID: String diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala index 402a8a4dfe..edb00f6022 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -21,191 +44,264 @@ import algoliasearch.search.RemoveWordsIfNoResults._ /** ConsequenceParams * * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class ConsequenceParams( similarQuery: Option[String] = scala.None, @@ -233,14 +329,12 @@ case class ConsequenceParams( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQuery.scala index b0edecfd9c..3da0107797 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQuery.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,8 +36,8 @@ package algoliasearch.search import org.json4s._ -/** When providing a string, it replaces the entire query string. When providing an object, it describes incremental - * edits to be made to the query string (but you can't do both). +/** Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that + * string. If `consequenceQuery` is an object, it describes incremental edits made to the query. */ sealed trait ConsequenceQuery diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQueryObject.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQueryObject.scala index b2c5118597..fd4a960237 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQueryObject.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceQueryObject.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,9 +37,9 @@ package algoliasearch.search /** ConsequenceQueryObject * * @param remove - * Words to remove. + * Words to remove from the search query. * @param edits - * Edits to apply. + * Changes to make to the search query. */ case class ConsequenceQueryObject( remove: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/CreatedAtResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/CreatedAtResponse.scala index 334f88f3b0..dceaf9fafb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/CreatedAtResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/CreatedAtResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,7 +37,7 @@ package algoliasearch.search /** Response and creation timestamp. * * @param createdAt - * Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + * Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ case class CreatedAtResponse( createdAt: String diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Cursor.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Cursor.scala index 9c30f9ac10..ed11c457f2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Cursor.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Cursor.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,9 +37,8 @@ package algoliasearch.search /** Cursor * * @param cursor - * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass - * this value to the subsequent browse call to get the next page of results. When the end of the index has been - * reached, `cursor` is absent from the response. + * Cursor to get the next page of the response. The parameter must match the value returned in the response of a + * previous request. The last page of the response does not return a `cursor` attribute. */ case class Cursor( cursor: Option[String] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteApiKeyResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteApiKeyResponse.scala index 1c82381e69..86360dd6f2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteApiKeyResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteApiKeyResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteByParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteByParams.scala index 08659dbd43..6286fa3175 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteByParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteByParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,20 +37,35 @@ package algoliasearch.search /** DeleteByParams * * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. */ case class DeleteByParams( facetFilters: Option[FacetFilters] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteSourceResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteSourceResponse.scala index 0fab7494e3..ff81b5b62e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteSourceResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeleteSourceResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeletedAtResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeletedAtResponse.scala index 372badc84c..02163bbb6f 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeletedAtResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DeletedAtResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,8 @@ package algoliasearch.search * * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. * @param deletedAt * Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryAction.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryAction.scala index f452be1304..9ce8761c91 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryAction.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryAction.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntry.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntry.scala index 257783beb1..259171d0a1 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntry.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntry.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -19,25 +42,16 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ /** Dictionary entry. * * @param objectID - * Unique identifier for a dictionary object. + * Unique identifier for the dictionary entry. * @param language - * [Supported language ISO - * code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * ISO code of a [supported + * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). * @param word - * Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want - * to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by - * adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When `decomposition` - * is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" - * and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, when decomposition - * is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” and “hutte”, discarding the - * linking \"e\". + * Matching dictionary word for `stopwords` and `compounds` dictionaries. * @param words - * Compound dictionary [word - * declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). - * If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the - * custom dictionary and setting its `state` to `disabled`. + * Matching words in the `plurals` dictionary including declensions. * @param decomposition - * For compound entries, governs the behavior of the `word` parameter. + * Invividual components of a compound word in the `compounds` dictionary. */ case class DictionaryEntry( objectID: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntryState.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntryState.scala index bba3a94483..efaa29a715 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntryState.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryEntryState.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,7 @@ import org.json4s._ sealed trait DictionaryEntryState -/** Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). +/** Whether a dictionary entry is active. */ object DictionaryEntryState { case object Enabled extends DictionaryEntryState { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryLanguage.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryLanguage.scala index 48eb381b7c..5e5bd4ad59 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryLanguage.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryLanguage.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,11 +34,10 @@ */ package algoliasearch.search -/** Custom entries for a dictionary. +/** Dictionary type. If `null`, this dictionary type isn't supported for the language. * * @param nbCustomEntries - * If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, - * that feature isn't available or isn't supported for that language. + * Number of custom dictionary entries. */ case class DictionaryLanguage( nbCustomEntries: Option[Int] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionarySettingsParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionarySettingsParams.scala index 16e165c62e..b2a8e3b377 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionarySettingsParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionarySettingsParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,7 +34,7 @@ */ package algoliasearch.search -/** Enable or turn off the built-in Algolia stop words for a specific language. +/** Turn on or off the built-in Algolia stop words for a specific language. */ case class DictionarySettingsParams( disableStandardEntries: StandardEntries diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryType.scala index c8762ab2be..db2e569001 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/DictionaryType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Distinct.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Distinct.scala index adbe8120f3..a7737e3480 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Distinct.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Distinct.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,8 +36,11 @@ package algoliasearch.search import org.json4s._ -/** Enables [deduplication or grouping of results (Algolia's _distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +/** Determines how many records of a group are included in the search results. Records with the same value for the + * `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the + * group are returned. This is useful for [deduplication and + * grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + * The `distinct` setting is ignored if `attributeForDistinct` is not set. */ sealed trait Distinct diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Edit.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Edit.scala index 19f8368740..06ab536d93 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Edit.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Edit.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +41,7 @@ import algoliasearch.search.EditType._ * @param delete * Text or patterns to remove from the query string. * @param insert - * Text that should be inserted in place of the removed text inside the query string. + * Text to be added in place of the deleted text inside the query string. */ case class Edit( `type`: Option[EditType] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/EditType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/EditType.scala index 391b853f6c..9c1da19857 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/EditType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/EditType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ErrorBase.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ErrorBase.scala index 4fba91e7ad..a23dccd1bf 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ErrorBase.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ErrorBase.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ExactOnSingleWordQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ExactOnSingleWordQuery.scala index 763aad3984..c6c1eff233 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ExactOnSingleWordQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ExactOnSingleWordQuery.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -17,7 +40,13 @@ sealed trait ExactOnSingleWordQuery /** Determines how the [Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - * is computed when the query contains only one word. + * is computed when the search query has only one word.
attribute
The Exact ranking + * criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the + * value \"road\", but not \"road trip\".
none
The Exact ranking criterion is ignored + * on single-word searches.
word
The Exact ranking criterion is 1 if the query word is + * found in the attribute value. The query word must have at least 3 characters and must not be a stop word.
+ *
If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches + * won't. */ object ExactOnSingleWordQuery { case object Attribute extends ExactOnSingleWordQuery { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Exhaustive.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Exhaustive.scala index a3323bced5..f61ceec449 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Exhaustive.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Exhaustive.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetFilters.scala index 0c0802e422..04f520e84d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetFilters.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,7 +36,11 @@ package algoliasearch.search import org.json4s._ -/** [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +/** Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the + * `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, + * filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR + * filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that + * start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. */ sealed trait FacetFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetHits.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetHits.scala index 69d5c927ef..5f28b37abf 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetHits.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetHits.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,11 +39,10 @@ package algoliasearch.search * @param value * Facet value. * @param highlighted - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. * @param count - * Number of records containing this facet value. This takes into account the extra search parameters specified in - * the query. Like for a regular search query, the [counts may not be - * exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + * Number of records with this facet value. [The count may be + * approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). */ case class FacetHits( value: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetOrdering.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetOrdering.scala index dd09693dd9..99af13a0f9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetOrdering.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetOrdering.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,10 +34,10 @@ */ package algoliasearch.search -/** Defines the ordering of facets (widgets). +/** Order of facet names and facet values in your UI. * * @param values - * Ordering of facet values within an individual facet. + * Order of facet values. One object for each facet. */ case class FacetOrdering( facets: Option[Facets] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Facets.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Facets.scala index 352a5a3d49..71bf6d6231 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Facets.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Facets.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,10 +34,11 @@ */ package algoliasearch.search -/** Ordering of facets (widgets). +/** Order of facet names. * * @param order - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the + * top of the list. */ case class Facets( order: Option[Seq[String]] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetsStats.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetsStats.scala index 7be67c9ba9..7d6a2f725e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetsStats.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FacetsStats.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FetchedIndex.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FetchedIndex.scala index ce50c56dba..cb03353d86 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FetchedIndex.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/FetchedIndex.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetApiKeyResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetApiKeyResponse.scala index dde0fd32ac..353fd0a4ae 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetApiKeyResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetApiKeyResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -20,41 +43,36 @@ import algoliasearch.search.Acl._ * @param createdAt * Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). * @param acl - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the - * key. + * Permissions that determine the type of API requests this key can make. The required ACL is listed in each + * endpoint's reference. For more information, see [access control + * list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). * @param description - * Description of an API key for you and your team members. + * Description of an API key to help you identify this API key. * @param indexes - * Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. - * Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For - * example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - - * `*_products_*` matches all indices containing \"_products_\". + * Index names or patterns that this API key can access. By default, an API key can access all indices in the same + * application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting + * with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing + * \"_products_\". * @param maxHitsPerQuery - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this - * parameter to protect you from third-party attempts to retrieve your entire content by massively querying the - * index. + * Maximum number of results this API key can retrieve in one query. By default, there's no limit. * @param maxQueriesPerIPPerHour - * Maximum number of API calls per hour allowed from a given IP address or [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed - * with this key, a check is performed. If there were more than the specified number of calls within the last hour, - * the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect - * you from third-party attempts to retrieve your entire content by massively querying the index. + * Maximum number of API requests allowed per IP address or [user + * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, + * the API returns an error with status code `429`. By default, there's no limit. * @param queryParameters - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each - * query made with this API key. It's a URL-encoded query string. + * Query parameters to add when making API requests with this API key. To restrict this API key to specific IP + * addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of + * IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted + * range. * @param referers - * Restrict this API key to specific - * [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - * If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with - * \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` - * allows everything in the domain \"algolia.com\". + * Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing + * wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" + * \- `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the + * domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. + * For more information, see [HTTP referrer + * restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). * @param validity - * Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The - * default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For - * example, in mobile apps, you can't [control when users update your - * app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So - * instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your - * mobile app's backend. + * Duration (in seconds) after which the API key expires. By default, API keys don't expire. */ case class GetApiKeyResponse( value: Option[String] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetDictionarySettingsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetDictionarySettingsResponse.scala index 448f5a4e27..9f65b8c8d3 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetDictionarySettingsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetDictionarySettingsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetLogsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetLogsResponse.scala index 488292d874..92f5efa107 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetLogsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetLogsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsParams.scala index 4b5fdb4556..7e7a48a441 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsRequest.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsRequest.scala index 91de8086d5..7a4501ea85 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsRequest.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsRequest.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,14 +34,14 @@ */ package algoliasearch.search -/** Record retrieval operation. +/** Request body for retrieving records. * * @param attributesToRetrieve * Attributes to retrieve. If not specified, all retrievable attributes are returned. * @param objectID - * Record's objectID. + * Object ID for the record to retrieve. * @param indexName - * Name of the index containing the required records. + * Index from which to retrieve the records. */ case class GetObjectsRequest( attributesToRetrieve: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsResponse.scala index 2dc5bf807b..04ef9728ec 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetObjectsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,7 +37,7 @@ package algoliasearch.search /** GetObjectsResponse * * @param results - * Retrieved results. + * Retrieved records. */ case class GetObjectsResponse( results: Seq[Any] diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTaskResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTaskResponse.scala index e182540e7b..c3d3c280a8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTaskResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTaskResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTopUserIdsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTopUserIdsResponse.scala index 03a0107e87..62549c3dd3 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTopUserIdsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/GetTopUserIdsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HasPendingMappingsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HasPendingMappingsResponse.scala index a416018458..0ac7297963 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HasPendingMappingsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HasPendingMappingsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,7 +37,7 @@ package algoliasearch.search /** HasPendingMappingsResponse * * @param pending - * Indicates whether there are clusters undergoing migration, creation, or deletion. + * Whether there are clusters undergoing migration, creation, or deletion. * @param clusters * Cluster pending mapping state: migrating, creating, deleting. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResult.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResult.scala index 9e38edf34b..0e2c9bec06 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResult.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResult.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResultOption.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResultOption.scala index 8c2ff9a5e9..bbac1b61c6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResultOption.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/HighlightResultOption.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,12 +36,12 @@ package algoliasearch.search import algoliasearch.search.MatchLevel._ -/** Show highlighted section and words matched on a query. +/** Surround words that match the query with HTML tags for highlighting. * * @param value - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. * @param matchedWords - * List of words from the query that matched the object. + * List of matched words from the search query. * @param fullyHighlighted * Whether the entire attribute value is highlighted. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Hit.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Hit.scala index db472ffff0..f34a4290db 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Hit.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Hit.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,14 +37,15 @@ package algoliasearch.search import org.json4s.MonadicJValue.jvalueToMonadic import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, TypeInfo} -/** A single hit. +/** Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, + * and ranking. * * @param objectID - * Unique object identifier. + * Unique record identifier. * @param highlightResult - * Show highlighted section and words matched on a query. + * Surround words that match the query with HTML tags for highlighting. * @param snippetResult - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + * Snippets that show the context around a matching search query. */ case class Hit( objectID: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IgnorePlurals.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IgnorePlurals.scala index a5052e51d1..0dc1e25928 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IgnorePlurals.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IgnorePlurals.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,14 +36,8 @@ package algoliasearch.search import org.json4s._ -/** Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in conjunction - * with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals should be enabled. This - * list will override any values that you may have set in `queryLanguages`. _true_: enables the ignore plurals feature, - * where singulars and plurals are considered equivalent (\"foot\" = \"feet\"). The languages supported here are either - * [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so that - * singulars and plurals aren't considered to be the same (\"foot\" will not find \"feet\"). +/** Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the + * languages used in your index. */ sealed trait IgnorePlurals diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala index 89dd9c32b2..26104a5baa 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -18,159 +41,276 @@ import algoliasearch.search.Mode._ import algoliasearch.search.QueryType._ import algoliasearch.search.RemoveWordsIfNoResults._ -/** Algolia index settings. +/** Index settings. * + * @param attributesForFaceting + * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + * Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search + * results. By default, no attribute is used for faceting. **Modifiers**
+ *
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue + * the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet values.
+ *
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ deduplication with + * `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: + * `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a regular facet. * @param replicas - * Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - * which are copies of a primary index with the same records but different settings. + * Creates [replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas + * are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to + * offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a + * primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete + * set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, + * standalone index that will no longer by synced with the primary index. **Modifier**
+ *
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the + * number of records and are optimized for [Relevant + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + *
Without modifier, a standard replica is created, which duplicates your record count and is used for + * strict, or [exhaustive + * sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). * @param paginationLimitedTo - * Maximum number of hits accessible through pagination. + * Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down + * your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. * @param unretrievableAttributes - * Attributes that can't be retrieved at query time. + * Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking + * or to [restrict + * access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't + * want to include it in the search results. * @param disableTypoToleranceOnWords * Words for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also + * turns off [word splitting and + * concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * for the specified words. * @param attributesToTransliterate - * Attributes in your index to which [Japanese - * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - * applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + * Attributes, for which you want to support [Japanese + * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + * Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must + * set the indexing language to Japanese. * @param camelCaseAttributes - * Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + * Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. * @param decompoundedAttributes - * Attributes in your index to which [word + * Searchable attributes to which Algolia should apply [word * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * (decompounding) applies. + * (decompounding). Compound words are formed by combining two or more individual words, and are particularly + * prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are + * indexed separately. You can specify different lists for different languages. Decompounding is supported for these + * languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). * @param indexLanguages - * Set the languages of your index, for language-specific processing steps such as - * [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - * and - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific + * processing steps, such as word detection and dictionary settings. **You should always specify an indexing + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param disablePrefixOnAttributes - * Attributes for which you want to turn off [prefix + * Searchable attributes for which you want to turn off [prefix * matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). * @param allowCompressionOfIntegerArray - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the + * Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the * compressed arrays may be reordered. * @param numericAttributesForFiltering * Numeric attributes that can be used as [numerical * filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + * By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of + * numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that + * doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
+ *
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` and + * `!=`.
Without modifier, all numeric comparisons are supported. * @param separatorsToIndex - * Controls which separators are added to an Algolia index as part of - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - * Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + * Controls which separators are indexed. Separators are all non-letter characters except spaces and currency + * characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia + * treats separator characters as separate words. For example, a search for `C#` would report two matches. * @param searchableAttributes - * [Attributes used for - * searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including - * determining [if matches at the beginning of a word are important (ordered) or not - * (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + * Attributes used for searching. By default, all attributes are searchable and the + * [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + * ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected + * attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in + * the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a + * comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always + * unordered. For more information, see [Searchable + * attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + * **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within the + * attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches at the + * end. * @param userData - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. * @param customNormalization - * A list of characters and their normalized replacements to override Algolia's default + * Characters and their normalized replacements. This overrides Algolia's default * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * @param attributeForDistinct - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Attribute that should be used to establish groups of results. All records with the same value for this attribute + * are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how + * many items per group are included in the search results. If you want to use the same attribute also for faceting, + * use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ + * deduplication, which will result in accurate facet counts. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class IndexSettings( + attributesForFaceting: Option[Seq[String]] = scala.None, replicas: Option[Seq[String]] = scala.None, paginationLimitedTo: Option[Int] = scala.None, unretrievableAttributes: Option[Seq[String]] = scala.None, @@ -187,7 +327,6 @@ case class IndexSettings( userData: Option[Any] = scala.None, customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala index 2ea122a816..f3bef9ba27 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -20,107 +43,173 @@ import algoliasearch.search.RemoveWordsIfNoResults._ /** IndexSettingsAsSearchParams * - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class IndexSettingsAsSearchParams( - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/JsonSupport.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/JsonSupport.scala index f2af940c60..975c15244a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/JsonSupport.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/JsonSupport.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Languages.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Languages.scala index 34ca88b952..d44de46962 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Languages.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Languages.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListApiKeysResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListApiKeysResponse.scala index 47157ab55c..b70e840d50 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListApiKeysResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListApiKeysResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListClustersResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListClustersResponse.scala index 2013b0d3ad..1c034c8ec7 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListClustersResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListClustersResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListIndicesResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListIndicesResponse.scala index 6b8e1bff1a..67023cf0f7 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListIndicesResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListIndicesResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListUserIdsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListUserIdsResponse.scala index 7c7a28e5c2..b4a4c2bbcc 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListUserIdsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ListUserIdsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Log.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Log.scala index e87e411f78..d07a17bcf7 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Log.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Log.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,38 +34,40 @@ */ package algoliasearch.search +import java.net.URI + /** Log * * @param timestamp - * Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + * Timestamp of the API request in ISO 8601 format. * @param method - * HTTP method of the performed request. + * HTTP method of the request. * @param answerCode - * HTTP response code. + * HTTP status code of the response. * @param queryBody - * Request body. Truncated after 1,000 characters. + * Request body. * @param answer - * Answer body. Truncated after 1,000 characters. + * Response body. * @param url - * Request URL. + * URL of the API endpoint. * @param ip * IP address of the client that performed the request. * @param queryHeaders - * Request headers (API key is obfuscated). + * Request headers (API keys are obfuscated). * @param sha1 * SHA1 signature of the log entry. * @param nbApiCalls - * Number of API calls. + * Number of API requests. * @param processingTimeMs - * Processing time for the query. Doesn't include network time. + * Processing time for the query in milliseconds. This doesn't include latency due to the network. * @param index * Index targeted by the query. * @param queryParams * Query parameters sent with the request. * @param queryNbHits - * Number of hits returned for the query. + * Number of search results (hits) returned for the query. * @param innerQueries - * Performed queries for the given request. + * Queries performed for the given request. */ case class Log( timestamp: String, @@ -50,7 +75,7 @@ case class Log( answerCode: String, queryBody: String, answer: String, - url: String, + url: URI, ip: String, queryHeaders: String, sha1: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogQuery.scala index 6a093a62d3..b87b904139 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogQuery.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,7 +39,7 @@ package algoliasearch.search * @param indexName * Index targeted by the query. * @param userToken - * User identifier. + * A user identifier. * @param queryId * Unique query identifier. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogType.scala index a0a64956f9..46e6bdf989 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/LogType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchLevel.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchLevel.scala index 560afbf2a0..8c3da94695 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchLevel.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchLevel.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,7 @@ import org.json4s._ sealed trait MatchLevel -/** Indicates how well the attribute matched the search query. +/** Whether the whole query string matches or only a part. */ object MatchLevel { case object None extends MatchLevel { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchedGeoLocation.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchedGeoLocation.scala index bbbcec85a9..41123444de 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchedGeoLocation.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MatchedGeoLocation.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MixedSearchFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MixedSearchFilters.scala index ee452a2ed2..1cb0b27fbe 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MixedSearchFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MixedSearchFilters.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Mode.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Mode.scala index 8ef336fad8..fb6a8891c5 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Mode.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Mode.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,8 @@ import org.json4s._ sealed trait Mode -/** Search mode the index will use to query for results. +/** Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled + * NeuralSearch for you. */ object Mode { case object NeuralSearch extends Mode { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchRequest.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchRequest.scala index 5128386148..6d6f2a1a9a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchRequest.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchRequest.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchResponse.scala index 78a8692ccf..bf1a0fed03 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/MultipleBatchResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,9 +37,9 @@ package algoliasearch.search /** MultipleBatchResponse * * @param taskID - * TaskIDs per index. + * Task IDs. One for each index. * @param objectIDs - * Unique object (record) identifiers. + * Unique record identifiers. */ case class MultipleBatchResponse( taskID: Map[String, Long], diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/NumericFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/NumericFilters.scala index 69cf333b47..eb9d35c1c2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/NumericFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/NumericFilters.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,7 +36,10 @@ package algoliasearch.search import org.json4s._ -/** [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +/** Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations + * with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are + * precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and + * upper boundaries. The same combination rules apply as for `facetFilters`. */ sealed trait NumericFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationIndexParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationIndexParams.scala index 2c62218c67..c89c68e0a9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationIndexParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationIndexParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -17,10 +40,11 @@ import algoliasearch.search.ScopeType._ /** OperationIndexParams * * @param destination - * Algolia index name. + * Index name. * @param scope - * **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, settings, - * synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + * **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes + * are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and + * rules. */ case class OperationIndexParams( operation: OperationType, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationType.scala index 2de1f102d4..1ef934d795 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OperationType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,7 @@ import org.json4s._ sealed trait OperationType -/** Operation to perform (_move_ or _copy_). +/** Operation to perform on the index. */ object OperationType { case object Move extends OperationType { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OptionalFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OptionalFilters.scala index adc3d76d43..635d054d79 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OptionalFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/OptionalFilters.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,9 +36,11 @@ package algoliasearch.search import org.json4s._ -/** Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower - * for negative optional filters. In contrast to regular filters, records that don't match the optional filter are - * still included in the results, only their ranking is affected. +/** Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't + * exclude records from the search results. Records that match the optional filter rank before records that don't + * match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - + * Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - + * Optional filters don't work with numeric attributes. */ sealed trait OptionalFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Params.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Params.scala index a7240ae7ae..a00e04ad42 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Params.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Params.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,7 +34,8 @@ */ package algoliasearch.search -/** Additional search parameters. +/** Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, + * `automaticOptionalFacetFilters`, and `query`. */ case class Params( query: Option[ConsequenceQuery] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Personalization.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Personalization.scala index dd15858585..4481f56e38 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Personalization.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Personalization.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Promote.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Promote.scala index 37467b9cf0..32fb07ef80 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Promote.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Promote.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectID.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectID.scala index 12c110f4db..4f2bd8fd43 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectID.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectID.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,10 +37,9 @@ package algoliasearch.search /** Record to promote. * * @param objectID - * Unique identifier of the record to promote. + * Unique record identifier. * @param position - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. - * For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ case class PromoteObjectID( objectID: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectIDs.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectIDs.scala index 8f12bfc39f..ddc57fac8d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectIDs.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/PromoteObjectIDs.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,10 +37,10 @@ package algoliasearch.search /** Records to promote. * * @param objectIDs - * Unique identifiers of the records to promote. + * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, + * if you want to promote four records to position `0`, they will be the first four search results. * @param position - * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. - * For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + * Position in the search results where you want to show the promoted records. */ case class PromoteObjectIDs( objectIDs: Seq[String], diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/QueryType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/QueryType.scala index 77d6d206e9..b29e90f27e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/QueryType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/QueryType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,8 +38,11 @@ import org.json4s._ sealed trait QueryType -/** Determines how query words are [interpreted as - * prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/** Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as + * prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words + * as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see + * [Prefix + * searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). */ object QueryType { case object PrefixLast extends QueryType { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RankingInfo.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RankingInfo.scala index 623e461344..ae0a62f705 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RankingInfo.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RankingInfo.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,12 +34,12 @@ */ package algoliasearch.search -/** RankingInfo +/** Object with detailed information about the record's ranking. * * @param filters - * This field is reserved for advanced usage. + * Whether a filter matched the query. * @param firstMatchedWord - * Position of the most important matched attribute in the attributes to index list. + * Position of the first matched word in the best matching attribute of the record. * @param geoDistance * Distance between the geo location in the search query and the best matching geo location in the record, divided by * the geo precision (in meters). @@ -27,15 +50,15 @@ package algoliasearch.search * @param nbTypos * Number of typos encountered when matching the record. * @param promoted - * Present and set to true if a Rule promoted the hit. + * Whether the record was promoted by a rule. * @param proximityDistance - * When the query contains more than one word, the sum of the distances between matched words (in meters). + * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. * @param userScore - * Custom ranking for the object, expressed as a single integer value. + * Overall ranking of the record, expressed as a single integer. This attribute is internal. * @param words - * Number of matched words, including prefixes and typos. + * Number of matched words. * @param promotedByReRanking - * Wether the record are promoted by the re-ranking strategy. + * Whether the record is re-ranked. */ case class RankingInfo( filters: Int, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReRankingApplyFilter.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReRankingApplyFilter.scala index 36ec155cb5..be1f8c5efb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReRankingApplyFilter.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReRankingApplyFilter.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,8 +36,8 @@ package algoliasearch.search import org.json4s._ -/** When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that - * match these filters will be affected by Dynamic Re-Ranking. +/** Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these + * filters. */ sealed trait ReRankingApplyFilter diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Redirect.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Redirect.scala index a97a8c0bb0..036c365bb4 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Redirect.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Redirect.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala index d75eff1b47..5eea275ee9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadataData.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadataData.scala index 1df6088a7a..bb352c67cd 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadataData.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadataData.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveStopWords.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveStopWords.scala index 5cc732f84c..c53c63402f 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveStopWords.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveStopWords.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,13 +36,9 @@ package algoliasearch.search import org.json4s._ -/** Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the - * `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override - * any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop - * words are removed from consideration in a search. The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop - * words to be taken into account in a search. +/** Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or + * pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You + * should only use this feature for the languages used in your index. */ sealed trait RemoveStopWords diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveUserIdResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveUserIdResponse.scala index d38393b6b9..5081bd0588 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveUserIdResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveUserIdResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveWordsIfNoResults.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveWordsIfNoResults.scala index 9e3814170d..10aa831ada 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveWordsIfNoResults.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RemoveWordsIfNoResults.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,9 +38,14 @@ import org.json4s._ sealed trait RemoveWordsIfNoResults -/** Strategy to [remove - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - * from the query when it doesn't match any hits. +/** Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning empty + * search results.
none
No words are removed when a query doesn't return results.
+ *
lastWords
Treat the last (then second to last, then third to last) word as optional, until + * there are results or at most 5 words have been removed.
firstWords
Treat the first + * (then second, then third) word as optional, until there are results or at most 5 words have been removed.
+ *
allOptional
Treat all words as optional.
For more information, see [Remove + * words to improve + * results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ object RemoveWordsIfNoResults { case object None extends RemoveWordsIfNoResults { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RenderingContent.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RenderingContent.scala index fb7e3afe0b..16eca1f310 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RenderingContent.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RenderingContent.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,10 +34,8 @@ */ package algoliasearch.search -/** Extra content for the search UI, for example, to control the [ordering and display of - * facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - * You can set a default value and dynamically override it with - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +/** Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the + * order of facet names and values without changing your frontend code. */ case class RenderingContent( facetOrdering: Option[FacetOrdering] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReplaceSourceResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReplaceSourceResponse.scala index 251a549025..2b2e942204 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReplaceSourceResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ReplaceSourceResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Rule.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Rule.scala index d36160aef0..b238748a17 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Rule.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Rule.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,17 +37,17 @@ package algoliasearch.search /** Rule object. * * @param objectID - * Unique identifier for a rule object. + * Unique identifier of a rule object. * @param conditions - * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to - * activate a rule. You can use up to 25 conditions per rule. + * Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. For + * more information, see + * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). * @param description - * Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + * Description of the rule's purpose to help you distinguish between different rules. * @param enabled - * Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + * Whether the rule is active. * @param validity - * If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must - * not be empty. + * Time periods when the rule is active. */ case class Rule( objectID: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveObjectResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveObjectResponse.scala index b161f43e48..bb57c607a6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveObjectResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveObjectResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,12 +37,13 @@ package algoliasearch.search /** SaveObjectResponse * * @param createdAt - * Date of creation (ISO-8601 format). + * Timestamp when the record was added, in ISO 8601 format. * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. * @param objectID - * Unique object identifier. + * Unique record identifier. */ case class SaveObjectResponse( createdAt: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveSynonymResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveSynonymResponse.scala index 984842f393..1f68812d94 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveSynonymResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SaveSynonymResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,8 @@ package algoliasearch.search * * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. * @param updatedAt * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. * @param id diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ScopeType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ScopeType.scala index 570f1b93ce..3bf451f231 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ScopeType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ScopeType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesParams.scala index 308fb915cb..6d160f9d4a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,17 +34,17 @@ */ package algoliasearch.search -/** `searchDictionaryEntries` parameters. +/** Search parameter. * * @param query - * Text to search for in an index. + * Search query. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param hitsPerPage * Number of hits per page. * @param language - * [Supported language ISO - * code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + * ISO code of a [supported + * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). */ case class SearchDictionaryEntriesParams( query: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesResponse.scala new file mode 100644 index 0000000000..fd74590e6a --- /dev/null +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchDictionaryEntriesResponse.scala @@ -0,0 +1,53 @@ +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. + * + * The version of the OpenAPI document: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech Do not edit the class manually. + */ +package algoliasearch.search + +/** SearchDictionaryEntriesResponse + * + * @param hits + * Dictionary entries matching the search criteria. + * @param page + * Requested page of the API response. + * @param nbHits + * Number of results (hits). + * @param nbPages + * Number of pages of results. + */ +case class SearchDictionaryEntriesResponse( + hits: Seq[DictionaryEntry], + page: Int, + nbHits: Int, + nbPages: Int +) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesRequest.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesRequest.scala index d0adf3084f..58a5dbb97b 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesRequest.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesRequest.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -18,7 +41,7 @@ package algoliasearch.search * @param facetQuery * Text to search inside the facet's values. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ case class SearchForFacetValuesRequest( diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesResponse.scala index e19f8f1b43..a042f4e440 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetValuesResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,6 +36,8 @@ package algoliasearch.search /** SearchForFacetValuesResponse * + * @param facetHits + * Matching facet values. * @param exhaustiveFacetsCount * See the `facetsCount` field of the `exhaustive` object in the response. * @param processingTimeMS diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala index a13e84f796..8cc6a173fd 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -24,197 +47,270 @@ import algoliasearch.search.SearchTypeFacet._ * @param params * Search parameters as a URL-encoded query string. * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param facet * Facet name. * @param indexName - * Algolia index name. + * Index name. * @param facetQuery * Text to search inside the facet's values. */ @@ -246,14 +342,12 @@ case class SearchForFacets( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetsOptions.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetsOptions.scala index fe5eda1fb8..a841b2f711 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetsOptions.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacetsOptions.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -18,11 +41,11 @@ import algoliasearch.search.SearchTypeFacet._ * @param facet * Facet name. * @param indexName - * Algolia index name. + * Index name. * @param facetQuery * Text to search inside the facet's values. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). */ case class SearchForFacetsOptions( diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala index 4179c9eebb..34cc8859ad 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -24,195 +47,268 @@ import algoliasearch.search.SearchTypeDefault._ * @param params * Search parameters as a URL-encoded query string. * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. * @param indexName - * Algolia index name. + * Index name. */ case class SearchForHits( params: Option[String] = scala.None, @@ -242,14 +338,12 @@ case class SearchForHits( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHitsOptions.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHitsOptions.scala index f8f228fc09..07a80eb6c3 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHitsOptions.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHitsOptions.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,7 +39,7 @@ import algoliasearch.search.SearchTypeDefault._ /** SearchForHitsOptions * * @param indexName - * Algolia index name. + * Index name. */ case class SearchForHitsOptions( indexName: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchHits.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchHits.scala index d33c4d2797..08c43d6c1c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchHits.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchHits.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,8 +39,11 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ /** SearchHits * + * @param hits + * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional + * attributes, such as, for highlighting. * @param query - * Text to search for in an index. + * Search query. * @param params * URL-encoded string of all search parameters. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchMethodParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchMethodParams.scala index cf2d9d17a9..a53321d87e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchMethodParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchMethodParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParams.scala index eaa5407b4a..fe071741d4 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala index 4e987ebf09..b6c6fbe07e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -21,193 +44,266 @@ import algoliasearch.search.RemoveWordsIfNoResults._ /** SearchParamsObject * * @param query - * Text to search for in an index. + * Search query. * @param similarQuery - * Overrides the query parameter and performs a more generic search. + * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + * parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + * `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + * `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + * narrow down the list of results. * @param filters - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - * facet, or tag filters. + * Filter the search so that only records with matching values are included in the results. These filters are + * supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. + * \- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the + * range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) + * and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean + * filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the + * following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value + * OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR + * facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value + * AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords + * (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one + * element of the array. For more information, see + * [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). * @param sumOrFiltersScores - * Determines how to calculate [filter + * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + * kept. For more information, see [filter * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. * @param restrictSearchableAttributes - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + * Restricts a search to a subset of your searchable attributes. * @param facets - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. + * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. + * To retrieve all facets, use the wildcard character `*`. For more information, see + * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). * @param facetingAfterDistinct - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct - * feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - * `attributesForFaceting` allows for more granular control. + * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when + * using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + * `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have + * the same facet values for the `attributeForDistinct`. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param offset - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - * method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Position of the first hit to retrieve. * @param length - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - * recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - * can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + * Number of hits to retrieve (used in combination with `offset`). * @param aroundLatLng - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. + * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + * records included within circle around this central location are included in the results. The radius of the circle + * is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also + * specify `insidePolygon` or `insideBoundingBox`. * @param aroundLatLngViaIP - * Search for entries around a location. The location is automatically computed from the requester's IP address. + * Whether to obtain the coordinates from the request's IP address. * @param minimumAroundRadius - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + * Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. * @param insideBoundingBox - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of + * its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple + * bounding boxes as nested arrays. For more information, see [rectangular + * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). * @param insidePolygon - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). + * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented + * by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering + * inside + * polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + * This parameter is ignored, if you also specify `insideBoundingBox`. * @param naturalLanguages - * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - * `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - * together when the query consists of fuller natural language strings instead of keywords, for example when - * processing voice search queries. + * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + * keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + * `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + * `analyticsTags`. * @param ruleContexts - * Assigns [rule + * Assigns a rule context to the search query. [Rule * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. + * are strings that you can use to trigger matching rules. * @param personalizationImpact - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + * Impact that Personalization should have on this search. The higher this value is, the more Personalization + * determines the ranking compared to other factors. For more information, see [Understanding Personalization + * impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). * @param userToken - * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. + * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For + * more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). * @param getRankingInfo - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * @param explain - * Enriches the API's response with information about how the query was processed. + * Whether the search response should include detailed ranking information. * @param synonyms - * Whether to take into account an index's synonyms for a particular search. + * Whether to take into account an index's synonyms for this search. * @param clickAnalytics - * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - * and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query + * and is required for tracking [click and conversion + * events](https://www.algolia.com/guides/sending-events/getting-started/). * @param analytics - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + * Whether this search will be included in Analytics. * @param analyticsTags * Tags to apply to the query for [segmenting analytics * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). * @param percentileComputation - * Whether to include or exclude a query from the processing-time percentile computation. + * Whether to include this search when calculating processing-time percentiles. * @param enableABTest - * Incidates whether this search will be considered in A/B testing. - * @param attributesForFaceting - * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - * can be applied: `filterOnly`, `searchable`, and `afterDistinct`. + * Whether to enable A/B testing for this search. * @param attributesToRetrieve * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the - * attributes. By default, the response includes all attributes. + * attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + * `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with + * a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. * @param ranking - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + * criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The + * tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a + * replica index for [sorting by an + * attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + * you put the sorting attribute at the top of the list. **Modifiers**
asc(\"ATTRIBUTE\")
+ *
Sort the index by the values of an attribute, in ascending order.
+ *
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in descending + * order.
Before you modify the default setting, you should test your changes in the dashboard, and by + * [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). * @param customRanking - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` - * modifiers to specify the ranking order: ascending or descending. + * Attributes to use as [custom + * ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + * attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values + * for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their + * alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by the values + * of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the index by the + * values of an attribute, in descending order.
If you use two or more custom ranking attributes, [reduce + * the + * precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + * of your first attributes, or the other attributes will never be applied. * @param relevancyStrictness - * Relevancy threshold below which less relevant results aren't included in the results. + * Relevancy threshold below which less relevant results aren't included in the results. You can only set + * `relevancyStrictness` on [virtual replica + * indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + * Use this setting to strike a balance between the relevance and number of returned results. * @param attributesToHighlight - * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them - * with HTML tags (`highlightPreTag` and `highlightPostTag`). + * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + * attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search + * query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to + * visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and + * snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). * @param attributesToSnippet - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, - * the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: - * `body:20`. + * Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + * snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + * for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + * `NUMBER` is the number of words to be extracted. * @param highlightPreTag - * HTML string to insert before the highlighted parts in all highlight and snippet results. + * HTML tag to insert before the highlighted parts in all highlighted results and snippets. * @param highlightPostTag - * HTML string to insert after the highlighted parts in all highlight and snippet results. + * HTML tag to insert after the highlighted parts in all highlighted results and snippets. * @param snippetEllipsisText * String used as an ellipsis indicator when a snippet is truncated. * @param restrictHighlightAndSnippetArrays - * Restrict highlighting and snippeting to items that matched the query. + * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + * default, all items are highlighted and snippeted. * @param hitsPerPage * Number of hits per page. * @param minWordSizefor1Typo - * Minimum number of characters a word in the query string must contain to accept matches with [one + * Minimum number of characters a word in the search query must contain to accept matches with [one * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param minWordSizefor2Typos - * Minimum number of characters a word in the query string must contain to accept matches with [two + * Minimum number of characters a word in the search query must contain to accept matches with [two * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). * @param allowTyposOnNumericTokens - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + * matches when searching in large sets of similar numbers. * @param disableTypoToleranceOnAttributes * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning + * only exact matches can help when: - [Searching in hyphenated + * attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + * \- Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of + * text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms + * if your attributes have intentional unusual spellings that might look like typos. * @param keepDiacriticsOnCharacters - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + * example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep their + * diacritics. * @param queryLanguages - * Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - * `removeStopWords`, and + * [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + * plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + * `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + * logogram-based * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. + * languages. To support this, you must place the CJK language **first**. **You should always specify a query + * language.** If you don't specify an indexing language, the search engine uses all [supported + * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + * or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + * unexpected search results. For more information, see [Language-specific + * configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). * @param decompoundQuery - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. + * Whether to split compound words into their building blocks. For more information, see [Word + * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + * Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. * @param enableRules - * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. + * Whether to enable rules. * @param enablePersonalization - * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. + * Whether to enable Personalization. * @param advancedSyntax - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + * parameter to control which feature is supported. * @param optionalWords - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. + * Words that should be considered optional when found in the query. By default, records must match all words in the + * search query to be included in the search results. Adding optional words can help to increase the number of search + * results by running an additional search query that doesn't include the optional words. For example, if the search + * query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action + * video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more + * words **and** all its words are optional, the number of matched words required for a record to be included in the + * search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number + * of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched + * words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of + * optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 + * matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional + * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). * @param disableExactOnAttributes - * Attributes for which you want to [turn off the exact ranking + * Searchable attributes for which you want to [turn off the Exact ranking * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + * product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other + * attributes. This reduces the impact of individual attributes with a lot of content on ranking. * @param alternativesAsExact - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ *
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting are + * considered exact matches.
singleWordSynonym
Single-word synonyms, such as + * \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + * such as \"NY/New York\" are considered exact matches.
. * @param advancedSyntaxFeatures - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + * Advanced search syntax features you want to support.
exactPhrase
Phrases in quotes + * must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string + * \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not occur in a + * record. For example, `search -engine` matches records that contain \"search\" but not \"engine\".
This + * setting only has an effect if `advancedSyntax` is true. * @param replaceSynonymsInHighlight - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + * even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + * matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + * highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, + * but all occurences of \"house\" are replaced by \"home\" in the highlighted response. * @param minProximity - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + * Minimum proximity score for two matching words. This adjusts the [Proximity ranking + * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + * by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + * matches with one word between them would have the same score. * @param responseFields - * Attributes to include in the API response for search and browse queries. + * Properties to include in the API response of `search` and `browse` requests. By default, all response properties + * are included. To reduce the response size, you can select, which attributes should be included. You can't exclude + * these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or + * any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your + * search UI. * @param maxFacetHits - * Maximum number of facet hits to return when [searching for facet + * Maximum number of facet values to return when [searching for facet * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). * @param maxValuesPerFacet * Maximum number of facet values to return for each facet. * @param sortFacetValuesBy - * Controls how facet values are fetched. + * Order in which to retrieve facet values.
count
Facet values are retrieved by + * decreasing count. The count is the number of matching records containing this facet value.
+ *
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + * how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + * display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). * @param attributeCriteriaComputedByMinProximity - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - * ranking stage. + * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking + * if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching + * attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute + * is determined by the order in the `searchableAttributes` setting. * @param enableReRanking - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This + * setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. */ case class SearchParamsObject( query: Option[String] = scala.None, @@ -236,14 +332,12 @@ case class SearchParamsObject( personalizationImpact: Option[Int] = scala.None, userToken: Option[String] = scala.None, getRankingInfo: Option[Boolean] = scala.None, - explain: Option[Seq[String]] = scala.None, synonyms: Option[Boolean] = scala.None, clickAnalytics: Option[Boolean] = scala.None, analytics: Option[Boolean] = scala.None, analyticsTags: Option[Seq[String]] = scala.None, percentileComputation: Option[Boolean] = scala.None, enableABTest: Option[Boolean] = scala.None, - attributesForFaceting: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, customRanking: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsQuery.scala index ce3ea5c98f..17da65588b 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsQuery.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,7 +37,7 @@ package algoliasearch.search /** SearchParamsQuery * * @param query - * Text to search for in an index. + * Search query. */ case class SearchParamsQuery( query: Option[String] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala index 4f22ab99e7..b938c47383 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchQuery.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchQuery.scala index 07c6139987..1d8e701e60 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchQuery.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchQuery.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponse.scala index 9ea010e89d..50c7b69956 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -20,7 +43,7 @@ package algoliasearch.search * @param aroundLatLng * Computed geographical location. * @param automaticRadius - * Automatically-computed radius. + * Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustiveFacetsCount * See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits @@ -28,7 +51,7 @@ package algoliasearch.search * @param exhaustiveTypo * See the `typo` field of the `exhaustive` object in the response. * @param facets - * Mapping of each facet name to the corresponding facet counts. + * Facet counts. * @param facetsStats * Statistics for numerical facets. * @param hitsPerPage @@ -40,13 +63,13 @@ package algoliasearch.search * @param message * Warnings about the query. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). * @param nbPages - * Number of pages of results for the current query. + * Number of pages of results. * @param nbSortedHits * Number of hits selected and sorted by the relevant sort algorithm. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param parsedQuery * 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. @@ -62,12 +85,15 @@ package algoliasearch.search * @param serverUsed * Host name of the server that processed the request. * @param userData - * Lets you store custom data in your indices. + * An object with custom data. You can store up to 32 kB as custom data. * @param queryID * Unique identifier for the query. This is used for [click * analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). + * @param hits + * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional + * attributes, such as, for highlighting. * @param query - * Text to search for in an index. + * Search query. * @param params * URL-encoded string of all search parameters. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponses.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponses.scala index 6dfed6e2bc..9721856672 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponses.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResponses.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResult.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResult.scala index a3183b92ba..2aac68b87d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResult.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchResult.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesParams.scala index 802af6330b..284235abd7 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,18 +39,16 @@ import algoliasearch.search.Anchoring._ /** Rules search parameters. * * @param query - * Rule object query. + * Search query for rules. * @param context - * Restricts responses to the specified [contextual - * rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + * Only return rules that match the context (exact match). * @param page - * Requested page (the first page is page 0). + * Requested page of the API response. * @param hitsPerPage * Maximum number of hits per page. * @param enabled - * Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. - * @param requestOptions - * Request options to send with the API call. + * If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are + * returned. */ case class SearchRulesParams( query: Option[String] = scala.None, @@ -35,6 +56,5 @@ case class SearchRulesParams( context: Option[String] = scala.None, page: Option[Int] = scala.None, hitsPerPage: Option[Int] = scala.None, - enabled: Option[Boolean] = scala.None, - requestOptions: Option[Seq[Any]] = scala.None + enabled: Option[Boolean] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesResponse.scala index f885a659b2..c2c34d0a72 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchRulesResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,9 +37,9 @@ package algoliasearch.search /** SearchRulesResponse * * @param hits - * Fetched rules. + * Rules that matched the search criteria. * @param nbHits - * Number of fetched rules. + * Number of rules that matched the search criteria. * @param page * Current page. * @param nbPages diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchStrategy.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchStrategy.scala index 1fc5818219..3614adb006 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchStrategy.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchStrategy.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,8 +38,8 @@ import org.json4s._ sealed trait SearchStrategy -/** - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping further query - * execution as soon as a query matches at least the `hitsPerPage` number of results. +/** Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by + * one, stopping as soon as a query matches at least the `hitsPerPage` number of results. */ object SearchStrategy { case object None extends SearchStrategy { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsParams.scala index 2949cfee29..a6a7ff9152 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,9 +39,9 @@ import algoliasearch.search.SynonymType._ /** SearchSynonymsParams * * @param query - * Text to search for in an index. + * Search query. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param hitsPerPage * Number of hits per page. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsResponse.scala index 7a994241c9..aab815deb8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchSynonymsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -17,9 +40,9 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ /** SearchSynonymsResponse * * @param hits - * Synonym objects. + * Matching synonyms. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). */ case class SearchSynonymsResponse( hits: Seq[SynonymHit], diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeDefault.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeDefault.scala index b0eef21ff8..6a4625114e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeDefault.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeDefault.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeFacet.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeFacet.scala index bac1c80809..2def8c3217 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeFacet.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchTypeFacet.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsParams.scala index 4f4abe4c63..131eb36943 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsParams.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -20,7 +43,7 @@ package algoliasearch.search * @param clusterName * Cluster name. * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param hitsPerPage * Number of hits per page. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsResponse.scala index d34d21b168..e89f1e54b5 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchUserIdsResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,9 +39,9 @@ package algoliasearch.search * @param hits * User objects that match the query. * @param nbHits - * Number of hits the search query matched. + * Number of results (hits). * @param page - * Page to retrieve (the first page is `0`, not `1`). + * Page of search results to retrieve. * @param hitsPerPage * Maximum number of hits per page. * @param updatedAt diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SecuredAPIKeyRestrictions.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SecuredAPIKeyRestrictions.scala index f81a2cef62..95fc894b06 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SecuredAPIKeyRestrictions.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SecuredAPIKeyRestrictions.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,26 +37,23 @@ package algoliasearch.search /** SecuredAPIKeyRestrictions * * @param filters - * Filters that apply to every search made with the secured API key. You can add extra filters at search time with - * the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add - * groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to - * groups:admin AND (groups:press OR groups:visitors). + * Filters that apply to every search made with the secured API key. Extra filters added at search time will be + * combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add + * `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. * @param validUntil - * Unix timestamp used to set the expiration date of the API key. + * Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. * @param restrictIndices - * Index names that can be queried. + * Index names or patterns that this API key can access. By default, an API key can access all indices in the same + * application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting + * with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing + * \"_products_\". * @param restrictSources - * IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only - * provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + * IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP + * addresses. Use this to protect against API key leaking and reuse. * @param userToken - * Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, - * rate limits are set based on the IP address. This can become an issue when several users search from the same IP - * address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you - * restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. - * Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change - * it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user - * identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and - * prevents abuse. + * Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set + * based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a + * user token to each generated API key. */ case class SecuredAPIKeyRestrictions( searchParams: Option[SearchParamsObject] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SemanticSearch.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SemanticSearch.scala index ea1cf6ea25..31e656e310 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SemanticSearch.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SemanticSearch.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -11,11 +34,11 @@ */ package algoliasearch.search -/** Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +/** Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. * * @param eventSources - * Indices from which to collect click and conversion events. If null, the current index and replica group will be - * used as the event source. + * Indices from which to collect click and conversion events. If null, the current index and all its replicas are + * used. */ case class SemanticSearch( eventSources: Option[Seq[String]] = scala.None diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResult.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResult.scala index c16e63088a..ac2c618cc4 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResult.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResult.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResultOption.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResultOption.scala index b68fd1f3fa..9253272be8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResultOption.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SnippetResultOption.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,10 +36,10 @@ package algoliasearch.search import algoliasearch.search.MatchLevel._ -/** Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +/** Snippets that show the context around a matching search query. * * @param value - * Markup text with `facetQuery` matches highlighted. + * Highlighted attribute value, including HTML tags. */ case class SnippetResultOption( value: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SortRemainingBy.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SortRemainingBy.scala index b6387cb51b..358e62e28c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SortRemainingBy.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SortRemainingBy.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,8 +38,10 @@ import org.json4s._ sealed trait SortRemainingBy -/** How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - - * `hidden`: show only pinned values. +/** Order of facet values that aren't explicitly positioned with the `order` setting.
count
+ *
Order remaining facet values by decreasing count. The count is the number of matching records containing this + * facet value.
alpha
Sort facet values alphabetically.
+ *
hidden
Don't show facet values that aren't explicitly positioned.
. */ object SortRemainingBy { case object Count extends SortRemainingBy { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Source.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Source.scala index f72fc2ebab..ee8fc951dd 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Source.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Source.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/StandardEntries.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/StandardEntries.scala index ce728b8415..54de85441d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/StandardEntries.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/StandardEntries.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymHit.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymHit.scala index 614a613d12..8c24bc4e0e 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymHit.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymHit.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymType.scala index ecd4db95d2..7dd895daf8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SynonymType.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TagFilters.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TagFilters.scala index e7c3f84df2..c1114d1bd2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TagFilters.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TagFilters.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -13,7 +36,10 @@ package algoliasearch.search import org.json4s._ -/** [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +/** Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports + * all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used + * for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules + * apply as for `facetFilters`. */ sealed trait TagFilters diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TaskStatus.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TaskStatus.scala index 335f137ba0..c0cc6cf752 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TaskStatus.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TaskStatus.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,7 @@ import org.json4s._ sealed trait TaskStatus -/** _published_ if the task has been processed, _notPublished_ otherwise. +/** Task status, `published` if the task is completed, `notPublished` otherwise. */ object TaskStatus { case object Published extends TaskStatus { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TimeRange.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TimeRange.scala index 1a623beabe..fe651f4c84 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TimeRange.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TimeRange.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,9 +37,9 @@ package algoliasearch.search /** TimeRange * * @param from - * Lower bound of the time range (Unix timestamp). + * When the rule should start to be active, in Unix epoch time. * @param until - * Upper bound of the time range (Unix timestamp). + * When the rule should stop to be active, in Unix epoch time. */ case class TimeRange( from: Int, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoTolerance.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoTolerance.scala index a448d0a02e..328c8838f7 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoTolerance.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoTolerance.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,9 +38,11 @@ import algoliasearch.search.TypoToleranceEnum._ import org.json4s._ -/** Controls whether [typo +/** Whether [typo * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled - * and how it is applied. + * and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and + * concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + * is also active. */ sealed trait TypoTolerance diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoToleranceEnum.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoToleranceEnum.scala index 6fdbe3b4d6..4b29c5685c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoToleranceEnum.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/TypoToleranceEnum.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,10 @@ import org.json4s._ sealed trait TypoToleranceEnum extends TypoToleranceTrait -/** TypoToleranceEnum enumeration +/** - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only + * include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - + * `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is + * applied first in the `ranking` setting. */ object TypoToleranceEnum { case object Min extends TypoToleranceEnum { diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdateApiKeyResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdateApiKeyResponse.scala index abd3dda08c..b7e9930cc0 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdateApiKeyResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdateApiKeyResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtResponse.scala index 29a2e67709..7e97530a67 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +38,8 @@ package algoliasearch.search * * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. * @param updatedAt * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. */ diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtWithObjectIdResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtWithObjectIdResponse.scala index 2b3546286e..991ac75dd9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtWithObjectIdResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedAtWithObjectIdResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -15,11 +38,12 @@ package algoliasearch.search * * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. * @param updatedAt * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. * @param objectID - * Unique object identifier. + * Unique record identifier. */ case class UpdatedAtWithObjectIdResponse( taskID: Option[Long] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedRuleResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedRuleResponse.scala index 25550c3f49..344dcb8587 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedRuleResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UpdatedRuleResponse.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,12 +37,13 @@ package algoliasearch.search /** UpdatedRuleResponse * * @param objectID - * Unique object identifier. + * Unique identifier of a rule object. * @param updatedAt * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. * @param taskID * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - * immediately. You can check the task's progress with the `task` operation and this `taskID`. + * immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + * this `taskID`. */ case class UpdatedRuleResponse( objectID: String, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHighlightResult.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHighlightResult.scala index 8face32ac8..6d676c0456 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHighlightResult.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHighlightResult.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHit.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHit.scala index 8b7cf9faa2..ff72b395f6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHit.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserHit.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,7 +37,7 @@ package algoliasearch.search /** UserHit * * @param userID - * userID of the user. + * User ID. * @param clusterName * Cluster name. * @param nbRecords diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserId.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserId.scala index 4efde96458..a936a4915b 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserId.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/UserId.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -14,7 +37,7 @@ package algoliasearch.search /** Unique user ID. * * @param userID - * userID of the user. + * User ID. * @param clusterName * Cluster to which the user is assigned. * @param nbRecords diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Value.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Value.scala index d56deded30..6ae6ae7dcb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Value.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Value.scala @@ -1,8 +1,31 @@ -/** Search API Use the Search REST API to manage your data (indices and records), implement search, and improve - * relevance (with Rules, synonyms, and language dictionaries). Although Algolia provides a REST API, you should use - * the official open source API [clients, libraries, and - * tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) instead. There's no - * [SLA](https://www.algolia.com/policies/sla/) if you use the REST API directly. +/** Search API The Algolia Search API lets you search, configure, and mange your indices and records. # Client libraries + * Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API + * clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's + * ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) # Base URLs The + * base URLs for making requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - + * `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search + * Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both + * URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** # + * Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of + * your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - + * `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different + * DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. + * All Algolia API clients implement this retry strategy. # Authentication To authenticate your API requests, add these + * headers:
x-algolia-application-id
Your Algolia application ID.
+ *
x-algolia-api-key
An API key with the necessary permissions to make the request. The + * required access control list (ACL) to make a request is listed in each endpoint's reference.
You can + * find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). # Request + * format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, # Parameters + * Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT + * requests. Query parameters must be + * [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be + * UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A + * comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: + * `attributesToRetrieve=%5B%22title%22,%22description%22%D` # Response status and errors The Search API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. # Version The current + * version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL. * * The version of the OpenAPI document: 1.0.0 * @@ -16,7 +39,8 @@ import algoliasearch.search.SortRemainingBy._ /** Value * * @param order - * Pinned order of facet lists. + * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the + * top of the list. */ case class Value( order: Option[Seq[String]] = scala.None, diff --git a/clients/algoliasearch-client-swift/Sources/Abtesting/AbtestingClient.swift b/clients/algoliasearch-client-swift/Sources/Abtesting/AbtestingClient.swift index 567b4053e6..169660a467 100644 --- a/clients/algoliasearch-client-swift/Sources/Abtesting/AbtestingClient.swift +++ b/clients/algoliasearch-client-swift/Sources/Abtesting/AbtestingClient.swift @@ -425,9 +425,8 @@ open class AbtestingClient { ) } - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) /// - parameter indexPrefix: (query) Only return A/B tests for indices starting with this prefix. (optional) /// - parameter indexSuffix: (query) Only return A/B tests for indices ending with this suffix. (optional) /// - returns: ListABTestsResponse @@ -458,10 +457,9 @@ open class AbtestingClient { // Required API Key ACLs: // - analytics // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // // - parameter indexPrefix: (query) Only return A/B tests for indices starting with this prefix. (optional) // diff --git a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/ABTestResponse.swift b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/ABTestResponse.swift index c70375136e..27b367c4a2 100644 --- a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/ABTestResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/ABTestResponse.swift @@ -10,8 +10,9 @@ public struct ABTestResponse: Codable, JSONEncodable, Hashable { public var index: String /// Unique A/B test ID. public var abTestID: Int - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 public init(index: String, abTestID: Int, taskID: Int64) { diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/AnalyticsClient.swift b/clients/algoliasearch-client-swift/Sources/Analytics/AnalyticsClient.swift index a3a25fc1d0..d37a0e25f4 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/AnalyticsClient.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/AnalyticsClient.swift @@ -288,11 +288,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -327,13 +325,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -374,11 +370,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -413,13 +407,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -460,11 +452,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -498,13 +488,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -545,11 +533,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -583,13 +569,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -630,11 +614,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -668,13 +650,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -715,11 +695,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -752,13 +730,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -799,11 +775,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -836,13 +810,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -883,14 +855,11 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -927,18 +896,15 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -983,14 +949,11 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1027,18 +990,15 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -1083,7 +1043,7 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. + /// - parameter index: (query) Index name. /// - returns: GetStatusResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func getStatus(index: String, requestOptions: RequestOptions? = nil) async throws -> GetStatusResponse { @@ -1105,7 +1065,7 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - returns: RequestBuilder open func getStatusWithHTTPInfo( @@ -1134,14 +1094,11 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1178,18 +1135,15 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -1234,15 +1188,12 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. + /// - parameter index: (query) Index name. /// - parameter search: (query) User query. (optional) - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1283,20 +1234,17 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // // - parameter search: (query) User query. (optional) // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -1344,15 +1292,12 @@ open class AnalyticsClient { } /// - parameter attribute: (path) Attribute name. - /// - parameter index: (query) Index name to target. + /// - parameter index: (query) Index name. /// - parameter search: (query) User query. (optional) - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1395,20 +1340,17 @@ open class AnalyticsClient { // // - parameter attribute: (path) Attribute name. // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // // - parameter search: (query) User query. (optional) // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -1469,15 +1411,12 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. + /// - parameter index: (query) Index name. /// - parameter search: (query) User query. (optional) - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1517,20 +1456,17 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // // - parameter search: (query) User query. (optional) // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -1577,18 +1513,15 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. + /// - parameter index: (query) Index name. /// - parameter search: (query) User query. (optional) /// - parameter clickAnalytics: (query) Whether to include [click and /// conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, /// default to false) - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1629,7 +1562,7 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // // - parameter search: (query) User query. (optional) // @@ -1637,16 +1570,13 @@ open class AnalyticsClient { // conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, // default to false) // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -1695,19 +1625,16 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. + /// - parameter index: (query) Index name. /// - parameter clickAnalytics: (query) Whether to include [click and /// conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, /// default to false) - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter orderBy: (query) Reorder the results. (optional) /// - parameter direction: (query) Sorting direction of the results: ascending or descending. (optional) - /// - parameter limit: (query) Number of records to return (page size). (optional, default to 10) - /// - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - /// default to 0) + /// - parameter limit: (query) Number of items to return. (optional, default to 10) + /// - parameter offset: (query) Position of the first item to return. (optional, default to 0) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1750,26 +1677,23 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // // - parameter clickAnalytics: (query) Whether to include [click and // conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (optional, // default to false) // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter orderBy: (query) Reorder the results. (optional) // // - parameter direction: (query) Sorting direction of the results: ascending or descending. (optional) // - // - parameter limit: (query) Number of records to return (page size). (optional, default to 10) + // - parameter limit: (query) Number of items to return. (optional, default to 10) // - // - parameter offset: (query) Position of the starting record. Used for paging. 0 is the first record. (optional, - // default to 0) + // - parameter offset: (query) Position of the first item to return. (optional, default to 0) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at @@ -1820,11 +1744,9 @@ open class AnalyticsClient { ) } - /// - parameter index: (query) Index name to target. - /// - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - /// analyze. (optional) - /// - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - /// (optional) + /// - parameter index: (query) Index name. + /// - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) + /// - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) /// - parameter tags: (query) Filter analytics on the /// [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at /// search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like @@ -1857,13 +1779,11 @@ open class AnalyticsClient { // Required API Key ACLs: // - analytics // - // - parameter index: (query) Index name to target. + // - parameter index: (query) Index name. // - // - parameter startDate: (query) Start date (a string in the format `YYYY-MM-DD`) of the period to - // analyze. (optional) + // - parameter startDate: (query) Start date (`YYYY-MM-DD`) of the period to analyze. (optional) // - // - parameter endDate: (query) End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - // (optional) + // - parameter endDate: (query) End date (`YYYY-MM-DD`) of the period to analyze. (optional) // // - parameter tags: (query) Filter analytics on the // [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/Models/SearchNoResultEvent.swift b/clients/algoliasearch-client-swift/Sources/Analytics/Models/SearchNoResultEvent.swift index cbc4d340fa..c2f893eb60 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/Models/SearchNoResultEvent.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/Models/SearchNoResultEvent.swift @@ -10,7 +10,7 @@ public struct SearchNoResultEvent: Codable, JSONEncodable, Hashable { public var search: String /// Number of occurrences. public var count: Int - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int public init(search: String, count: Int, nbHits: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearch.swift b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearch.swift index 0f6af3a03e..e66fdfa7ce 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearch.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearch.swift @@ -10,7 +10,7 @@ public struct TopSearch: Codable, JSONEncodable, Hashable { public var search: String /// Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). public var count: Int - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int public init(search: String, count: Int, nbHits: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift index 810faa7d65..24d981f3a0 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift @@ -32,7 +32,7 @@ public struct TopSearchWithAnalytics: Codable, JSONEncodable, Hashable { public var clickCount: Int /// Number of converted clicks. public var conversionCount: Int - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int public init( diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Anchoring.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Anchoring.swift index bb7e5abfd3..d46f768e40 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Anchoring.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Anchoring.swift @@ -5,8 +5,10 @@ import AnyCodable import Core import Foundation -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the -/// query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the +/// begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The +/// pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty +/// queries are only allowed as pattern with `anchoring: is`. public enum Anchoring: String, Codable, CaseIterable { case `is` case startsWith diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecision.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecision.swift index f682df6308..9c258f57f9 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecision.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecision.swift @@ -5,8 +5,8 @@ import AnyCodable import Core import Foundation -/// Precision of a geographical search (in meters), to [group results that are more or less the same distance from a -/// central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +/// Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion +/// considers all matches within the same range of distances to be equal. public enum AroundPrecision: Codable, JSONEncodable, AbstractEncodable, Hashable { case int(Int) case arrayOfAroundPrecisionFromValueInner([AroundPrecisionFromValueInner]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecisionFromValueInner.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecisionFromValueInner.swift index 876cb99ffe..88f915729a 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecisionFromValueInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundPrecisionFromValueInner.swift @@ -5,8 +5,13 @@ import AnyCodable import Core import Foundation +/// Range object with lower and upper values in meters to define custom ranges. public struct AroundPrecisionFromValueInner: Codable, JSONEncodable, Hashable { + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be + /// equal. public var from: Int? + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be + /// equal. public var value: Int? public init(from: Int? = nil, value: Int? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadius.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadius.swift index 42b66a1265..0b309b75ba 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadius.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadius.swift @@ -5,9 +5,10 @@ import AnyCodable import Core import Foundation -/// [Maximum -/// radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) -/// for a geographical search (in meters). +/// Maximum radius for a search around a central location. This parameter works in combination with the +/// `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined +/// automatically from the density of hits around the central location. The search radius is small if there are many +/// hits close to the central coordinates. public enum AroundRadius: Codable, JSONEncodable, AbstractEncodable, Hashable { case aroundRadiusAll(AroundRadiusAll) case int(Int) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadiusAll.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadiusAll.swift index d042de1646..7d6260ed8a 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadiusAll.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AroundRadiusAll.swift @@ -5,6 +5,7 @@ import AnyCodable import Core import Foundation +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. public enum AroundRadiusAll: String, Codable, CaseIterable { case all } diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilter.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilter.swift index 685b912cef..c21f67fe70 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilter.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilter.swift @@ -5,13 +5,16 @@ import AnyCodable import Core import Foundation -/// Automatic facet Filter. +/// Filter or optional filter to be applied to the search. public struct AutomaticFacetFilter: Codable, JSONEncodable, Hashable { - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, + /// with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. public var facet: String - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. public var score: Int? - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences + /// are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` + /// operation. public var disjunctive: Bool? public init(facet: String, score: Int? = nil, disjunctive: Bool? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilters.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilters.swift index c01f2925f7..5f8f70dca5 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/AutomaticFacetFilters.swift @@ -5,8 +5,9 @@ import AnyCodable import Core import Foundation -/// Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value -/// placeholder in the query pattern. +/// Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For +/// example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you +/// can filter the results to show the top-ranked comedy movies. public enum AutomaticFacetFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case arrayOfAutomaticFacetFilter([AutomaticFacetFilter]) case arrayOfString([String]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendRequest.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendRequest.swift index c4b24404c6..a83db1a4b9 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendRequest.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendRequest.swift @@ -13,7 +13,7 @@ public struct BaseRecommendRequest: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Algolia index name. + /// Index name. public var indexName: String /// Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each /// recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendationsQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendationsQuery.swift index 8d629bd029..9e8fbe0a78 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendationsQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendationsQuery.swift @@ -7,7 +7,7 @@ import Foundation public struct BaseRecommendationsQuery: Codable, JSONEncodable, Hashable { public var model: RecommendationModels - /// Unique object identifier. + /// Unique record identifier. public var objectID: String public var queryParameters: SearchParamsObject? public var fallbackParameters: SearchParamsObject? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendedForYouQueryParameters.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendedForYouQueryParameters.swift index f10e2e7e0a..d31c9c6bc7 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendedForYouQueryParameters.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendedForYouQueryParameters.swift @@ -6,8 +6,8 @@ import Core import Foundation public struct BaseRecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable { - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String public init(userToken: String) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParams.swift index a2fc8d3207..a89c4f703a 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParams.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct BaseSearchParams: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,90 +27,108 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? public init( @@ -133,7 +158,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, @@ -167,7 +191,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics @@ -203,7 +226,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics @@ -242,7 +264,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParamsWithoutQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParamsWithoutQuery.swift index 99d8d2f33e..8df877066c 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParamsWithoutQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchParamsWithoutQuery.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,88 +27,106 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Overrides the query parameter and performs a more generic search. + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? public init( @@ -130,7 +155,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, @@ -163,7 +187,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics @@ -198,7 +221,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics @@ -236,7 +258,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchResponse.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchResponse.swift index 3e091750a3..5013027ec0 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseSearchResponse.swift @@ -25,13 +25,20 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) /// A/B test ID. This is only included in the response for indices that are part of an A/B test. public var abTestID: Int? /// Variant ID. This is only included in the response for indices that are part of an A/B test. public var abTestVariantID: Int? /// Computed geographical location. public var aroundLatLng: String? - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. public var automaticRadius: String? public var exhaustive: Exhaustive? /// See the `facetsCount` field of the `exhaustive` object in the response. @@ -43,7 +50,7 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { /// See the `typo` field of the `exhaustive` object in the response. @available(*, deprecated, message: "This property is deprecated.") public var exhaustiveTypo: Bool? - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. public var facets: [String: [String: Int]]? /// Statistics for numerical facets. public var facetsStats: [String: FacetsStats]? @@ -55,13 +62,13 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { public var indexUsed: String? /// Warnings about the query. public var message: String? - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int - /// Number of pages of results for the current query. + /// Number of pages of results. public var nbPages: Int /// Number of hits selected and sorted by the relevant sort algorithm. public var nbSortedHits: Int? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int /// 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. @@ -79,7 +86,7 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { public var serverTimeMS: Int? /// Host name of the server that processed the request. public var serverUsed: String? - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. public var userData: AnyCodable? /// Unique identifier for the query. This is used for [click /// analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Condition.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Condition.swift index 918b0e89b1..d0a88e3838 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Condition.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Condition.swift @@ -6,24 +6,36 @@ import Core import Foundation public struct Condition: Codable, JSONEncodable, Hashable { - /// Query pattern syntax. + static let contextRule = StringRule(minLength: nil, maxLength: nil, pattern: "[A-Za-z0-9_-]+") + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern + /// `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal + /// string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when + /// users search for a genre, such as \"comedy\". public var pattern: String? public var anchoring: Anchoring? - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. public var alternatives: Bool? - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` + /// parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching + /// `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. public var context: String? + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is + /// triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the + /// `pattern` parameter. + public var filters: String? public init( pattern: String? = nil, anchoring: Anchoring? = nil, alternatives: Bool? = nil, - context: String? = nil + context: String? = nil, + filters: String? = nil ) { self.pattern = pattern self.anchoring = anchoring self.alternatives = alternatives self.context = context + self.filters = filters } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -31,6 +43,7 @@ public struct Condition: Codable, JSONEncodable, Hashable { case anchoring case alternatives case context + case filters } // Encodable protocol methods @@ -41,5 +54,6 @@ public struct Condition: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.anchoring, forKey: .anchoring) try container.encodeIfPresent(self.alternatives, forKey: .alternatives) try container.encodeIfPresent(self.context, forKey: .context) + try container.encodeIfPresent(self.filters, forKey: .filters) } } diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Consequence.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Consequence.swift index 315a982707..999c94ed4b 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Consequence.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Consequence.swift @@ -5,19 +5,21 @@ import AnyCodable import Core import Foundation -/// [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +/// Effect of the rule. For more information, see +/// [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). public struct Consequence: Codable, JSONEncodable, Hashable { public var params: ConsequenceParams? - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either + /// individually, or as groups of up to 100 records each. public var promote: [Promote]? - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to - /// match the filters of the current search. When `false`, the promoted results will show up regardless of the - /// filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user + /// actions (filtering the search) are given a higher precendence. For example, if you promote a record with the + /// `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. public var filterPromotes: Bool? - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. public var hide: [ConsequenceHide]? - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by - /// the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't + /// interpreted by the API and is limited to 1 kB of minified JSON. public var userData: AnyCodable? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceHide.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceHide.swift index 3f1976b033..96f9cec0ef 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceHide.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceHide.swift @@ -5,9 +5,9 @@ import AnyCodable import Core import Foundation -/// Unique identifier of the record to hide. +/// Object ID of the record to hide. public struct ConsequenceHide: Codable, JSONEncodable, Hashable { - /// Unique object identifier. + /// Unique record identifier. public var objectID: String public init(objectID: String) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceParams.swift index 8d07a4786e..e030b0b76b 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceParams.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct ConsequenceParams: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,186 +55,269 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Overrides the query parameter and performs a more generic search. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? public var query: ConsequenceQuery? @@ -253,14 +350,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -334,14 +429,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -417,14 +510,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -503,14 +594,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQuery.swift index 95f8562fd7..58b7b20d53 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQuery.swift @@ -5,8 +5,8 @@ import AnyCodable import Core import Foundation -/// When providing a string, it replaces the entire query string. When providing an object, it describes incremental -/// edits to be made to the query string (but you can't do both). +/// Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced +/// with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. public enum ConsequenceQuery: Codable, JSONEncodable, AbstractEncodable, Hashable { case consequenceQueryObject(ConsequenceQueryObject) case string(String) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQueryObject.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQueryObject.swift index a2b0795644..38045d10b3 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQueryObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ConsequenceQueryObject.swift @@ -6,9 +6,9 @@ import Core import Foundation public struct ConsequenceQueryObject: Codable, JSONEncodable, Hashable { - /// Words to remove. + /// Words to remove from the search query. public var remove: [String]? - /// Edits to apply. + /// Changes to make to the search query. public var edits: [Edit]? public init(remove: [String]? = nil, edits: [Edit]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/DeletedAtResponse.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/DeletedAtResponse.swift index f25b161a49..5d711f2a81 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/DeletedAtResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/DeletedAtResponse.swift @@ -7,8 +7,9 @@ import Foundation /// Response, taskID, and deletion timestamp. public struct DeletedAtResponse: Codable, JSONEncodable, Hashable { - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 /// Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var deletedAt: String diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Distinct.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Distinct.swift index c2883ac7c9..cbf0434d55 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Distinct.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Distinct.swift @@ -5,7 +5,10 @@ import AnyCodable import Core import Foundation -/// Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +/// Determines how many records of a group are included in the search results. Records with the same value for the +/// `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how +/// many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). +/// The `distinct` setting is ignored if `attributeForDistinct` is not set. public enum Distinct: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case int(Int) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Edit.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Edit.swift index 8cb8e4a1c6..397052f070 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Edit.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Edit.swift @@ -9,7 +9,7 @@ public struct Edit: Codable, JSONEncodable, Hashable { public var type: EditType? /// Text or patterns to remove from the query string. public var delete: String? - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. public var insert: String? public init(type: EditType? = nil, delete: String? = nil, insert: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ExactOnSingleWordQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ExactOnSingleWordQuery.swift index a58a5ab3cb..fcc698debe 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ExactOnSingleWordQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ExactOnSingleWordQuery.swift @@ -6,7 +6,15 @@ import Core import Foundation /// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) -/// is computed when the query contains only one word. +/// is computed when the search query has only one word. <dl> +/// <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query +/// word and attribute value are the same. For example, a search for \"road\" will match the value +/// \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> +/// <dd> The Exact ranking criterion is ignored on single-word searches. </dd> +/// <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is +/// found in the attribute value. The query word must have at least 3 characters and must not be a stop word. +/// </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be +/// highlighted, partial and prefix matches won't. public enum ExactOnSingleWordQuery: String, Codable, CaseIterable { case attribute case `none` diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetFilters.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetFilters.swift index ea08e869c0..01e476bddd 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetFilters.swift @@ -5,7 +5,12 @@ import AnyCodable import Core import Foundation -/// [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +/// Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using +/// the `filters` parameter, which supports all filter types and combinations with boolean operators.** - +/// `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], +/// filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is +/// interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a +/// `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. public enum FacetFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetOrdering.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetOrdering.swift index 617e479af2..ddea53d13e 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetOrdering.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FacetOrdering.swift @@ -5,10 +5,10 @@ import AnyCodable import Core import Foundation -/// Defines the ordering of facets (widgets). +/// Order of facet names and facet values in your UI. public struct FacetOrdering: Codable, JSONEncodable, Hashable { public var facets: Facets? - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. public var values: [String: Value]? public init(facets: Facets? = nil, values: [String: Value]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Facets.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Facets.swift index 70c6aad1f5..9a07db00c7 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Facets.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Facets.swift @@ -5,9 +5,10 @@ import AnyCodable import Core import Foundation -/// Ordering of facets (widgets). +/// Order of facet names. public struct Facets: Codable, JSONEncodable, Hashable { - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at + /// the top of the list. public var order: [String]? public init(order: [String]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/HighlightResultOption.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/HighlightResultOption.swift index a351fdcd37..6f959bec69 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/HighlightResultOption.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/HighlightResultOption.swift @@ -5,12 +5,12 @@ import AnyCodable import Core import Foundation -/// Show highlighted section and words matched on a query. +/// Surround words that match the query with HTML tags for highlighting. public struct HighlightResultOption: Codable, JSONEncodable, Hashable { - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. public var value: String public var matchLevel: MatchLevel - /// List of words from the query that matched the object. + /// List of matched words from the search query. public var matchedWords: [String] /// Whether the entire attribute value is highlighted. public var fullyHighlighted: Bool? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/IgnorePlurals.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/IgnorePlurals.swift index 541856aa4c..97e842a3b4 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/IgnorePlurals.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/IgnorePlurals.swift @@ -5,14 +5,8 @@ import AnyCodable import Core import Foundation -/// Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in -/// conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals -/// should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: -/// enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = -/// \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) -/// (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so -/// that singulars and plurals aren't considered to be the same (\"foot\" will not find -/// \"feet\"). +/// Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the +/// languages used in your index. public enum IgnorePlurals: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case arrayOfString([String]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/IndexSettingsAsSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/IndexSettingsAsSearchParams.swift index 3ff14cc2af..651dc9ec96 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/IndexSettingsAsSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/IndexSettingsAsSearchParams.swift @@ -27,108 +27,179 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? public init( - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -174,7 +245,6 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { enableReRanking: Bool? = nil, reRankingApplyFilter: ReRankingApplyFilter? = nil ) { - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -222,7 +292,6 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { } public enum CodingKeys: String, CodingKey, CaseIterable { - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -273,7 +342,6 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/MatchLevel.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/MatchLevel.swift index 52f2416acb..7b1c3fd2ba 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/MatchLevel.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/MatchLevel.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. public enum MatchLevel: String, Codable, CaseIterable { case `none` case partial diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Mode.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Mode.swift index da14b65111..7b5a30f0f7 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Mode.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Mode.swift @@ -5,7 +5,8 @@ import AnyCodable import Core import Foundation -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia +/// enabled NeuralSearch for you. public enum Mode: String, Codable, CaseIterable { case neuralSearch case keywordSearch diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/NumericFilters.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/NumericFilters.swift index 6c7e368151..287190ad67 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/NumericFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/NumericFilters.swift @@ -5,7 +5,12 @@ import AnyCodable import Core import Foundation -/// [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +/// Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and +/// combinations with boolean operators.** You can use numeric comparison operators: `<`, +/// `<=`, `=`, `!=`, `>`, `>=`. +/// Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO +/// <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for +/// `facetFilters`. public enum NumericFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/OptionalFilters.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/OptionalFilters.swift index 45ebabf0d2..3c02fabf5c 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/OptionalFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/OptionalFilters.swift @@ -5,9 +5,11 @@ import AnyCodable import Core import Foundation -/// Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower -/// for negative optional filters. In contrast to regular filters, records that don't match the optional filter are -/// still included in the results, only their ranking is affected. +/// Filters to promote or demote records in the search results. Optional filters work like facet filters, but they +/// don't exclude records from the search results. Records that match the optional filter rank before records that +/// don't match. If you're using a negative filter `facet:-value`, matching records rank after records +/// that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ +/// sort-by attributes. - Optional filters don't work with numeric attributes. public enum OptionalFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Params.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Params.swift index 1c5db75dd1..6d25007bfa 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Params.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Params.swift @@ -5,7 +5,8 @@ import AnyCodable import Core import Foundation -/// Additional search parameters. +/// Parameters to apply to this search. You can use all search parameters, plus special +/// `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. public struct Params: Codable, JSONEncodable, Hashable { public var query: ConsequenceQuery? public var automaticFacetFilters: AutomaticFacetFilters? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectID.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectID.swift index b9503620d0..b6c75eaaa8 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectID.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectID.swift @@ -7,10 +7,9 @@ import Foundation /// Record to promote. public struct PromoteObjectID: Codable, JSONEncodable, Hashable { - /// Unique identifier of the record to promote. + /// Unique record identifier. public var objectID: String - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a - /// group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. public var position: Int public init(objectID: String, position: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectIDs.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectIDs.swift index a40d3ca7ec..8ee4febab5 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectIDs.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/PromoteObjectIDs.swift @@ -7,10 +7,10 @@ import Foundation /// Records to promote. public struct PromoteObjectIDs: Codable, JSONEncodable, Hashable { - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For + /// example, if you want to promote four records to position `0`, they will be the first four search results. public var objectIDs: [String] - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a - /// group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. public var position: Int public init(objectIDs: [String], position: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/QueryType.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/QueryType.swift index f429e39c74..75e915dbdb 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/QueryType.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/QueryType.swift @@ -5,7 +5,10 @@ import AnyCodable import Core import Foundation -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as +/// prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, +/// which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. +/// For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). public enum QueryType: String, Codable, CaseIterable { case prefixLast case prefixAll diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RankingInfo.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RankingInfo.swift index 53a2ebc617..a5eea03ca6 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RankingInfo.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RankingInfo.swift @@ -5,10 +5,67 @@ import AnyCodable import Core import Foundation +/// Object with detailed information about the record's ranking. public struct RankingInfo: Codable, JSONEncodable, Hashable { - /// This field is reserved for advanced usage. + static let filtersRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let firstMatchedWordRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let geoDistanceRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let geoPrecisionRule = NumericRule( + minimum: 1, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let nbExactWordsRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let nbTyposRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let proximityDistanceRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let wordsRule = NumericRule( + minimum: 1, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Whether a filter matched the query. public var filters: Int - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. public var firstMatchedWord: Int /// Distance between the geo location in the search query and the best matching geo location in the record, divided /// by the geo precision (in meters). @@ -21,15 +78,15 @@ public struct RankingInfo: Codable, JSONEncodable, Hashable { public var nbExactWords: Int /// Number of typos encountered when matching the record. public var nbTypos: Int - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. public var promoted: Bool - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. public var proximityDistance: Int? - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. public var userScore: Int - /// Number of matched words, including prefixes and typos. + /// Number of matched words. public var words: Int - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. public var promotedByReRanking: Bool? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ReRankingApplyFilter.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ReRankingApplyFilter.swift index 1ae7b3762b..ce14641b15 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ReRankingApplyFilter.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ReRankingApplyFilter.swift @@ -5,8 +5,8 @@ import AnyCodable import Core import Foundation -/// When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that -/// match these filters will be affected by Dynamic Re-Ranking. +/// Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these +/// filters. public enum ReRankingApplyFilter: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendHit.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendHit.swift index 6ffdc6a4c6..5fe1670dab 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendHit.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendHit.swift @@ -14,11 +14,11 @@ public struct RecommendHit: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Unique object identifier. + /// Unique record identifier. public var objectID: String - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. public var highlightResult: [String: HighlightResult]? - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. public var snippetResult: [String: SnippetResult]? public var rankingInfo: RankingInfo? public var distinctSeqID: Int? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsHits.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsHits.swift index 147b7606e0..436f2f8d3c 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsHits.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsHits.swift @@ -7,7 +7,7 @@ import Foundation public struct RecommendationsHits: Codable, JSONEncodable, Hashable { public var hits: [RecommendationsHit] - /// Text to search for in an index. + /// Search query. public var query: String? /// URL-encoded string of all search parameters. public var params: String? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsQuery.swift index 79fc43e493..02d2680f95 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsQuery.swift @@ -13,7 +13,7 @@ public struct RecommendationsQuery: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Algolia index name. + /// Index name. public var indexName: String /// Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each /// recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the @@ -22,7 +22,7 @@ public struct RecommendationsQuery: Codable, JSONEncodable, Hashable { /// Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. public var maxRecommendations: Int? public var model: RecommendationModels - /// Unique object identifier. + /// Unique record identifier. public var objectID: String public var queryParameters: SearchParamsObject? public var fallbackParameters: SearchParamsObject? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsResults.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsResults.swift index 7bf64fa9b0..5c03076e58 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsResults.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendationsResults.swift @@ -25,13 +25,20 @@ public struct RecommendationsResults: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) /// A/B test ID. This is only included in the response for indices that are part of an A/B test. public var abTestID: Int? /// Variant ID. This is only included in the response for indices that are part of an A/B test. public var abTestVariantID: Int? /// Computed geographical location. public var aroundLatLng: String? - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. public var automaticRadius: String? public var exhaustive: Exhaustive? /// See the `facetsCount` field of the `exhaustive` object in the response. @@ -43,7 +50,7 @@ public struct RecommendationsResults: Codable, JSONEncodable, Hashable { /// See the `typo` field of the `exhaustive` object in the response. @available(*, deprecated, message: "This property is deprecated.") public var exhaustiveTypo: Bool? - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. public var facets: [String: [String: Int]]? /// Statistics for numerical facets. public var facetsStats: [String: FacetsStats]? @@ -55,13 +62,13 @@ public struct RecommendationsResults: Codable, JSONEncodable, Hashable { public var indexUsed: String? /// Warnings about the query. public var message: String? - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int - /// Number of pages of results for the current query. + /// Number of pages of results. public var nbPages: Int /// Number of hits selected and sorted by the relevant sort algorithm. public var nbSortedHits: Int? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int /// 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. @@ -79,13 +86,13 @@ public struct RecommendationsResults: Codable, JSONEncodable, Hashable { public var serverTimeMS: Int? /// Host name of the server that processed the request. public var serverUsed: String? - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. public var userData: AnyCodable? /// Unique identifier for the query. This is used for [click /// analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). public var queryID: String? public var hits: [RecommendationsHit] - /// Text to search for in an index. + /// Search query. public var query: String? /// URL-encoded string of all search parameters. public var params: String? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQuery.swift index 9454ff6ff3..069f67c0a4 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQuery.swift @@ -13,7 +13,7 @@ public struct RecommendedForYouQuery: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Algolia index name. + /// Index name. public var indexName: String /// Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each /// recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQueryParameters.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQueryParameters.swift index 1a5c89cff1..f00d4e127a 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQueryParameters.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendedForYouQueryParameters.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct RecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct RecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,188 +55,271 @@ public struct RecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? @@ -253,14 +350,12 @@ public struct RecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable personalizationImpact: Int? = nil, userToken: String, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -332,14 +427,12 @@ public struct RecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -413,14 +506,12 @@ public struct RecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -497,14 +588,12 @@ public struct RecommendedForYouQueryParameters: Codable, JSONEncodable, Hashable try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encode(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveStopWords.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveStopWords.swift index c462107dd9..d3aa055ea4 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveStopWords.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveStopWords.swift @@ -5,13 +5,9 @@ import AnyCodable import Core import Foundation -/// Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction -/// with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This -/// list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words -/// feature, ensuring that stop words are removed from consideration in a search. The languages supported here are -/// either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) -/// (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, -/// allowing stop words to be taken into account in a search. +/// Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or +/// pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or +/// \"and\" are stop words. You should only use this feature for the languages used in your index. public enum RemoveStopWords: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case arrayOfString([String]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveWordsIfNoResults.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveWordsIfNoResults.swift index 475e9ffbed..5142b14d0d 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveWordsIfNoResults.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RemoveWordsIfNoResults.swift @@ -5,8 +5,14 @@ import AnyCodable import Core import Foundation -/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) -/// from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning +/// empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed +/// when a query doesn't return results.</dd> <dt><code>lastWords</code></dt> +/// <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at +/// most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat +/// the first (then second, then third) word as optional, until there are results or at most 5 words have been +/// removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as +/// optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). public enum RemoveWordsIfNoResults: String, Codable, CaseIterable { case `none` case lastWords diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RenderingContent.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RenderingContent.swift index 82b0e3b1fa..b1b448340a 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RenderingContent.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RenderingContent.swift @@ -5,9 +5,8 @@ import AnyCodable import Core import Foundation -/// Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). -/// You can set a default value and dynamically override it with -/// [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +/// Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the +/// order of facet names and values without changing your frontend code. public struct RenderingContent: Codable, JSONEncodable, Hashable { public var facetOrdering: FacetOrdering? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsObject.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsObject.swift index 914b19eb24..b3e43a537d 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsObject.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct SearchParamsObject: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,188 +55,271 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? @@ -253,14 +350,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -332,14 +427,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -413,14 +506,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -497,14 +588,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsQuery.swift index 45798ca952..cb5d2e5641 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchParamsQuery.swift @@ -6,7 +6,7 @@ import Core import Foundation public struct SearchParamsQuery: Codable, JSONEncodable, Hashable { - /// Text to search for in an index. + /// Search query. public var query: String? public init(query: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesParams.swift index eafeddd0d4..5d8ee83c8b 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesParams.swift @@ -21,11 +21,11 @@ public struct SearchRecommendRulesParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Full-text query. + /// Search query. public var query: String? /// Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). public var context: String? - /// Requested page (the first page is page 0). + /// Requested page of the API response. public var page: Int? /// Maximum number of hits per page. public var hitsPerPage: Int? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesResponse.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesResponse.swift index 88eed7c2ea..b62f335b18 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SearchRecommendRulesResponse.swift @@ -6,13 +6,20 @@ import Core import Foundation public struct SearchRecommendRulesResponse: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) /// Fetched rules. public var hits: [RuleResponse] - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int - /// Number of pages of results for the current query. + /// Number of pages of results. public var nbPages: Int public init(hits: [RuleResponse], nbHits: Int, page: Int, nbPages: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SemanticSearch.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SemanticSearch.swift index 65cc7d7ac8..a17535074b 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SemanticSearch.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SemanticSearch.swift @@ -5,10 +5,10 @@ import AnyCodable import Core import Foundation -/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. public struct SemanticSearch: Codable, JSONEncodable, Hashable { - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be - /// used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are + /// used. public var eventSources: [String]? public init(eventSources: [String]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SnippetResultOption.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SnippetResultOption.swift index a11216615d..86d4278378 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SnippetResultOption.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SnippetResultOption.swift @@ -5,9 +5,9 @@ import AnyCodable import Core import Foundation -/// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +/// Snippets that show the context around a matching search query. public struct SnippetResultOption: Codable, JSONEncodable, Hashable { - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. public var value: String public var matchLevel: MatchLevel diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SortRemainingBy.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SortRemainingBy.swift index 5427273145..76657f1a08 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/SortRemainingBy.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/SortRemainingBy.swift @@ -5,8 +5,12 @@ import AnyCodable import Core import Foundation -/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: -/// alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting. <dl> +/// <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The +/// count is the number of matching records containing this facet value. </dd> +/// <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> +/// <dt><code>hidden</code></dt> <dd>Don't show facet values that aren't +/// explicitly positioned.</dd> </dl>. public enum SortRemainingBy: String, Codable, CaseIterable { case count case alpha diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TagFilters.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TagFilters.swift index 3b3c56727c..b4a02e0732 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TagFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TagFilters.swift @@ -5,7 +5,10 @@ import AnyCodable import Core import Foundation -/// [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +/// Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` +/// parameter, which supports all filter types and combinations with boolean operators.** Different from regular +/// facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet +/// count. The same combination and escaping rules apply as for `facetFilters`. public enum TagFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TaskStatus.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TaskStatus.swift index c8c79ae77e..0011cf8b58 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TaskStatus.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TaskStatus.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. public enum TaskStatus: String, Codable, CaseIterable { case published case notPublished diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingFacetsQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingFacetsQuery.swift index 4af7e6265b..0bca62ec85 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingFacetsQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingFacetsQuery.swift @@ -13,7 +13,7 @@ public struct TrendingFacetsQuery: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Algolia index name. + /// Index name. public var indexName: String /// Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each /// recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingItemsQuery.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingItemsQuery.swift index a5741f5f58..f6df6b78e3 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingItemsQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TrendingItemsQuery.swift @@ -13,7 +13,7 @@ public struct TrendingItemsQuery: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Algolia index name. + /// Index name. public var indexName: String /// Recommendations with a confidence score lower than `threshold` won't appear in results. > **Note**: Each /// recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoTolerance.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoTolerance.swift index 51e860b9e0..12e48dc6cb 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoTolerance.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoTolerance.swift @@ -5,9 +5,10 @@ import AnyCodable import Core import Foundation -/// Controls whether [typo +/// Whether [typo /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled -/// and how it is applied. +/// and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) +/// is also active. public enum TypoTolerance: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case typoToleranceEnum(TypoToleranceEnum) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoToleranceEnum.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoToleranceEnum.swift index 1c93d3b74c..dbb88423ca 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoToleranceEnum.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/TypoToleranceEnum.swift @@ -5,6 +5,10 @@ import AnyCodable import Core import Foundation +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, +/// only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 +/// typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the +/// Typo ranking criterion is applied first in the `ranking` setting. public enum TypoToleranceEnum: String, Codable, CaseIterable { case min case strict diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Value.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Value.swift index 7531335d75..37997a3745 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/Value.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/Value.swift @@ -6,7 +6,8 @@ import Core import Foundation public struct Value: Codable, JSONEncodable, Hashable { - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at + /// the top of the list. public var order: [String]? public var sortRemainingBy: SortRemainingBy? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/RecommendClient.swift b/clients/algoliasearch-client-swift/Sources/Recommend/RecommendClient.swift index ed9ce2218e..8eccdf8d16 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/RecommendClient.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/RecommendClient.swift @@ -288,10 +288,10 @@ open class RecommendClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter model: (path) [Recommend /// models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// - parameter objectID: (path) Unique record (object) identifier. + /// - parameter objectID: (path) Unique record identifier. /// - returns: DeletedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func deleteRecommendRule( @@ -318,12 +318,12 @@ open class RecommendClient { // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter model: (path) [Recommend // models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). // - // - parameter objectID: (path) Unique record (object) identifier. + // - parameter objectID: (path) Unique record identifier. // - returns: RequestBuilder open func deleteRecommendRuleWithHTTPInfo( @@ -382,10 +382,10 @@ open class RecommendClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter model: (path) [Recommend /// models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - /// - parameter objectID: (path) Unique record (object) identifier. + /// - parameter objectID: (path) Unique record identifier. /// - returns: RuleResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func getRecommendRule( @@ -412,12 +412,12 @@ open class RecommendClient { // Required API Key ACLs: // - settings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter model: (path) [Recommend // models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). // - // - parameter objectID: (path) Unique record (object) identifier. + // - parameter objectID: (path) Unique record identifier. // - returns: RequestBuilder open func getRecommendRuleWithHTTPInfo( @@ -476,7 +476,7 @@ open class RecommendClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter model: (path) [Recommend /// models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// - parameter taskID: (path) Unique identifier of a task. Numeric value (up to 64bits). @@ -507,7 +507,7 @@ open class RecommendClient { // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter model: (path) [Recommend // models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). @@ -621,7 +621,7 @@ open class RecommendClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter model: (path) [Recommend /// models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). /// - parameter searchRecommendRulesParams: (body) (optional) @@ -651,7 +651,7 @@ open class RecommendClient { // Required API Key ACLs: // - settings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter model: (path) [Recommend // models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Acl.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Acl.swift index af4f4ac60c..579c11ec27 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Acl.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Acl.swift @@ -5,14 +5,7 @@ import AnyCodable import Core import Foundation -/// API key permissions: `addObject`: required to add or update records, copy or move an index. -/// `analytics`: required to access the Analytics API. `browse`: required to view records -/// `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. -/// `editSettings`: required to change index settings. `inference`: required to access the Inference -/// API. `listIndexes`: required to list indices. `logs`: required to access logs of search and -/// indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. -/// `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) -/// for all operations that return records. `settings`: required to examine index settings. +/// Access control list permissions. public enum Acl: String, Codable, CaseIterable { case addObject case analytics diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Action.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Action.swift index 5f2d931573..7c6deacbb8 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Action.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Action.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// Type of batch operation. +/// Type of indexing operation. public enum Action: String, Codable, CaseIterable { case addObject case updateObject diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/AddApiKeyResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/AddApiKeyResponse.swift index e142c42e96..d7e10b0236 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/AddApiKeyResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/AddApiKeyResponse.swift @@ -8,7 +8,7 @@ import Foundation public struct AddApiKeyResponse: Codable, JSONEncodable, Hashable { /// API key. public var key: String - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var createdAt: String public init(key: String, createdAt: String) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Anchoring.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Anchoring.swift index bb7e5abfd3..d46f768e40 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Anchoring.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Anchoring.swift @@ -5,8 +5,10 @@ import AnyCodable import Core import Foundation -/// Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the -/// query string, is an exact match (`is`), or a partial match (`contains`). +/// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the +/// begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The +/// pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty +/// queries are only allowed as pattern with `anchoring: is`. public enum Anchoring: String, Codable, CaseIterable { case `is` case startsWith diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/ApiKey.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/ApiKey.swift index c24cc44fd2..c8484dfde6 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/ApiKey.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/ApiKey.swift @@ -7,42 +7,36 @@ import Foundation /// API key object. public struct ApiKey: Codable, JSONEncodable, Hashable { - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the - /// key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each + /// endpoint's reference. For more information, see [access control + /// list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). public var acl: [Acl] - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. public var description: String? - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. - /// Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For - /// example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - /// - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same + /// application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices + /// starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices + /// containing \"_products_\". public var indexes: [String]? - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use - /// this parameter to protect you from third-party attempts to retrieve your entire content by massively querying - /// the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. public var maxHitsPerQuery: Int? - /// Maximum number of API calls per hour allowed from a given IP address or [user - /// token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is - /// performed with this key, a check is performed. If there were more than the specified number of calls within the - /// last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this - /// parameter to protect you from third-party attempts to retrieve your entire content by massively querying the - /// index. + /// Maximum number of API requests allowed per IP address or [user + /// token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is + /// reached, the API returns an error with status code `429`. By default, there's no limit. public var maxQueriesPerIPPerHour: Int? - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each - /// query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP + /// addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of + /// IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted + /// range. public var queryParameters: String? - /// Restrict this API key to specific - /// [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - /// If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with - /// \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` - /// allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and + /// trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with + /// \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` + /// allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely + /// on them to secure your data. For more information, see [HTTP referrer + /// restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). public var referers: [String]? - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The - /// default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For - /// example, in mobile apps, you can't [control when users update your - /// app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - /// So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from - /// your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. public var validity: Int? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecision.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecision.swift index f682df6308..9c258f57f9 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecision.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecision.swift @@ -5,8 +5,8 @@ import AnyCodable import Core import Foundation -/// Precision of a geographical search (in meters), to [group results that are more or less the same distance from a -/// central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). +/// Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion +/// considers all matches within the same range of distances to be equal. public enum AroundPrecision: Codable, JSONEncodable, AbstractEncodable, Hashable { case int(Int) case arrayOfAroundPrecisionFromValueInner([AroundPrecisionFromValueInner]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecisionFromValueInner.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecisionFromValueInner.swift index 876cb99ffe..88f915729a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecisionFromValueInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundPrecisionFromValueInner.swift @@ -5,8 +5,13 @@ import AnyCodable import Core import Foundation +/// Range object with lower and upper values in meters to define custom ranges. public struct AroundPrecisionFromValueInner: Codable, JSONEncodable, Hashable { + /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be + /// equal. public var from: Int? + /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be + /// equal. public var value: Int? public init(from: Int? = nil, value: Int? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadius.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadius.swift index 42b66a1265..0b309b75ba 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadius.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadius.swift @@ -5,9 +5,10 @@ import AnyCodable import Core import Foundation -/// [Maximum -/// radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) -/// for a geographical search (in meters). +/// Maximum radius for a search around a central location. This parameter works in combination with the +/// `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined +/// automatically from the density of hits around the central location. The search radius is small if there are many +/// hits close to the central coordinates. public enum AroundRadius: Codable, JSONEncodable, AbstractEncodable, Hashable { case aroundRadiusAll(AroundRadiusAll) case int(Int) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadiusAll.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadiusAll.swift index d042de1646..7d6260ed8a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadiusAll.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/AroundRadiusAll.swift @@ -5,6 +5,7 @@ import AnyCodable import Core import Foundation +/// Return all records with a valid `_geoloc` attribute. Don't filter by distance. public enum AroundRadiusAll: String, Codable, CaseIterable { case all } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilter.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilter.swift index 685b912cef..c21f67fe70 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilter.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilter.swift @@ -5,13 +5,16 @@ import AnyCodable import Core import Foundation -/// Automatic facet Filter. +/// Filter or optional filter to be applied to the search. public struct AutomaticFacetFilter: Codable, JSONEncodable, Hashable { - /// Attribute to filter on. This must match a facet placeholder in the Rule's pattern. + /// Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, + /// with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`. public var facet: String - /// Score for the filter. Typically used for optional or disjunctive filters. + /// Filter scores to give different weights to individual filters. public var score: Int? - /// Whether the filter is disjunctive (true) or conjunctive (false). + /// Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences + /// are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` + /// operation. public var disjunctive: Bool? public init(facet: String, score: Int? = nil, disjunctive: Bool? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilters.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilters.swift index c01f2925f7..5f8f70dca5 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/AutomaticFacetFilters.swift @@ -5,8 +5,9 @@ import AnyCodable import Core import Foundation -/// Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value -/// placeholder in the query pattern. +/// Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For +/// example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you +/// can filter the results to show the top-ranked comedy movies. public enum AutomaticFacetFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case arrayOfAutomaticFacetFilter([AutomaticFacetFilter]) case arrayOfString([String]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseIndexSettings.swift index a2254cb22d..456f0bcd1f 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseIndexSettings.swift @@ -6,50 +6,109 @@ import Core import Foundation public struct BaseIndexSettings: Codable, JSONEncodable, Hashable { - /// Creates - /// [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which - /// are copies of a primary index with the same records but different settings. + static let paginationLimitedToRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 20000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search + /// results. By default, no attribute is used for faceting. **Modifiers**
+ ///
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue + /// the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet + /// values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ + /// deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable + /// facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a + /// regular facet. + public var attributesForFaceting: [String]? + /// Creates [replica + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you + /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index + /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must + /// provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns + /// into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
+ ///
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the + /// number of records and are optimized for [Relevant + /// sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + ///
Without modifier, a standard replica is created, which duplicates your record count and is used for + /// strict, or [exhaustive + /// sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). public var replicas: [String]? - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow + /// down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be + /// guaranteed. public var paginationLimitedTo: Int? - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for + /// ranking or to [restrict + /// access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't + /// want to include it in the search results. public var unretrievableAttributes: [String]? /// Words for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This + /// also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + /// for the specified words. public var disableTypoToleranceOnWords: [String]? - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - /// applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + /// Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must + /// set the indexing language to Japanese. public var attributesToTransliterate: [String]? - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. public var camelCaseAttributes: [String]? - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - /// (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) + /// (decompounding). Compound words are formed by combining two or more individual words, and are particularly + /// prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are + /// indexed separately. You can specify different lists for different languages. Decompounding is supported for + /// these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian + /// (`no`). public var decompoundedAttributes: AnyCodable? - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - /// and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific + /// processing steps, such as word detection and dictionary settings. **You should always specify an indexing + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var indexLanguages: [String]? - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). public var disablePrefixOnAttributes: [String]? - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the /// compressed arrays may be reordered. public var allowCompressionOfIntegerArray: Bool? /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number + /// of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that + /// doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
+ ///
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` + /// and `!=`.
Without modifier, all numeric comparisons are supported. public var numericAttributesForFiltering: [String]? - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - /// Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency + /// characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia + /// treats separator characters as separate words. For example, a search for `C#` would report two matches. public var separatorsToIndex: String? - /// [Attributes used for - /// searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including - /// determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + /// ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the + /// selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are + /// higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include + /// them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are + /// always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + /// **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within + /// the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches + /// at the end. public var searchableAttributes: [String]? - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. public var userData: AnyCodable? - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). public var customNormalization: [String: [String: String]]? - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this + /// attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to + /// control how many items per group are included in the search results. If you want to use the same attribute also + /// for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting + /// _after_ deduplication, which will result in accurate facet counts. public var attributeForDistinct: String? public init( + attributesForFaceting: [String]? = nil, replicas: [String]? = nil, paginationLimitedTo: Int? = nil, unretrievableAttributes: [String]? = nil, @@ -67,6 +126,7 @@ public struct BaseIndexSettings: Codable, JSONEncodable, Hashable { customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil ) { + self.attributesForFaceting = attributesForFaceting self.replicas = replicas self.paginationLimitedTo = paginationLimitedTo self.unretrievableAttributes = unretrievableAttributes @@ -86,6 +146,7 @@ public struct BaseIndexSettings: Codable, JSONEncodable, Hashable { } public enum CodingKeys: String, CodingKey, CaseIterable { + case attributesForFaceting case replicas case paginationLimitedTo case unretrievableAttributes @@ -108,6 +169,7 @@ public struct BaseIndexSettings: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.replicas, forKey: .replicas) try container.encodeIfPresent(self.paginationLimitedTo, forKey: .paginationLimitedTo) try container.encodeIfPresent(self.unretrievableAttributes, forKey: .unretrievableAttributes) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParams.swift index a2fc8d3207..a89c4f703a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParams.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct BaseSearchParams: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,90 +27,108 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? public init( @@ -133,7 +158,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, @@ -167,7 +191,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics @@ -203,7 +226,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics @@ -242,7 +264,6 @@ public struct BaseSearchParams: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParamsWithoutQuery.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParamsWithoutQuery.swift index 99d8d2f33e..8df877066c 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParamsWithoutQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchParamsWithoutQuery.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,88 +27,106 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Overrides the query parameter and performs a more generic search. + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? public init( @@ -130,7 +155,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, @@ -163,7 +187,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics @@ -198,7 +221,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics @@ -236,7 +258,6 @@ public struct BaseSearchParamsWithoutQuery: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchResponse.swift index 3e091750a3..5013027ec0 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BaseSearchResponse.swift @@ -25,13 +25,20 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) /// A/B test ID. This is only included in the response for indices that are part of an A/B test. public var abTestID: Int? /// Variant ID. This is only included in the response for indices that are part of an A/B test. public var abTestVariantID: Int? /// Computed geographical location. public var aroundLatLng: String? - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. public var automaticRadius: String? public var exhaustive: Exhaustive? /// See the `facetsCount` field of the `exhaustive` object in the response. @@ -43,7 +50,7 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { /// See the `typo` field of the `exhaustive` object in the response. @available(*, deprecated, message: "This property is deprecated.") public var exhaustiveTypo: Bool? - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. public var facets: [String: [String: Int]]? /// Statistics for numerical facets. public var facetsStats: [String: FacetsStats]? @@ -55,13 +62,13 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { public var indexUsed: String? /// Warnings about the query. public var message: String? - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int - /// Number of pages of results for the current query. + /// Number of pages of results. public var nbPages: Int /// Number of hits selected and sorted by the relevant sort algorithm. public var nbSortedHits: Int? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int /// 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. @@ -79,7 +86,7 @@ public struct BaseSearchResponse: Codable, JSONEncodable, Hashable { public var serverTimeMS: Int? /// Host name of the server that processed the request. public var serverUsed: String? - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. public var userData: AnyCodable? /// Unique identifier for the query. This is used for [click /// analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BatchDictionaryEntriesParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BatchDictionaryEntriesParams.swift index cc1be4ee0e..e273b5f100 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BatchDictionaryEntriesParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BatchDictionaryEntriesParams.swift @@ -5,11 +5,11 @@ import AnyCodable import Core import Foundation -/// `batchDictionaryEntries` parameters. +/// Request body for updating dictionary entries. public struct BatchDictionaryEntriesParams: Codable, JSONEncodable, Hashable { - /// Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. + /// Whether to replace all custom entries in the dictionary with the ones sent with this request. public var clearExistingDictionaryEntries: Bool? - /// Operations to batch. + /// List of additions and deletions to your dictionaries. public var requests: [BatchDictionaryEntriesRequest] public init(clearExistingDictionaryEntries: Bool? = nil, requests: [BatchDictionaryEntriesRequest]) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BatchResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BatchResponse.swift index dd1aab1930..2ae4d73ea4 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BatchResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BatchResponse.swift @@ -6,10 +6,11 @@ import Core import Foundation public struct BatchResponse: Codable, JSONEncodable, Hashable { - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 - /// Unique object (record) identifiers. + /// Unique record identifiers. public var objectIDs: [String] public init(taskID: Int64, objectIDs: [String]) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift index cdd84156a1..2fec6ad47e 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct BrowseParamsObject: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct BrowseParamsObject: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,193 +55,275 @@ public struct BrowseParamsObject: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass - /// this value to the subsequent browse call to get the next page of results. When the end of the index has been - /// reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a + /// previous request. The last page of the response does not return a `cursor` attribute. public var cursor: String? public init( @@ -257,14 +353,12 @@ public struct BrowseParamsObject: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -337,14 +431,12 @@ public struct BrowseParamsObject: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -419,14 +511,12 @@ public struct BrowseParamsObject: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -504,14 +594,12 @@ public struct BrowseParamsObject: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseResponse.swift index 83271b251b..36bd8bd975 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseResponse.swift @@ -25,13 +25,20 @@ public struct BrowseResponse: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) /// A/B test ID. This is only included in the response for indices that are part of an A/B test. public var abTestID: Int? /// Variant ID. This is only included in the response for indices that are part of an A/B test. public var abTestVariantID: Int? /// Computed geographical location. public var aroundLatLng: String? - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. public var automaticRadius: String? public var exhaustive: Exhaustive? /// See the `facetsCount` field of the `exhaustive` object in the response. @@ -43,7 +50,7 @@ public struct BrowseResponse: Codable, JSONEncodable, Hashable { /// See the `typo` field of the `exhaustive` object in the response. @available(*, deprecated, message: "This property is deprecated.") public var exhaustiveTypo: Bool? - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. public var facets: [String: [String: Int]]? /// Statistics for numerical facets. public var facetsStats: [String: FacetsStats]? @@ -55,13 +62,13 @@ public struct BrowseResponse: Codable, JSONEncodable, Hashable { public var indexUsed: String? /// Warnings about the query. public var message: String? - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int - /// Number of pages of results for the current query. + /// Number of pages of results. public var nbPages: Int /// Number of hits selected and sorted by the relevant sort algorithm. public var nbSortedHits: Int? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int /// 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. @@ -79,19 +86,20 @@ public struct BrowseResponse: Codable, JSONEncodable, Hashable { public var serverTimeMS: Int? /// Host name of the server that processed the request. public var serverUsed: String? - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. public var userData: AnyCodable? /// Unique identifier for the query. This is used for [click /// analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). public var queryID: String? + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with + /// additional attributes, such as, for highlighting. public var hits: [Hit] - /// Text to search for in an index. + /// Search query. public var query: String /// URL-encoded string of all search parameters. public var params: String - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass - /// this value to the subsequent browse call to get the next page of results. When the end of the index has been - /// reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a + /// previous request. The last page of the response does not return a `cursor` attribute. public var cursor: String? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperation.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperation.swift index d537a0f81b..3e47349d0f 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperation.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperation.swift @@ -5,10 +5,10 @@ import AnyCodable import Core import Foundation -/// To update an attribute without pushing the entire record, you can use these built-in operations. +/// Update to perform on the attribute. public struct BuiltInOperation: Codable, JSONEncodable, Hashable { public var operation: BuiltInOperationType - /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` + /// Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` /// value. public var value: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperationType.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperationType.swift index 0397fc15c2..0a4d9fa0e1 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperationType.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BuiltInOperationType.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// Operation to apply to the attribute. +/// How to change the attribute. public enum BuiltInOperationType: String, Codable, CaseIterable { case increment = "Increment" case decrement = "Decrement" diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Condition.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Condition.swift index 918b0e89b1..d0a88e3838 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Condition.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Condition.swift @@ -6,24 +6,36 @@ import Core import Foundation public struct Condition: Codable, JSONEncodable, Hashable { - /// Query pattern syntax. + static let contextRule = StringRule(minLength: nil, maxLength: nil, pattern: "[A-Za-z0-9_-]+") + /// Query pattern that triggers the rule. You can use either a literal string, or a special pattern + /// `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal + /// string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when + /// users search for a genre, such as \"comedy\". public var pattern: String? public var anchoring: Anchoring? - /// Whether the pattern matches on plurals, synonyms, and typos. + /// Whether the pattern should match plurals, synonyms, and typos. public var alternatives: Bool? - /// Rule context format: [A-Za-z0-9_-]+). + /// An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` + /// parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching + /// `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. public var context: String? + /// Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is + /// triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the + /// `pattern` parameter. + public var filters: String? public init( pattern: String? = nil, anchoring: Anchoring? = nil, alternatives: Bool? = nil, - context: String? = nil + context: String? = nil, + filters: String? = nil ) { self.pattern = pattern self.anchoring = anchoring self.alternatives = alternatives self.context = context + self.filters = filters } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -31,6 +43,7 @@ public struct Condition: Codable, JSONEncodable, Hashable { case anchoring case alternatives case context + case filters } // Encodable protocol methods @@ -41,5 +54,6 @@ public struct Condition: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.anchoring, forKey: .anchoring) try container.encodeIfPresent(self.alternatives, forKey: .alternatives) try container.encodeIfPresent(self.context, forKey: .context) + try container.encodeIfPresent(self.filters, forKey: .filters) } } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Consequence.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Consequence.swift index 315a982707..999c94ed4b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Consequence.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Consequence.swift @@ -5,19 +5,21 @@ import AnyCodable import Core import Foundation -/// [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule. +/// Effect of the rule. For more information, see +/// [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). public struct Consequence: Codable, JSONEncodable, Hashable { public var params: ConsequenceParams? - /// Records to promote. + /// Records you want to pin to a specific position in the search results. You can promote up to 300 records, either + /// individually, or as groups of up to 100 records each. public var promote: [Promote]? - /// Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to - /// match the filters of the current search. When `false`, the promoted results will show up regardless of the - /// filters. + /// Whether promoted records must match an active filter for the consequence to be applied. This ensures that user + /// actions (filtering the search) are given a higher precendence. For example, if you promote a record with the + /// `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown. public var filterPromotes: Bool? - /// Records to hide. By default, you can hide up to 50 records per rule. + /// Records you want to hide from the search results. public var hide: [ConsequenceHide]? - /// Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by - /// the API. It's limited to 1kB of minified JSON. + /// A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't + /// interpreted by the API and is limited to 1 kB of minified JSON. public var userData: AnyCodable? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceHide.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceHide.swift index 3f1976b033..96f9cec0ef 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceHide.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceHide.swift @@ -5,9 +5,9 @@ import AnyCodable import Core import Foundation -/// Unique identifier of the record to hide. +/// Object ID of the record to hide. public struct ConsequenceHide: Codable, JSONEncodable, Hashable { - /// Unique object identifier. + /// Unique record identifier. public var objectID: String public init(objectID: String) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceParams.swift index 8d07a4786e..e030b0b76b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceParams.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct ConsequenceParams: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,186 +55,269 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Overrides the query parameter and performs a more generic search. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? public var query: ConsequenceQuery? @@ -253,14 +350,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -334,14 +429,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -417,14 +510,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -503,14 +594,12 @@ public struct ConsequenceParams: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQuery.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQuery.swift index 95f8562fd7..58b7b20d53 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQuery.swift @@ -5,8 +5,8 @@ import AnyCodable import Core import Foundation -/// When providing a string, it replaces the entire query string. When providing an object, it describes incremental -/// edits to be made to the query string (but you can't do both). +/// Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced +/// with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query. public enum ConsequenceQuery: Codable, JSONEncodable, AbstractEncodable, Hashable { case consequenceQueryObject(ConsequenceQueryObject) case string(String) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQueryObject.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQueryObject.swift index a2b0795644..38045d10b3 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQueryObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/ConsequenceQueryObject.swift @@ -6,9 +6,9 @@ import Core import Foundation public struct ConsequenceQueryObject: Codable, JSONEncodable, Hashable { - /// Words to remove. + /// Words to remove from the search query. public var remove: [String]? - /// Edits to apply. + /// Changes to make to the search query. public var edits: [Edit]? public init(remove: [String]? = nil, edits: [Edit]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/CreatedAtResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/CreatedAtResponse.swift index a5b2d1379b..706dad7b7b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/CreatedAtResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/CreatedAtResponse.swift @@ -7,7 +7,7 @@ import Foundation /// Response and creation timestamp. public struct CreatedAtResponse: Codable, JSONEncodable, Hashable { - /// Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. + /// Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var createdAt: String public init(createdAt: String) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Cursor.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Cursor.swift index da5c281aaa..590358b76d 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Cursor.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Cursor.swift @@ -6,9 +6,8 @@ import Core import Foundation public struct Cursor: Codable, JSONEncodable, Hashable { - /// Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass - /// this value to the subsequent browse call to get the next page of results. When the end of the index has been - /// reached, `cursor` is absent from the response. + /// Cursor to get the next page of the response. The parameter must match the value returned in the response of a + /// previous request. The last page of the response does not return a `cursor` attribute. public var cursor: String? public init(cursor: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift index 9a01f49b90..b04aedd0dd 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift @@ -7,20 +7,36 @@ import Foundation public struct DeleteByParams: Codable, JSONEncodable, Hashable { public var facetFilters: FacetFilters? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? public var aroundRadius: AroundRadius? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/DeletedAtResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/DeletedAtResponse.swift index f25b161a49..5d711f2a81 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/DeletedAtResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/DeletedAtResponse.swift @@ -7,8 +7,9 @@ import Foundation /// Response, taskID, and deletion timestamp. public struct DeletedAtResponse: Codable, JSONEncodable, Hashable { - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 /// Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var deletedAt: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntry.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntry.swift index a1c338232f..3c708fa0e4 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntry.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntry.swift @@ -7,23 +7,15 @@ import Foundation /// Dictionary entry. public struct DictionaryEntry: Codable, JSONEncodable, Hashable { - /// Unique identifier for a dictionary object. + /// Unique identifier for the dictionary entry. public var objectID: String - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). public var language: String - /// Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The stop word you want - /// to add or update. If the entry already exists in Algolia's standard dictionary, you can override its behavior by - /// adding it to the custom dictionary and setting its `state` to `disabled`. **`compoundEntry`** When - /// `decomposition` is empty: adds `word` as a compound atom. For example, atom “kino” decomposes the query - /// “kopfkino” into \"kopf\" and \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For - /// example, when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes into “hund” - /// and “hutte”, discarding the linking \"e\". + /// Matching dictionary word for `stopwords` and `compounds` dictionaries. public var word: String? - /// Compound dictionary [word declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). - /// If the entry already exists in Algolia's standard dictionary, you can override its behavior by adding it to the - /// custom dictionary and setting its `state` to `disabled`. + /// Matching words in the `plurals` dictionary including declensions. public var words: [String]? - /// For compound entries, governs the behavior of the `word` parameter. + /// Invividual components of a compound word in the `compounds` dictionary. public var decomposition: [String]? public var state: DictionaryEntryState? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntryState.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntryState.swift index 3842d68f8f..795ddb2a62 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntryState.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryEntryState.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). +/// Whether a dictionary entry is active. public enum DictionaryEntryState: String, Codable, CaseIterable { case enabled case disabled diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryLanguage.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryLanguage.swift index e1571d4c24..1ca2e61498 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryLanguage.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionaryLanguage.swift @@ -5,10 +5,9 @@ import AnyCodable import Core import Foundation -/// Custom entries for a dictionary. +/// Dictionary type. If `null`, this dictionary type isn't supported for the language. public struct DictionaryLanguage: Codable, JSONEncodable, Hashable { - /// If `0`, the dictionary hasn't been customized and only contains standard entries provided by Algolia. If `null`, - /// that feature isn't available or isn't supported for that language. + /// Number of custom dictionary entries. public var nbCustomEntries: Int? public init(nbCustomEntries: Int? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionarySettingsParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionarySettingsParams.swift index c92d2a0207..be0b141bd1 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/DictionarySettingsParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/DictionarySettingsParams.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// Enable or turn off the built-in Algolia stop words for a specific language. +/// Turn on or off the built-in Algolia stop words for a specific language. public struct DictionarySettingsParams: Codable, JSONEncodable, Hashable { public var disableStandardEntries: StandardEntries diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Distinct.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Distinct.swift index c2883ac7c9..cbf0434d55 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Distinct.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Distinct.swift @@ -5,7 +5,10 @@ import AnyCodable import Core import Foundation -/// Enables [deduplication or grouping of results (Algolia's _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). +/// Determines how many records of a group are included in the search results. Records with the same value for the +/// `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how +/// many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). +/// The `distinct` setting is ignored if `attributeForDistinct` is not set. public enum Distinct: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case int(Int) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Edit.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Edit.swift index 8cb8e4a1c6..397052f070 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Edit.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Edit.swift @@ -9,7 +9,7 @@ public struct Edit: Codable, JSONEncodable, Hashable { public var type: EditType? /// Text or patterns to remove from the query string. public var delete: String? - /// Text that should be inserted in place of the removed text inside the query string. + /// Text to be added in place of the deleted text inside the query string. public var insert: String? public init(type: EditType? = nil, delete: String? = nil, insert: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/ExactOnSingleWordQuery.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/ExactOnSingleWordQuery.swift index a58a5ab3cb..fcc698debe 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/ExactOnSingleWordQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/ExactOnSingleWordQuery.swift @@ -6,7 +6,15 @@ import Core import Foundation /// Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) -/// is computed when the query contains only one word. +/// is computed when the search query has only one word. <dl> +/// <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query +/// word and attribute value are the same. For example, a search for \"road\" will match the value +/// \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> +/// <dd> The Exact ranking criterion is ignored on single-word searches. </dd> +/// <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is +/// found in the attribute value. The query word must have at least 3 characters and must not be a stop word. +/// </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be +/// highlighted, partial and prefix matches won't. public enum ExactOnSingleWordQuery: String, Codable, CaseIterable { case attribute case `none` diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/FacetFilters.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/FacetFilters.swift index ea08e869c0..01e476bddd 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/FacetFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/FacetFilters.swift @@ -5,7 +5,12 @@ import AnyCodable import Core import Foundation -/// [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). +/// Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using +/// the `filters` parameter, which supports all filter types and combinations with boolean operators.** - +/// `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], +/// filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is +/// interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a +/// `-`, you can still filter them by escaping with a backslash: `facet:\\-value`. public enum FacetFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/FacetHits.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/FacetHits.swift index c37e13702b..2b9b51e47c 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/FacetHits.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/FacetHits.swift @@ -8,10 +8,9 @@ import Foundation public struct FacetHits: Codable, JSONEncodable, Hashable { /// Facet value. public var value: String - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. public var highlighted: String - /// Number of records containing this facet value. This takes into account the extra search parameters specified in - /// the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). public var count: Int public init(value: String, highlighted: String, count: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/FacetOrdering.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/FacetOrdering.swift index 617e479af2..ddea53d13e 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/FacetOrdering.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/FacetOrdering.swift @@ -5,10 +5,10 @@ import AnyCodable import Core import Foundation -/// Defines the ordering of facets (widgets). +/// Order of facet names and facet values in your UI. public struct FacetOrdering: Codable, JSONEncodable, Hashable { public var facets: Facets? - /// Ordering of facet values within an individual facet. + /// Order of facet values. One object for each facet. public var values: [String: Value]? public init(facets: Facets? = nil, values: [String: Value]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Facets.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Facets.swift index 70c6aad1f5..9a07db00c7 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Facets.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Facets.swift @@ -5,9 +5,10 @@ import AnyCodable import Core import Foundation -/// Ordering of facets (widgets). +/// Order of facet names. public struct Facets: Codable, JSONEncodable, Hashable { - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at + /// the top of the list. public var order: [String]? public init(order: [String]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/GetApiKeyResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/GetApiKeyResponse.swift index 23f81fa9c2..92c76d49ec 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/GetApiKeyResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/GetApiKeyResponse.swift @@ -10,42 +10,36 @@ public struct GetApiKeyResponse: Codable, JSONEncodable, Hashable { public var value: String? /// Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). public var createdAt: Int64 - /// [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the - /// key. + /// Permissions that determine the type of API requests this key can make. The required ACL is listed in each + /// endpoint's reference. For more information, see [access control + /// list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). public var acl: [Acl] - /// Description of an API key for you and your team members. + /// Description of an API key to help you identify this API key. public var description: String? - /// Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. - /// Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For - /// example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - /// - `*_products_*` matches all indices containing \"_products_\". + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same + /// application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices + /// starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices + /// containing \"_products_\". public var indexes: [String]? - /// Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use - /// this parameter to protect you from third-party attempts to retrieve your entire content by massively querying - /// the index. + /// Maximum number of results this API key can retrieve in one query. By default, there's no limit. public var maxHitsPerQuery: Int? - /// Maximum number of API calls per hour allowed from a given IP address or [user - /// token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is - /// performed with this key, a check is performed. If there were more than the specified number of calls within the - /// last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this - /// parameter to protect you from third-party attempts to retrieve your entire content by massively querying the - /// index. + /// Maximum number of API requests allowed per IP address or [user + /// token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is + /// reached, the API returns an error with status code `429`. By default, there's no limit. public var maxQueriesPerIPPerHour: Int? - /// Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each - /// query made with this API key. It's a URL-encoded query string. + /// Query parameters to add when making API requests with this API key. To restrict this API key to specific IP + /// addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of + /// IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted + /// range. public var queryParameters: String? - /// Restrict this API key to specific - /// [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - /// If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with - /// \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` - /// allows everything in the domain \"algolia.com\". + /// Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and + /// trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with + /// \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` + /// allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely + /// on them to secure your data. For more information, see [HTTP referrer + /// restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). public var referers: [String]? - /// Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The - /// default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For - /// example, in mobile apps, you can't [control when users update your - /// app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - /// So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from - /// your mobile app's backend. + /// Duration (in seconds) after which the API key expires. By default, API keys don't expire. public var validity: Int? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsRequest.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsRequest.swift index 4ebc4a26f5..b5a31fb74c 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsRequest.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsRequest.swift @@ -5,13 +5,13 @@ import AnyCodable import Core import Foundation -/// Record retrieval operation. +/// Request body for retrieving records. public struct GetObjectsRequest: Codable, JSONEncodable, Hashable { /// Attributes to retrieve. If not specified, all retrievable attributes are returned. public var attributesToRetrieve: [String]? - /// Record's objectID. + /// Object ID for the record to retrieve. public var objectID: String - /// Name of the index containing the required records. + /// Index from which to retrieve the records. public var indexName: String public init(attributesToRetrieve: [String]? = nil, objectID: String, indexName: String) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsResponse.swift index 86e1d41d9c..3c11cddc86 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/GetObjectsResponse.swift @@ -6,7 +6,7 @@ import Core import Foundation public struct GetObjectsResponse: Codable, JSONEncodable, Hashable { - /// Retrieved results. + /// Retrieved records. public var results: [AnyCodable] public init(results: [AnyCodable]) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/HasPendingMappingsResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/HasPendingMappingsResponse.swift index 1585969987..fe4ae18036 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/HasPendingMappingsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/HasPendingMappingsResponse.swift @@ -6,7 +6,7 @@ import Core import Foundation public struct HasPendingMappingsResponse: Codable, JSONEncodable, Hashable { - /// Indicates whether there are clusters undergoing migration, creation, or deletion. + /// Whether there are clusters undergoing migration, creation, or deletion. public var pending: Bool /// Cluster pending mapping state: migrating, creating, deleting. public var clusters: [String: [String]]? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/HighlightResultOption.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/HighlightResultOption.swift index a351fdcd37..6f959bec69 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/HighlightResultOption.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/HighlightResultOption.swift @@ -5,12 +5,12 @@ import AnyCodable import Core import Foundation -/// Show highlighted section and words matched on a query. +/// Surround words that match the query with HTML tags for highlighting. public struct HighlightResultOption: Codable, JSONEncodable, Hashable { - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. public var value: String public var matchLevel: MatchLevel - /// List of words from the query that matched the object. + /// List of matched words from the search query. public var matchedWords: [String] /// Whether the entire attribute value is highlighted. public var fullyHighlighted: Bool? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Hit.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Hit.swift index b7eff8e37d..75e8a92ea0 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Hit.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Hit.swift @@ -5,13 +5,14 @@ import AnyCodable import Core import Foundation -/// A single hit. +/// Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, +/// and ranking. public struct Hit: Codable, JSONEncodable, Hashable { - /// Unique object identifier. + /// Unique record identifier. public var objectID: String - /// Show highlighted section and words matched on a query. + /// Surround words that match the query with HTML tags for highlighting. public var highlightResult: [String: HighlightResult]? - /// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. + /// Snippets that show the context around a matching search query. public var snippetResult: [String: SnippetResult]? public var rankingInfo: RankingInfo? public var distinctSeqID: Int? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/IgnorePlurals.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/IgnorePlurals.swift index 541856aa4c..97e842a3b4 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/IgnorePlurals.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/IgnorePlurals.swift @@ -5,14 +5,8 @@ import AnyCodable import Core import Foundation -/// Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is used in -/// conjunction with the `queryLanguages` setting. _list_: language ISO codes for which ignoring plurals -/// should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: -/// enables the ignore plurals feature, where singulars and plurals are considered equivalent (\"foot\" = -/// \"feet\"). The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) -/// (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals feature, so -/// that singulars and plurals aren't considered to be the same (\"foot\" will not find -/// \"feet\"). +/// Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the +/// languages used in your index. public enum IgnorePlurals: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case arrayOfString([String]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift index 9d6ec04dbb..7273faca99 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift @@ -5,8 +5,15 @@ import AnyCodable import Core import Foundation -/// Algolia index settings. +/// Index settings. public struct IndexSettings: Codable, JSONEncodable, Hashable { + static let paginationLimitedToRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 20000, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -28,149 +35,273 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Creates - /// [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which - /// are copies of a primary index with the same records but different settings. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search + /// results. By default, no attribute is used for faceting. **Modifiers**
+ ///
filterOnly(\"ATTRIBUTE\")
Allows using this attribute as a filter, but doesn't evalue + /// the facet values.
searchable(\"ATTRIBUTE\")
Allows searching for facet + /// values.
afterDistinct(\"ATTRIBUTE\")
Evaluates the facet count _after_ + /// deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable + /// facets: `afterDistinct(searchable(ATTRIBUTE))`.
Without modifiers, the attribute is used as a + /// regular facet. + public var attributesForFaceting: [String]? + /// Creates [replica + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you + /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index + /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must + /// provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns + /// into a regular, standalone index that will no longer by synced with the primary index. **Modifier**
+ ///
virtual(\"REPLICA\")
Create a virtual replica, Virtual replicas don't increase the + /// number of records and are optimized for [Relevant + /// sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + ///
Without modifier, a standard replica is created, which duplicates your record count and is used for + /// strict, or [exhaustive + /// sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). public var replicas: [String]? - /// Maximum number of hits accessible through pagination. + /// Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow + /// down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be + /// guaranteed. public var paginationLimitedTo: Int? - /// Attributes that can't be retrieved at query time. + /// Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for + /// ranking or to [restrict + /// access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't + /// want to include it in the search results. public var unretrievableAttributes: [String]? /// Words for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This + /// also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + /// for the specified words. public var disableTypoToleranceOnWords: [String]? - /// Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - /// applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. + /// Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + /// Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must + /// set the indexing language to Japanese. public var attributesToTransliterate: [String]? - /// Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. + /// Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. public var camelCaseAttributes: [String]? - /// Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - /// (decompounding) applies. + /// Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) + /// (decompounding). Compound words are formed by combining two or more individual words, and are particularly + /// prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are + /// indexed separately. You can specify different lists for different languages. Decompounding is supported for + /// these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian + /// (`no`). public var decompoundedAttributes: AnyCodable? - /// Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - /// and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific + /// processing steps, such as word detection and dictionary settings. **You should always specify an indexing + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var indexLanguages: [String]? - /// Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). + /// Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). public var disablePrefixOnAttributes: [String]? - /// Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the + /// Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the /// compressed arrays may be reordered. public var allowCompressionOfIntegerArray: Bool? /// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + /// By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number + /// of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that + /// doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier**
+ ///
equalOnly(\"ATTRIBUTE\")
Support only filtering based on equality comparisons `=` + /// and `!=`.
Without modifier, all numeric comparisons are supported. public var numericAttributesForFiltering: [String]? - /// Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - /// Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + /// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency + /// characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia + /// treats separator characters as separate words. For example, a search for `C#` would report two matches. public var separatorsToIndex: String? - /// [Attributes used for - /// searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including - /// determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + /// Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + /// ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the + /// selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are + /// higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include + /// them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are + /// always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + /// **Modifier**
unordered(\"ATTRIBUTE\")
Ignore the position of a match within + /// the attribute.
Without modifier, matches at the beginning of an attribute rank higer than matches + /// at the end. public var searchableAttributes: [String]? - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. public var userData: AnyCodable? - /// A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). public var customNormalization: [String: [String: String]]? - /// Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + /// Attribute that should be used to establish groups of results. All records with the same value for this + /// attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to + /// control how many items per group are included in the search results. If you want to use the same attribute also + /// for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting + /// _after_ deduplication, which will result in accurate facet counts. public var attributeForDistinct: String? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? public init( + attributesForFaceting: [String]? = nil, replicas: [String]? = nil, paginationLimitedTo: Int? = nil, unretrievableAttributes: [String]? = nil, @@ -187,7 +318,6 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { userData: AnyCodable? = nil, customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -233,6 +363,7 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { enableReRanking: Bool? = nil, reRankingApplyFilter: ReRankingApplyFilter? = nil ) { + self.attributesForFaceting = attributesForFaceting self.replicas = replicas self.paginationLimitedTo = paginationLimitedTo self.unretrievableAttributes = unretrievableAttributes @@ -249,7 +380,6 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { self.userData = userData self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -297,6 +427,7 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { } public enum CodingKeys: String, CodingKey, CaseIterable { + case attributesForFaceting case replicas case paginationLimitedTo case unretrievableAttributes @@ -313,7 +444,6 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { case userData case customNormalization case attributeForDistinct - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -364,6 +494,7 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.replicas, forKey: .replicas) try container.encodeIfPresent(self.paginationLimitedTo, forKey: .paginationLimitedTo) try container.encodeIfPresent(self.unretrievableAttributes, forKey: .unretrievableAttributes) @@ -380,7 +511,6 @@ public struct IndexSettings: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.userData, forKey: .userData) try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettingsAsSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettingsAsSearchParams.swift index 3ff14cc2af..651dc9ec96 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettingsAsSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettingsAsSearchParams.swift @@ -27,108 +27,179 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? public init( - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -174,7 +245,6 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { enableReRanking: Bool? = nil, reRankingApplyFilter: ReRankingApplyFilter? = nil ) { - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -222,7 +292,6 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { } public enum CodingKeys: String, CodingKey, CaseIterable { - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -273,7 +342,6 @@ public struct IndexSettingsAsSearchParams: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Log.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Log.swift index 23493bfcf1..a0a4a077aa 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Log.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Log.swift @@ -6,35 +6,37 @@ import Core import Foundation public struct Log: Codable, JSONEncodable, Hashable { - /// Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + static let queryBodyRule = StringRule(minLength: nil, maxLength: 1000, pattern: nil) + static let answerRule = StringRule(minLength: nil, maxLength: 1000, pattern: nil) + /// Timestamp of the API request in ISO 8601 format. public var timestamp: String - /// HTTP method of the performed request. + /// HTTP method of the request. public var method: String - /// HTTP response code. + /// HTTP status code of the response. public var answerCode: String - /// Request body. Truncated after 1,000 characters. + /// Request body. public var queryBody: String - /// Answer body. Truncated after 1,000 characters. + /// Response body. public var answer: String - /// Request URL. + /// URL of the API endpoint. public var url: String /// IP address of the client that performed the request. public var ip: String - /// Request headers (API key is obfuscated). + /// Request headers (API keys are obfuscated). public var queryHeaders: String /// SHA1 signature of the log entry. public var sha1: String - /// Number of API calls. + /// Number of API requests. public var nbApiCalls: String - /// Processing time for the query. Doesn't include network time. + /// Processing time for the query in milliseconds. This doesn't include latency due to the network. public var processingTimeMs: String /// Index targeted by the query. public var index: String? /// Query parameters sent with the request. public var queryParams: String? - /// Number of hits returned for the query. + /// Number of search results (hits) returned for the query. public var queryNbHits: String? - /// Performed queries for the given request. + /// Queries performed for the given request. public var innerQueries: [LogQuery]? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/LogQuery.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/LogQuery.swift index f4a064031c..80f434a400 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/LogQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/LogQuery.swift @@ -8,7 +8,7 @@ import Foundation public struct LogQuery: Codable, JSONEncodable, Hashable { /// Index targeted by the query. public var indexName: String? - /// User identifier. + /// A user identifier. public var userToken: String? /// Unique query identifier. public var queryId: String? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/MatchLevel.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/MatchLevel.swift index 52f2416acb..7b1c3fd2ba 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/MatchLevel.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/MatchLevel.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// Indicates how well the attribute matched the search query. +/// Whether the whole query string matches or only a part. public enum MatchLevel: String, Codable, CaseIterable { case `none` case partial diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Mode.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Mode.swift index da14b65111..7b5a30f0f7 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Mode.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Mode.swift @@ -5,7 +5,8 @@ import AnyCodable import Core import Foundation -/// Search mode the index will use to query for results. +/// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia +/// enabled NeuralSearch for you. public enum Mode: String, Codable, CaseIterable { case neuralSearch case keywordSearch diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/MultipleBatchResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/MultipleBatchResponse.swift index b9cd9115cc..d039fd1cd7 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/MultipleBatchResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/MultipleBatchResponse.swift @@ -6,9 +6,9 @@ import Core import Foundation public struct MultipleBatchResponse: Codable, JSONEncodable, Hashable { - /// TaskIDs per index. + /// Task IDs. One for each index. public var taskID: [String: Int64] - /// Unique object (record) identifiers. + /// Unique record identifiers. public var objectIDs: [String] public init(taskID: [String: Int64], objectIDs: [String]) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/NumericFilters.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/NumericFilters.swift index 6c7e368151..287190ad67 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/NumericFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/NumericFilters.swift @@ -5,7 +5,12 @@ import AnyCodable import Core import Foundation -/// [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). +/// Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and +/// combinations with boolean operators.** You can use numeric comparison operators: `<`, +/// `<=`, `=`, `!=`, `>`, `>=`. +/// Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO +/// <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for +/// `facetFilters`. public enum NumericFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/OperationIndexParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/OperationIndexParams.swift index f7184caefd..52225e7bbb 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/OperationIndexParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/OperationIndexParams.swift @@ -7,10 +7,11 @@ import Foundation public struct OperationIndexParams: Codable, JSONEncodable, Hashable { public var operation: OperationType - /// Algolia index name. + /// Index name. public var destination: String - /// **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all records, - /// settings, synonyms, and rules. If you specify `scope`, only the specified scopes are copied. + /// **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes + /// are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and + /// rules. public var scope: [ScopeType]? public init(operation: OperationType, destination: String, scope: [ScopeType]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/OperationType.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/OperationType.swift index b29a51da4d..500f546d0f 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/OperationType.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/OperationType.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// Operation to perform (_move_ or _copy_). +/// Operation to perform on the index. public enum OperationType: String, Codable, CaseIterable { case move case copy diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/OptionalFilters.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/OptionalFilters.swift index 45ebabf0d2..3c02fabf5c 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/OptionalFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/OptionalFilters.swift @@ -5,9 +5,11 @@ import AnyCodable import Core import Foundation -/// Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower -/// for negative optional filters. In contrast to regular filters, records that don't match the optional filter are -/// still included in the results, only their ranking is affected. +/// Filters to promote or demote records in the search results. Optional filters work like facet filters, but they +/// don't exclude records from the search results. Records that match the optional filter rank before records that +/// don't match. If you're using a negative filter `facet:-value`, matching records rank after records +/// that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ +/// sort-by attributes. - Optional filters don't work with numeric attributes. public enum OptionalFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Params.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Params.swift index 1c5db75dd1..6d25007bfa 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Params.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Params.swift @@ -5,7 +5,8 @@ import AnyCodable import Core import Foundation -/// Additional search parameters. +/// Parameters to apply to this search. You can use all search parameters, plus special +/// `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`. public struct Params: Codable, JSONEncodable, Hashable { public var query: ConsequenceQuery? public var automaticFacetFilters: AutomaticFacetFilters? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectID.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectID.swift index b9503620d0..b6c75eaaa8 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectID.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectID.swift @@ -7,10 +7,9 @@ import Foundation /// Record to promote. public struct PromoteObjectID: Codable, JSONEncodable, Hashable { - /// Unique identifier of the record to promote. + /// Unique record identifier. public var objectID: String - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a - /// group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. public var position: Int public init(objectID: String, position: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectIDs.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectIDs.swift index a40d3ca7ec..8ee4febab5 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectIDs.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/PromoteObjectIDs.swift @@ -7,10 +7,10 @@ import Foundation /// Records to promote. public struct PromoteObjectIDs: Codable, JSONEncodable, Hashable { - /// Unique identifiers of the records to promote. + /// Object IDs of the records you want to promote. The records are placed as a group at the `position`. For + /// example, if you want to promote four records to position `0`, they will be the first four search results. public var objectIDs: [String] - /// The position to promote the records to. If you pass objectIDs, the records are placed at this position as a - /// group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions. + /// Position in the search results where you want to show the promoted records. public var position: Int public init(objectIDs: [String], position: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/QueryType.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/QueryType.swift index f429e39c74..75e915dbdb 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/QueryType.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/QueryType.swift @@ -5,7 +5,10 @@ import AnyCodable import Core import Foundation -/// Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). +/// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as +/// prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, +/// which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. +/// For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). public enum QueryType: String, Codable, CaseIterable { case prefixLast case prefixAll diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/RankingInfo.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/RankingInfo.swift index 53a2ebc617..a5eea03ca6 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/RankingInfo.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/RankingInfo.swift @@ -5,10 +5,67 @@ import AnyCodable import Core import Foundation +/// Object with detailed information about the record's ranking. public struct RankingInfo: Codable, JSONEncodable, Hashable { - /// This field is reserved for advanced usage. + static let filtersRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let firstMatchedWordRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let geoDistanceRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let geoPrecisionRule = NumericRule( + minimum: 1, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let nbExactWordsRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let nbTyposRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let proximityDistanceRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + static let wordsRule = NumericRule( + minimum: 1, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Whether a filter matched the query. public var filters: Int - /// Position of the most important matched attribute in the attributes to index list. + /// Position of the first matched word in the best matching attribute of the record. public var firstMatchedWord: Int /// Distance between the geo location in the search query and the best matching geo location in the record, divided /// by the geo precision (in meters). @@ -21,15 +78,15 @@ public struct RankingInfo: Codable, JSONEncodable, Hashable { public var nbExactWords: Int /// Number of typos encountered when matching the record. public var nbTypos: Int - /// Present and set to true if a Rule promoted the hit. + /// Whether the record was promoted by a rule. public var promoted: Bool - /// When the query contains more than one word, the sum of the distances between matched words (in meters). + /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0. public var proximityDistance: Int? - /// Custom ranking for the object, expressed as a single integer value. + /// Overall ranking of the record, expressed as a single integer. This attribute is internal. public var userScore: Int - /// Number of matched words, including prefixes and typos. + /// Number of matched words. public var words: Int - /// Wether the record are promoted by the re-ranking strategy. + /// Whether the record is re-ranked. public var promotedByReRanking: Bool? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/ReRankingApplyFilter.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/ReRankingApplyFilter.swift index 1ae7b3762b..ce14641b15 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/ReRankingApplyFilter.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/ReRankingApplyFilter.swift @@ -5,8 +5,8 @@ import AnyCodable import Core import Foundation -/// When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that -/// match these filters will be affected by Dynamic Re-Ranking. +/// Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these +/// filters. public enum ReRankingApplyFilter: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveStopWords.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveStopWords.swift index c462107dd9..d3aa055ea4 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveStopWords.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveStopWords.swift @@ -5,13 +5,9 @@ import AnyCodable import Core import Foundation -/// Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction -/// with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This -/// list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words -/// feature, ensuring that stop words are removed from consideration in a search. The languages supported here are -/// either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) -/// (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, -/// allowing stop words to be taken into account in a search. +/// Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or +/// pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or +/// \"and\" are stop words. You should only use this feature for the languages used in your index. public enum RemoveStopWords: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case arrayOfString([String]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveWordsIfNoResults.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveWordsIfNoResults.swift index 475e9ffbed..5142b14d0d 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveWordsIfNoResults.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/RemoveWordsIfNoResults.swift @@ -5,8 +5,14 @@ import AnyCodable import Core import Foundation -/// Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) -/// from the query when it doesn't match any hits. +/// Strategy for removing words from the query when it doesn't return any results. This helps to avoid returning +/// empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed +/// when a query doesn't return results.</dd> <dt><code>lastWords</code></dt> +/// <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at +/// most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat +/// the first (then second, then third) word as optional, until there are results or at most 5 words have been +/// removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as +/// optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). public enum RemoveWordsIfNoResults: String, Codable, CaseIterable { case `none` case lastWords diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/RenderingContent.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/RenderingContent.swift index 82b0e3b1fa..b1b448340a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/RenderingContent.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/RenderingContent.swift @@ -5,9 +5,8 @@ import AnyCodable import Core import Foundation -/// Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). -/// You can set a default value and dynamically override it with -/// [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). +/// Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the +/// order of facet names and values without changing your frontend code. public struct RenderingContent: Codable, JSONEncodable, Hashable { public var facetOrdering: FacetOrdering? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Rule.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Rule.swift index 1a0f71eca1..e3c97e10d2 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Rule.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Rule.swift @@ -7,18 +7,18 @@ import Foundation /// Rule object. public struct Rule: Codable, JSONEncodable, Hashable { - /// Unique identifier for a rule object. + /// Unique identifier of a rule object. public var objectID: String - /// [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to - /// activate a rule. You can use up to 25 conditions per rule. + /// Conditions that trigger a rule. Some consequences require specific conditions or don't require any condition. + /// For more information, see + /// [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). public var conditions: [Condition]? public var consequence: Consequence? - /// Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. + /// Description of the rule's purpose to help you distinguish between different rules. public var description: String? - /// Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. + /// Whether the rule is active. public var enabled: Bool? - /// If you specify a validity period, the rule _only_ applies only during that period. If specified, the array must - /// not be empty. + /// Time periods when the rule is active. public var validity: [TimeRange]? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SaveObjectResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SaveObjectResponse.swift index a46aa6f19a..8e082ce969 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SaveObjectResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SaveObjectResponse.swift @@ -6,12 +6,13 @@ import Core import Foundation public struct SaveObjectResponse: Codable, JSONEncodable, Hashable { - /// Date of creation (ISO-8601 format). + /// Timestamp when the record was added, in ISO 8601 format. public var createdAt: String - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 - /// Unique object identifier. + /// Unique record identifier. public var objectID: String? public init(createdAt: String, taskID: Int64, objectID: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SaveSynonymResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SaveSynonymResponse.swift index 68e8af9f80..22ef234ca5 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SaveSynonymResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SaveSynonymResponse.swift @@ -6,8 +6,9 @@ import Core import Foundation public struct SaveSynonymResponse: Codable, JSONEncodable, Hashable { - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var updatedAt: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesParams.swift index a69ac7d29d..c127498205 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesParams.swift @@ -5,8 +5,15 @@ import AnyCodable import Core import Foundation -/// `searchDictionaryEntries` parameters. +/// Search parameter. public struct SearchDictionaryEntriesParams: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -14,13 +21,13 @@ public struct SearchDictionaryEntriesParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + /// Search query. public var query: String - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? /// Number of hits per page. public var hitsPerPage: Int? - /// [Supported language ISO code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + /// ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). public var language: String? public init(query: String, page: Int? = nil, hitsPerPage: Int? = nil, language: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesResponse.swift new file mode 100644 index 0000000000..de577f8551 --- /dev/null +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchDictionaryEntriesResponse.swift @@ -0,0 +1,48 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on +// https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import AnyCodable +import Core +import Foundation + +public struct SearchDictionaryEntriesResponse: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Dictionary entries matching the search criteria. + public var hits: [DictionaryEntry] + /// Requested page of the API response. + public var page: Int + /// Number of results (hits). + public var nbHits: Int + /// Number of pages of results. + public var nbPages: Int + + public init(hits: [DictionaryEntry], page: Int, nbHits: Int, nbPages: Int) { + self.hits = hits + self.page = page + self.nbHits = nbHits + self.nbPages = nbPages + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case hits + case page + case nbHits + case nbPages + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.hits, forKey: .hits) + try container.encode(self.page, forKey: .page) + try container.encode(self.nbHits, forKey: .nbHits) + try container.encode(self.nbPages, forKey: .nbPages) + } +} diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesRequest.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesRequest.swift index 14150416e3..ac7b9a3953 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesRequest.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesRequest.swift @@ -17,7 +17,7 @@ public struct SearchForFacetValuesRequest: Codable, JSONEncodable, Hashable { public var params: String? /// Text to search inside the facet's values. public var facetQuery: String? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesResponse.swift index 7323478510..9afb9ff38c 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetValuesResponse.swift @@ -6,6 +6,7 @@ import Core import Foundation public struct SearchForFacetValuesResponse: Codable, JSONEncodable, Hashable { + /// Matching facet values. public var facetHits: [FacetHits] /// See the `facetsCount` field of the `exhaustive` object in the response. @available(*, deprecated, message: "This property is deprecated.") diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift index a00947a38f..7cc6dd5507 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct SearchForFacets: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct SearchForFacets: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,195 +55,278 @@ public struct SearchForFacets: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) /// Search parameters as a URL-encoded query string. public var params: String? - /// Text to search for in an index. + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? /// Facet name. public var facet: String - /// Algolia index name. + /// Index name. public var indexName: String /// Text to search inside the facet's values. public var facetQuery: String? @@ -263,14 +360,12 @@ public struct SearchForFacets: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -347,14 +442,12 @@ public struct SearchForFacets: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -433,14 +526,12 @@ public struct SearchForFacets: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -522,14 +613,12 @@ public struct SearchForFacets: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetsOptions.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetsOptions.swift index 62cc04763d..1d239f499b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetsOptions.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacetsOptions.swift @@ -15,11 +15,11 @@ public struct SearchForFacetsOptions: Codable, JSONEncodable, Hashable { ) /// Facet name. public var facet: String - /// Algolia index name. + /// Index name. public var indexName: String /// Text to search inside the facet's values. public var facetQuery: String? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? public var type: SearchTypeFacet diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift index 150e852f23..1e87acbc49 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct SearchForHits: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct SearchForHits: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,193 +55,276 @@ public struct SearchForHits: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) /// Search parameters as a URL-encoded query string. public var params: String? - /// Text to search for in an index. + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? - /// Algolia index name. + /// Index name. public var indexName: String public var type: SearchTypeDefault? @@ -259,14 +356,12 @@ public struct SearchForHits: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -341,14 +436,12 @@ public struct SearchForHits: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -425,14 +518,12 @@ public struct SearchForHits: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -512,14 +603,12 @@ public struct SearchForHits: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHitsOptions.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHitsOptions.swift index 93a75c8ade..6af3b78067 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHitsOptions.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHitsOptions.swift @@ -6,7 +6,7 @@ import Core import Foundation public struct SearchForHitsOptions: Codable, JSONEncodable, Hashable { - /// Algolia index name. + /// Index name. public var indexName: String public var type: SearchTypeDefault? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchHits.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchHits.swift index fbbb517514..97da2718a8 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchHits.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchHits.swift @@ -6,8 +6,10 @@ import Core import Foundation public struct SearchHits: Codable, JSONEncodable, Hashable { + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with + /// additional attributes, such as, for highlighting. public var hits: [Hit] - /// Text to search for in an index. + /// Search query. public var query: String /// URL-encoded string of all search parameters. public var params: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsObject.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsObject.swift index 914b19eb24..b3e43a537d 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsObject.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct SearchParamsObject: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let lengthRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,6 +27,13 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let personalizationImpactRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: 100, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -41,188 +55,271 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + static let maxValuesPerFacetRule = NumericRule( + minimum: nil, + exclusiveMinimum: false, + maximum: 1000, + exclusiveMaximum: false, + multipleOf: nil + ) + /// Search query. public var query: String? - /// Overrides the query parameter and performs a more generic search. + /// Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` + /// parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - + /// `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the + /// `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to + /// narrow down the list of results. public var similarQuery: String? - /// [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, - /// facet, or tag filters. + /// Filter the search so that only records with matching values are included in the results. These filters are + /// supported: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, + /// `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of + /// the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute + /// (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` + /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not + /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not + /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet + /// attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an + /// array, the filter matches if it matches at least one element of the array. For more information, see + /// [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). public var filters: String? public var facetFilters: FacetFilters? public var optionalFilters: OptionalFilters? public var numericFilters: NumericFilters? public var tagFilters: TagFilters? - /// Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - /// If `false`, maximum score is kept. If `true`, score is summed. + /// Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is + /// kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). public var sumOrFiltersScores: Bool? - /// Restricts a query to only look at a subset of your [searchable - /// attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + /// Restricts a search to a subset of your searchable attributes. public var restrictSearchableAttributes: [String]? - /// Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - /// their facet values, and the number of matching facet values. + /// Facets for which to retrieve facet values that match the search criteria and the number of matching facet + /// values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). public var facets: [String]? - /// Forces faceting to be applied after - /// [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the - /// distinct feature). Alternatively, the `afterDistinct` - /// [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of - /// `attributesForFaceting` allows for more granular control. + /// Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts + /// when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the + /// `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records + /// have the same facet values for the `attributeForDistinct`. public var facetingAfterDistinct: Bool? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? - /// Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended - /// method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Position of the first hit to retrieve. public var offset: Int? - /// Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the - /// recommended method for [paging - /// results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you - /// can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + /// Number of hits to retrieve (used in combination with `offset`). public var length: Int? - /// Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - /// enabling a geographical search within a circular area. + /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only + /// records included within circle around this central location are included in the results. The radius of the + /// circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you + /// also specify `insidePolygon` or `insideBoundingBox`. public var aroundLatLng: String? - /// Search for entries around a location. The location is automatically computed from the requester's IP address. + /// Whether to obtain the coordinates from the request's IP address. public var aroundLatLngViaIP: Bool? public var aroundRadius: AroundRadius? public var aroundPrecision: AroundPrecision? - /// Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. + /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. public var minimumAroundRadius: Int? - /// Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points + /// of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide + /// multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). public var insideBoundingBox: [[Double]]? - /// Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - /// (in geographical coordinates). + /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is + /// represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see + /// [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + /// This parameter is ignored, if you also specify `insideBoundingBox`. public var insidePolygon: [[Double]]? - /// Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, - /// `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well - /// together when the query consists of fuller natural language strings instead of keywords, for example when - /// processing voice search queries. + /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to + /// keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets + /// `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and + /// `analyticsTags`. public var naturalLanguages: [String]? - /// Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - /// to search queries. + /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) + /// are strings that you can use to trigger matching rules. public var ruleContexts: [String]? - /// Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + /// Impact that Personalization should have on this search. The higher this value is, the more Personalization + /// determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). public var personalizationImpact: Int? - /// Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the - /// current search. + /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. + /// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). public var userToken: String? - /// Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + /// Whether the search response should include detailed ranking information. public var getRankingInfo: Bool? - /// Enriches the API's response with information about how the query was processed. - public var explain: [String]? - /// Whether to take into account an index's synonyms for a particular search. + /// Whether to take into account an index's synonyms for this search. public var synonyms: Bool? - /// Indicates whether a query ID parameter is included in the search response. This is required for [tracking click - /// and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search + /// query and is required for tracking [click and conversion + /// events](https://www.algolia.com/guides/sending-events/getting-started/). public var clickAnalytics: Bool? - /// Indicates whether this query will be included in - /// [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + /// Whether this search will be included in Analytics. public var analytics: Bool? /// Tags to apply to the query for [segmenting analytics /// data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). public var analyticsTags: [String]? - /// Whether to include or exclude a query from the processing-time percentile computation. + /// Whether to include this search when calculating processing-time percentiles. public var percentileComputation: Bool? - /// Incidates whether this search will be considered in A/B testing. + /// Whether to enable A/B testing for this search. public var enableABTest: Bool? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - /// the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that - /// can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - public var attributesForFaceting: [String]? - /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of - /// the attributes. By default, the response includes all attributes. + /// Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of + /// the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and + /// `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute + /// with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always + /// included. public var attributesToRetrieve: [String]? - /// Determines the order in which Algolia [returns your - /// results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking + /// criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + /// The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure + /// a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + /// you put the sorting attribute at the top of the list. **Modifiers**
+ ///
asc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in ascending + /// order.
desc(\"ATTRIBUTE\")
Sort the index by the values of an attribute, in + /// descending order.
Before you modify the default setting, you should test your changes in the + /// dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). public var ranking: [String]? - /// Specifies the [Custom ranking - /// criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and - /// `desc` modifiers to specify the ranking order: ascending or descending. + /// Attributes to use as [custom + /// ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking + /// attributes decide which items are shown first if the other ranking criteria are equal. Records with missing + /// values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based + /// on their alphabetical order. **Modifiers**
asc(\"ATTRIBUTE\")
Sort the index by + /// the values of an attribute, in ascending order.
desc(\"ATTRIBUTE\")
Sort the + /// index by the values of an attribute, in descending order.
If you use two or more custom ranking + /// attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + /// of your first attributes, or the other attributes will never be applied. public var customRanking: [String]? - /// Relevancy threshold below which less relevant results aren't included in the results. + /// Relevancy threshold below which less relevant results aren't included in the results. You can only set + /// `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + /// Use this setting to strike a balance between the relevance and number of returned results. public var relevancyStrictness: Int? - /// Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding - /// them with HTML tags (`highlightPreTag` and `highlightPostTag`). + /// Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all + /// attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the + /// search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this + /// to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). public var attributesToHighlight: [String]? - /// Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not - /// specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. - /// For example: `body:20`. + /// Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable + /// snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags + /// for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where + /// `NUMBER` is the number of words to be extracted. public var attributesToSnippet: [String]? - /// HTML string to insert before the highlighted parts in all highlight and snippet results. + /// HTML tag to insert before the highlighted parts in all highlighted results and snippets. public var highlightPreTag: String? - /// HTML string to insert after the highlighted parts in all highlight and snippet results. + /// HTML tag to insert after the highlighted parts in all highlighted results and snippets. public var highlightPostTag: String? /// String used as an ellipsis indicator when a snippet is truncated. public var snippetEllipsisText: String? - /// Restrict highlighting and snippeting to items that matched the query. + /// Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By + /// default, all items are highlighted and snippeted. public var restrictHighlightAndSnippetArrays: Bool? /// Number of hits per page. public var hitsPerPage: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor1Typo: Int? - /// Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). + /// Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). public var minWordSizefor2Typos: Int? public var typoTolerance: TypoTolerance? - /// Whether to allow typos on numbers (\"numeric tokens\") in the query string. + /// Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant + /// matches when searching in large sets of similar numbers. public var allowTyposOnNumericTokens: Bool? /// Attributes for which you want to turn off [typo - /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + /// Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + /// - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks + /// of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding + /// synonyms if your attributes have intentional unusual spellings that might look like typos. public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: IgnorePlurals? public var removeStopWords: RemoveStopWords? - /// Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + /// Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For + /// example, `Ă©` becomes `e`. If this causes issues in your search, you can specify characters that should keep + /// their diacritics. public var keepDiacriticsOnCharacters: String? - /// Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, - /// `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - /// word detection. + /// [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as + /// plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the + /// `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the + /// logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) + /// languages. To support this, you must place the CJK language **first**. **You should always specify a query + /// language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + /// or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to + /// unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). public var queryLanguages: [String]? - /// [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - /// into their component word parts in the query. + /// Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + /// Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. public var decompoundQuery: Bool? - /// Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are - /// enabled. + /// Whether to enable rules. public var enableRules: Bool? - /// Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - /// is enabled. + /// Whether to enable Personalization. public var enablePersonalization: Bool? public var queryType: QueryType? public var removeWordsIfNoResults: RemoveWordsIfNoResults? public var mode: Mode? public var semanticSearch: SemanticSearch? - /// Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + /// Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` + /// parameter to control which feature is supported. public var advancedSyntax: Bool? - /// Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - /// when found in a query. + /// Words that should be considered optional when found in the query. By default, records must match all words in + /// the search query to be included in the search results. Adding optional words can help to increase the number of + /// search results by running an additional search query that doesn't include the optional words. For example, if + /// the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One + /// for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query + /// with 4 or more words **and** all its words are optional, the number of matched words required for a record to be + /// included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, + /// the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 + /// to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words + /// increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: + /// results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, + /// see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). public var optionalWords: [String]? - /// Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as + /// product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on + /// other attributes. This reduces the impact of individual attributes with a lot of content on ranking. public var disableExactOnAttributes: [String]? public var exactOnSingleWordQuery: ExactOnSingleWordQuery? - /// Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + /// Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
+ ///
ignorePlurals
Plurals and similar declensions added by the `ignorePlurals` setting + /// are considered exact matches.
singleWordSynonym
Single-word synonyms, such as + /// \"NY/NYC\" are considered exact matches.
multiWordsSynonym
Multi-word synonyms, + /// such as \"NY/New York\" are considered exact matches.
. public var alternativesAsExact: [AlternativesAsExact]? - /// Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled. + /// Advanced search syntax features you want to support.
exactPhrase
Phrases in + /// quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact + /// string \"iPhone case\".
excludeWords
Query words prefixed with a `-` must not + /// occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". + ///
This setting only has an effect if `advancedSyntax` is true. public var advancedSyntaxFeatures: [AdvancedSyntaxFeatures]? public var distinct: Distinct? - /// Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + /// Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted + /// even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records + /// matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are + /// highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same + /// records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response. public var replaceSynonymsInHighlight: Bool? - /// Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + /// Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + /// by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and + /// matches with one word between them would have the same score. public var minProximity: Int? - /// Attributes to include in the API response for search and browse queries. + /// Properties to include in the API response of `search` and `browse` requests. By default, all response + /// properties are included. To reduce the response size, you can select, which attributes should be included. You + /// can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, + /// `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you + /// might need in your search UI. public var responseFields: [String]? - /// Maximum number of facet hits to return when [searching for facet + /// Maximum number of facet values to return when [searching for facet /// values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). public var maxFacetHits: Int? /// Maximum number of facet values to return for each facet. public var maxValuesPerFacet: Int? - /// Controls how facet values are fetched. + /// Order in which to retrieve facet values.
count
Facet values are retrieved by + /// decreasing count. The count is the number of matching records containing this facet value.
+ ///
alpha
Retrieve facet values alphabetically.
This setting doesn't influence + /// how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value + /// display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). public var sortFacetValuesBy: String? - /// When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - /// in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute - /// ranking stage. + /// Whether the best matching attribute should be determined by minimum proximity. This setting only affects + /// ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best + /// matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching + /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RenderingContent? - /// Indicates whether this search will use [Dynamic - /// Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: ReRankingApplyFilter? @@ -253,14 +350,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { personalizationImpact: Int? = nil, userToken: String? = nil, getRankingInfo: Bool? = nil, - explain: [String]? = nil, synonyms: Bool? = nil, clickAnalytics: Bool? = nil, analytics: Bool? = nil, analyticsTags: [String]? = nil, percentileComputation: Bool? = nil, enableABTest: Bool? = nil, - attributesForFaceting: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, customRanking: [String]? = nil, @@ -332,14 +427,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { self.personalizationImpact = personalizationImpact self.userToken = userToken self.getRankingInfo = getRankingInfo - self.explain = explain self.synonyms = synonyms self.clickAnalytics = clickAnalytics self.analytics = analytics self.analyticsTags = analyticsTags self.percentileComputation = percentileComputation self.enableABTest = enableABTest - self.attributesForFaceting = attributesForFaceting self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.customRanking = customRanking @@ -413,14 +506,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { case personalizationImpact case userToken case getRankingInfo - case explain case synonyms case clickAnalytics case analytics case analyticsTags case percentileComputation case enableABTest - case attributesForFaceting case attributesToRetrieve case ranking case customRanking @@ -497,14 +588,12 @@ public struct SearchParamsObject: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.personalizationImpact, forKey: .personalizationImpact) try container.encodeIfPresent(self.userToken, forKey: .userToken) try container.encodeIfPresent(self.getRankingInfo, forKey: .getRankingInfo) - try container.encodeIfPresent(self.explain, forKey: .explain) try container.encodeIfPresent(self.synonyms, forKey: .synonyms) try container.encodeIfPresent(self.clickAnalytics, forKey: .clickAnalytics) try container.encodeIfPresent(self.analytics, forKey: .analytics) try container.encodeIfPresent(self.analyticsTags, forKey: .analyticsTags) try container.encodeIfPresent(self.percentileComputation, forKey: .percentileComputation) try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) - try container.encodeIfPresent(self.attributesForFaceting, forKey: .attributesForFaceting) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.customRanking, forKey: .customRanking) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsQuery.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsQuery.swift index 45798ca952..cb5d2e5641 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsQuery.swift @@ -6,7 +6,7 @@ import Core import Foundation public struct SearchParamsQuery: Codable, JSONEncodable, Hashable { - /// Text to search for in an index. + /// Search query. public var query: String? public init(query: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchResponse.swift index a5c50dd6b8..7a0f3385d6 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchResponse.swift @@ -25,13 +25,20 @@ public struct SearchResponse: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) /// A/B test ID. This is only included in the response for indices that are part of an A/B test. public var abTestID: Int? /// Variant ID. This is only included in the response for indices that are part of an A/B test. public var abTestVariantID: Int? /// Computed geographical location. public var aroundLatLng: String? - /// Automatically-computed radius. + /// Distance from a central coordinate provided by `aroundLatLng`. public var automaticRadius: String? public var exhaustive: Exhaustive? /// See the `facetsCount` field of the `exhaustive` object in the response. @@ -43,7 +50,7 @@ public struct SearchResponse: Codable, JSONEncodable, Hashable { /// See the `typo` field of the `exhaustive` object in the response. @available(*, deprecated, message: "This property is deprecated.") public var exhaustiveTypo: Bool? - /// Mapping of each facet name to the corresponding facet counts. + /// Facet counts. public var facets: [String: [String: Int]]? /// Statistics for numerical facets. public var facetsStats: [String: FacetsStats]? @@ -55,13 +62,13 @@ public struct SearchResponse: Codable, JSONEncodable, Hashable { public var indexUsed: String? /// Warnings about the query. public var message: String? - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int - /// Number of pages of results for the current query. + /// Number of pages of results. public var nbPages: Int /// Number of hits selected and sorted by the relevant sort algorithm. public var nbSortedHits: Int? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int /// 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. @@ -79,13 +86,15 @@ public struct SearchResponse: Codable, JSONEncodable, Hashable { public var serverTimeMS: Int? /// Host name of the server that processed the request. public var serverUsed: String? - /// Lets you store custom data in your indices. + /// An object with custom data. You can store up to 32 kB as custom data. public var userData: AnyCodable? /// Unique identifier for the query. This is used for [click /// analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). public var queryID: String? + /// Search results (hits). Hits are records from your index that match the search criteria, augmented with + /// additional attributes, such as, for highlighting. public var hits: [Hit] - /// Text to search for in an index. + /// Search query. public var query: String /// URL-encoded string of all search parameters. public var params: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesParams.swift index 74c1c9bbf4..4acf436ca3 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesParams.swift @@ -21,19 +21,18 @@ public struct SearchRulesParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Rule object query. + /// Search query for rules. public var query: String? public var anchoring: Anchoring? - /// Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + /// Only return rules that match the context (exact match). public var context: String? - /// Requested page (the first page is page 0). + /// Requested page of the API response. public var page: Int? /// Maximum number of hits per page. public var hitsPerPage: Int? - /// Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. + /// If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are + /// returned. public var enabled: Bool? - /// Request options to send with the API call. - public var requestOptions: [AnyCodable]? public init( query: String? = nil, @@ -41,8 +40,7 @@ public struct SearchRulesParams: Codable, JSONEncodable, Hashable { context: String? = nil, page: Int? = nil, hitsPerPage: Int? = nil, - enabled: Bool? = nil, - requestOptions: [AnyCodable]? = nil + enabled: Bool? = nil ) { self.query = query self.anchoring = anchoring @@ -50,7 +48,6 @@ public struct SearchRulesParams: Codable, JSONEncodable, Hashable { self.page = page self.hitsPerPage = hitsPerPage self.enabled = enabled - self.requestOptions = requestOptions } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -60,7 +57,6 @@ public struct SearchRulesParams: Codable, JSONEncodable, Hashable { case page case hitsPerPage case enabled - case requestOptions } // Encodable protocol methods @@ -73,6 +69,5 @@ public struct SearchRulesParams: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(self.page, forKey: .page) try container.encodeIfPresent(self.hitsPerPage, forKey: .hitsPerPage) try container.encodeIfPresent(self.enabled, forKey: .enabled) - try container.encodeIfPresent(self.requestOptions, forKey: .requestOptions) } } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesResponse.swift index ad3a040fa8..f3284bb923 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRulesResponse.swift @@ -6,9 +6,9 @@ import Core import Foundation public struct SearchRulesResponse: Codable, JSONEncodable, Hashable { - /// Fetched rules. + /// Rules that matched the search criteria. public var hits: [Rule] - /// Number of fetched rules. + /// Number of rules that matched the search criteria. public var nbHits: Int /// Current page. public var page: Int diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchStrategy.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchStrategy.swift index 91518c8611..a9cd973b79 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchStrategy.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchStrategy.swift @@ -5,8 +5,8 @@ import AnyCodable import Core import Foundation -/// - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping -/// further query execution as soon as a query matches at least the `hitsPerPage` number of results. +/// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run +/// the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. public enum SearchStrategy: String, Codable, CaseIterable { case `none` case stopIfEnoughMatches diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsParams.swift index 9e393f434f..a527fdf706 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsParams.swift @@ -6,6 +6,13 @@ import Core import Foundation public struct SearchSynonymsParams: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -13,10 +20,10 @@ public struct SearchSynonymsParams: Codable, JSONEncodable, Hashable { exclusiveMaximum: false, multipleOf: nil ) - /// Text to search for in an index. + /// Search query. public var query: String? public var type: SynonymType? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? /// Number of hits per page. public var hitsPerPage: Int? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsResponse.swift index ddb61c85ca..bbf3032aaa 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSynonymsResponse.swift @@ -6,9 +6,9 @@ import Core import Foundation public struct SearchSynonymsResponse: Codable, JSONEncodable, Hashable { - /// Synonym objects. + /// Matching synonyms. public var hits: [SynonymHit] - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int public init(hits: [SynonymHit], nbHits: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsParams.swift index c425a90fd1..eb528c982b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsParams.swift @@ -7,6 +7,13 @@ import Foundation /// OK public struct SearchUserIdsParams: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -20,7 +27,7 @@ public struct SearchUserIdsParams: Codable, JSONEncodable, Hashable { public var query: String /// Cluster name. public var clusterName: String? - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int? /// Number of hits per page. public var hitsPerPage: Int? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsResponse.swift index fce6c98d23..ce85b3783d 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchUserIdsResponse.swift @@ -7,6 +7,13 @@ import Foundation /// userIDs data. public struct SearchUserIdsResponse: Codable, JSONEncodable, Hashable { + static let pageRule = NumericRule( + minimum: 0, + exclusiveMinimum: false, + maximum: nil, + exclusiveMaximum: false, + multipleOf: nil + ) static let hitsPerPageRule = NumericRule( minimum: 1, exclusiveMinimum: false, @@ -16,9 +23,9 @@ public struct SearchUserIdsResponse: Codable, JSONEncodable, Hashable { ) /// User objects that match the query. public var hits: [UserHit] - /// Number of hits the search query matched. + /// Number of results (hits). public var nbHits: Int - /// Page to retrieve (the first page is `0`, not `1`). + /// Page of search results to retrieve. public var page: Int /// Maximum number of hits per page. public var hitsPerPage: Int diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SecuredAPIKeyRestrictions.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SecuredAPIKeyRestrictions.swift index d0b84fff44..ec3f107fd7 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SecuredAPIKeyRestrictions.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SecuredAPIKeyRestrictions.swift @@ -7,26 +7,23 @@ import Foundation public struct SecuredAPIKeyRestrictions: Codable, JSONEncodable, Hashable { public var searchParams: SearchParamsObject? - /// Filters that apply to every search made with the secured API key. You can add extra filters at search time with - /// the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you - /// add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to - /// groups:admin AND (groups:press OR groups:visitors). + /// Filters that apply to every search made with the secured API key. Extra filters added at search time will be + /// combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add + /// `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. public var filters: String? - /// Unix timestamp used to set the expiration date of the API key. + /// Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire. public var validUntil: Int64? - /// Index names that can be queried. + /// Index names or patterns that this API key can access. By default, an API key can access all indices in the same + /// application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices + /// starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices + /// containing \"_products_\". public var restrictIndices: [String]? - /// IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can - /// only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). + /// IP network that are allowed to use this key. You can only add a single source, but you can provide a range of + /// IP addresses. Use this to protect against API key leaking and reuse. public var restrictSources: String? - /// Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, - /// rate limits are set based on the IP address. This can become an issue when several users search from the same IP - /// address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets - /// you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. - /// Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change - /// it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user - /// identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and - /// prevents abuse. + /// Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are + /// set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, + /// add a user token to each generated API key. public var userToken: String? public init( diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SemanticSearch.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SemanticSearch.swift index 65cc7d7ac8..a17535074b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SemanticSearch.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SemanticSearch.swift @@ -5,10 +5,10 @@ import AnyCodable import Core import Foundation -/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. +/// Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`. public struct SemanticSearch: Codable, JSONEncodable, Hashable { - /// Indices from which to collect click and conversion events. If null, the current index and replica group will be - /// used as the event source. + /// Indices from which to collect click and conversion events. If null, the current index and all its replicas are + /// used. public var eventSources: [String]? public init(eventSources: [String]? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SnippetResultOption.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SnippetResultOption.swift index a11216615d..86d4278378 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SnippetResultOption.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SnippetResultOption.swift @@ -5,9 +5,9 @@ import AnyCodable import Core import Foundation -/// Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty. +/// Snippets that show the context around a matching search query. public struct SnippetResultOption: Codable, JSONEncodable, Hashable { - /// Markup text with `facetQuery` matches highlighted. + /// Highlighted attribute value, including HTML tags. public var value: String public var matchLevel: MatchLevel diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SortRemainingBy.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SortRemainingBy.swift index 5427273145..76657f1a08 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SortRemainingBy.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SortRemainingBy.swift @@ -5,8 +5,12 @@ import AnyCodable import Core import Foundation -/// How to display the remaining items: - `count`: facet count (descending). - `alpha`: -/// alphabetical (ascending). - `hidden`: show only pinned values. +/// Order of facet values that aren't explicitly positioned with the `order` setting. <dl> +/// <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The +/// count is the number of matching records containing this facet value. </dd> +/// <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> +/// <dt><code>hidden</code></dt> <dd>Don't show facet values that aren't +/// explicitly positioned.</dd> </dl>. public enum SortRemainingBy: String, Codable, CaseIterable { case count case alpha diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/TagFilters.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/TagFilters.swift index 3b3c56727c..b4a02e0732 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/TagFilters.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/TagFilters.swift @@ -5,7 +5,10 @@ import AnyCodable import Core import Foundation -/// [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). +/// Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` +/// parameter, which supports all filter types and combinations with boolean operators.** Different from regular +/// facets, `_tags` can only be used for filtering (including or excluding records). You won't get a facet +/// count. The same combination and escaping rules apply as for `facetFilters`. public enum TagFilters: Codable, JSONEncodable, AbstractEncodable, Hashable { case string(String) case arrayOfMixedSearchFilters([MixedSearchFilters]) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/TaskStatus.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/TaskStatus.swift index c8c79ae77e..0011cf8b58 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/TaskStatus.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/TaskStatus.swift @@ -5,7 +5,7 @@ import AnyCodable import Core import Foundation -/// _published_ if the task has been processed, _notPublished_ otherwise. +/// Task status, `published` if the task is completed, `notPublished` otherwise. public enum TaskStatus: String, Codable, CaseIterable { case published case notPublished diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/TimeRange.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/TimeRange.swift index fe78fb0bce..14742edb5b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/TimeRange.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/TimeRange.swift @@ -6,9 +6,9 @@ import Core import Foundation public struct TimeRange: Codable, JSONEncodable, Hashable { - /// Lower bound of the time range (Unix timestamp). + /// When the rule should start to be active, in Unix epoch time. public var from: Int - /// Upper bound of the time range (Unix timestamp). + /// When the rule should stop to be active, in Unix epoch time. public var until: Int public init(from: Int, until: Int) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/TypoTolerance.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/TypoTolerance.swift index 51e860b9e0..12e48dc6cb 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/TypoTolerance.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/TypoTolerance.swift @@ -5,9 +5,10 @@ import AnyCodable import Core import Foundation -/// Controls whether [typo +/// Whether [typo /// tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled -/// and how it is applied. +/// and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) +/// is also active. public enum TypoTolerance: Codable, JSONEncodable, AbstractEncodable, Hashable { case bool(Bool) case typoToleranceEnum(TypoToleranceEnum) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/TypoToleranceEnum.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/TypoToleranceEnum.swift index 1c93d3b74c..dbb88423ca 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/TypoToleranceEnum.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/TypoToleranceEnum.swift @@ -5,6 +5,10 @@ import AnyCodable import Core import Foundation +/// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, +/// only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 +/// typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the +/// Typo ranking criterion is applied first in the `ranking` setting. public enum TypoToleranceEnum: String, Codable, CaseIterable { case min case strict diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtResponse.swift index 3d566e0a9b..4e1f156c20 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtResponse.swift @@ -7,8 +7,9 @@ import Foundation /// Response, taskID, and update timestamp. public struct UpdatedAtResponse: Codable, JSONEncodable, Hashable { - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var updatedAt: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtWithObjectIdResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtWithObjectIdResponse.swift index ca2c96553a..1456d697b1 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtWithObjectIdResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedAtWithObjectIdResponse.swift @@ -7,12 +7,13 @@ import Foundation /// Response, taskID, unique object identifier, and an update timestamp. public struct UpdatedAtWithObjectIdResponse: Codable, JSONEncodable, Hashable { - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64? /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var updatedAt: String? - /// Unique object identifier. + /// Unique record identifier. public var objectID: String? public init(taskID: Int64? = nil, updatedAt: String? = nil, objectID: String? = nil) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedRuleResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedRuleResponse.swift index 3f55d11afc..32dfdeb5ce 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedRuleResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/UpdatedRuleResponse.swift @@ -6,12 +6,13 @@ import Core import Foundation public struct UpdatedRuleResponse: Codable, JSONEncodable, Hashable { - /// Unique object identifier. + /// Unique identifier of a rule object. public var objectID: String /// Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. public var updatedAt: String - /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run - /// immediately. You can check the task's progress with the `task` operation and this `taskID`. + /// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run + /// immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and + /// this `taskID`. public var taskID: Int64 public init(objectID: String, updatedAt: String, taskID: Int64) { diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/UserHit.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/UserHit.swift index f367c65142..1bee58dd16 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/UserHit.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/UserHit.swift @@ -7,7 +7,7 @@ import Foundation public struct UserHit: Codable, JSONEncodable, Hashable { static let userIDRule = StringRule(minLength: nil, maxLength: nil, pattern: "^[a-zA-Z0-9 \\-*.]+$") - /// userID of the user. + /// User ID. public var userID: String /// Cluster name. public var clusterName: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/UserId.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/UserId.swift index f426fdf758..259f7c27e0 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/UserId.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/UserId.swift @@ -8,7 +8,7 @@ import Foundation /// Unique user ID. public struct UserId: Codable, JSONEncodable, Hashable { static let userIDRule = StringRule(minLength: nil, maxLength: nil, pattern: "^[a-zA-Z0-9 \\-*.]+$") - /// userID of the user. + /// User ID. public var userID: String /// Cluster to which the user is assigned. public var clusterName: String diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/Value.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/Value.swift index 7531335d75..37997a3745 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/Value.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/Value.swift @@ -6,7 +6,8 @@ import Core import Foundation public struct Value: Codable, JSONEncodable, Hashable { - /// Pinned order of facet lists. + /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at + /// the top of the list. public var order: [String]? public var sortRemainingBy: SortRemainingBy? diff --git a/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift b/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift index 91a332af3f..3c33d0f99a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift @@ -44,8 +44,7 @@ open class SearchClient { return body } - // Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin - // API key. The response returns an API key string. + // Creates a new API key with specific permissions and restrictions. // Required API Key ACLs: // - admin // @@ -72,9 +71,11 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter objectID: (path) Unique record (object) identifier. - /// - parameter body: (body) Algolia record. + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter objectID: (path) Unique record identifier. + /// - parameter body: (body) The record, a schemaless object with attributes that are useful in the context of + /// search + /// and discovery. /// - returns: UpdatedAtWithObjectIdResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func addOrUpdateObject( @@ -97,18 +98,19 @@ open class SearchClient { return body } - // If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some - // attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) - // instead. To add multiple records to your index in a single API request, use the [`batch` - // operation](#tag/Records/operation/batch). + // If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is + // added to the index. To update _some_ attributes of an existing record, use the [`partial` + // operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use + // the [`batch` operation](#tag/Records/operation/batch). // Required API Key ACLs: // - addObject // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter objectID: (path) Unique record (object) identifier. + // - parameter objectID: (path) Unique record identifier. // - // - parameter body: (body) Algolia record. + // - parameter body: (body) The record, a schemaless object with attributes that are useful in the context of search + // and discovery. // - returns: RequestBuilder open func addOrUpdateObjectWithHTTPInfo( @@ -179,7 +181,7 @@ open class SearchClient { return body } - // Add a source to the list of allowed sources. + // Adds a source to the list of allowed sources. // Required API Key ACLs: // - admin // @@ -206,7 +208,7 @@ open class SearchClient { ) } - /// - parameter xAlgoliaUserID: (header) userID to assign. + /// - parameter xAlgoliaUserID: (header) User ID to assign. /// - parameter assignUserIdParams: (body) /// - returns: CreatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -228,12 +230,12 @@ open class SearchClient { return body } - // Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data + // Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data // linked to the user ID. // Required API Key ACLs: // - admin // - // - parameter xAlgoliaUserID: (header) userID to assign. + // - parameter xAlgoliaUserID: (header) User ID to assign. // // - parameter assignUserIdParams: (body) // - returns: RequestBuilder @@ -261,7 +263,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter batchWriteParams: (body) /// - returns: BatchResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -283,12 +285,12 @@ open class SearchClient { return body } - // To reduce the time spent on network round trips, you can perform several write actions in a single API call. - // Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual - // operations of the same name. + // Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency + // and increases data integrity. - Actions are applied in the order they're specified. - Actions are equivalent to + // the individual API requests of the same name. // // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter batchWriteParams: (body) // - returns: RequestBuilder @@ -327,7 +329,7 @@ open class SearchClient { ) } - /// - parameter xAlgoliaUserID: (header) userID to assign. + /// - parameter xAlgoliaUserID: (header) User ID to assign. /// - parameter batchAssignUserIdsParams: (body) /// - returns: CreatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -349,11 +351,11 @@ open class SearchClient { return body } - // Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. + // Assigns multiple user IDs to a cluster. **You can't move users with this operation**. // Required API Key ACLs: // - admin // - // - parameter xAlgoliaUserID: (header) userID to assign. + // - parameter xAlgoliaUserID: (header) User ID to assign. // // - parameter batchAssignUserIdsParams: (body) // - returns: RequestBuilder @@ -381,7 +383,7 @@ open class SearchClient { ) } - /// - parameter dictionaryName: (path) Dictionary to search in. + /// - parameter dictionaryName: (path) Dictionary type in which to search. /// - parameter batchDictionaryEntriesParams: (body) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -403,11 +405,11 @@ open class SearchClient { return body } - // Add or remove a batch of dictionary entries. + // Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries. // Required API Key ACLs: // - editSettings // - // - parameter dictionaryName: (path) Dictionary to search in. + // - parameter dictionaryName: (path) Dictionary type in which to search. // // - parameter batchDictionaryEntriesParams: (body) // - returns: RequestBuilder @@ -442,7 +444,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter browseParams: (body) (optional) /// - returns: BrowseResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -464,12 +466,15 @@ open class SearchClient { return body } - // Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't - // support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. + // Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented + // with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be + // useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - + // Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no + // ranking for: typo-tolerance, number of matched words, proximity, geo distance. // Required API Key ACLs: // - browse // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter browseParams: (body) (optional) // - returns: RequestBuilder @@ -508,7 +513,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func clearObjects(indexName: String, requestOptions: RequestOptions? = nil) async throws -> UpdatedAtResponse { @@ -524,11 +529,11 @@ open class SearchClient { return body } - // Delete the records but leave settings and index-specific API keys untouched. + // Deletes only the records from an index while keeping settings, synonyms, and rules. // Required API Key ACLs: // - deleteIndex // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - returns: RequestBuilder open func clearObjectsWithHTTPInfo( @@ -564,9 +569,8 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func clearRules( @@ -587,14 +591,13 @@ open class SearchClient { return body } - // Delete all rules in the index. + // Deletes all rules from the index. // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - returns: RequestBuilder open func clearRulesWithHTTPInfo( @@ -633,9 +636,8 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func clearSynonyms( @@ -656,14 +658,13 @@ open class SearchClient { return body } - // Delete all synonyms in the index. + // Deletes all synonyms from the index. // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - returns: RequestBuilder open func clearSynonymsWithHTTPInfo( @@ -978,7 +979,7 @@ open class SearchClient { return body } - // Delete an existing API key. The request must be authenticated with the admin API key. + // Deletes the API key. // Required API Key ACLs: // - admin // @@ -1017,7 +1018,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter deleteByParams: (body) /// - returns: DeletedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -1039,12 +1040,13 @@ open class SearchClient { return body } - // This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. - // It doesn't accept empty filters or queries. + // This operation doesn't accept empty queries or filters. It's more efficient to get a list of object IDs with the + // [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` + // operation](tag/Records/operation/batch). // Required API Key ACLs: // - deleteIndex // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter deleteByParams: (body) // - returns: RequestBuilder @@ -1083,7 +1085,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - returns: DeletedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func deleteIndex(indexName: String, requestOptions: RequestOptions? = nil) async throws -> DeletedAtResponse { @@ -1099,11 +1101,16 @@ open class SearchClient { return body } - // Delete an existing index. + // Deletes an index and all its settings. - Deleting an index doesn't delete its analytics data. - If you try to + // delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has + // replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, + // you must first unlink it from its primary index before you can delete it. For more information, see [Delete + // replica + // indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). // Required API Key ACLs: // - deleteIndex // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - returns: RequestBuilder open func deleteIndexWithHTTPInfo( @@ -1139,8 +1146,8 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter objectID: (path) Unique record (object) identifier. + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter objectID: (path) Unique record identifier. /// - returns: DeletedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func deleteObject( @@ -1161,14 +1168,15 @@ open class SearchClient { return body } - // To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) - // instead. + // Deletes a record by its object ID. To delete more than one record, use the [`batch` + // operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` + // operation](#tag/Records/operation/deleteBy). // Required API Key ACLs: // - deleteObject // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter objectID: (path) Unique record (object) identifier. + // - parameter objectID: (path) Unique record identifier. // - returns: RequestBuilder open func deleteObjectWithHTTPInfo( @@ -1218,10 +1226,9 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter objectID: (path) Unique identifier of a rule object. - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func deleteRule( @@ -1244,17 +1251,16 @@ open class SearchClient { return body } - // Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + // Deletes a rule by its ID. To find the object ID for rules, use the [`search` // operation](#tag/Rules/operation/searchRules). // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter objectID: (path) Unique identifier of a rule object. // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - returns: RequestBuilder open func deleteRuleWithHTTPInfo( @@ -1323,7 +1329,7 @@ open class SearchClient { return body } - // Remove a source from the list of allowed sources. + // Deletes a source from the list of allowed sources. // Required API Key ACLs: // - admin // @@ -1363,10 +1369,9 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter objectID: (path) Unique identifier of a synonym object. - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) /// - returns: DeletedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func deleteSynonym( @@ -1389,17 +1394,16 @@ open class SearchClient { return body } - // Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` + // Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` // operation](#tag/Synonyms/operation/searchSynonyms). // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter objectID: (path) Unique identifier of a synonym object. // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - returns: RequestBuilder open func deleteSynonymWithHTTPInfo( @@ -1468,9 +1472,9 @@ open class SearchClient { return body } - // Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can - // request information for any of your application's keys. When authenticating with other API keys, you can only - // retrieve information for that key. + // Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request + // information for any of your application's keys. When authenticating with other API keys, you can only retrieve + // information for that key. // // // - parameter key: (path) API key. @@ -1521,11 +1525,7 @@ open class SearchClient { return body } - // Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - // and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - // [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - // and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - // features. + // Lists supported languages with their supported dictionary types and number of custom entries. // Required API Key ACLs: // - settings // - returns: RequestBuilder<[String: Languages]> @@ -1562,7 +1562,7 @@ open class SearchClient { return body } - // Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). + // Retrieves the languages for which standard dictionary entries are turned off. // Required API Key ACLs: // - settings // - returns: RequestBuilder @@ -1585,12 +1585,12 @@ open class SearchClient { ) } - /// - parameter offset: (query) First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. - /// (optional, default to 0) + /// - parameter offset: (query) First log entry to retrieve. The most recent entries are listed first. (optional, + /// default to 0) /// - parameter length: (query) Maximum number of entries to retrieve. (optional, default to 10) - /// - parameter indexName: (query) Index for which log entries should be retrieved. When omitted, log entries are - /// retrieved for all indices. (optional) - /// - parameter type: (query) Type of log entries to retrieve. When omitted, all log entries are retrieved. + /// - parameter indexName: (query) Index for which to retrieve log entries. By default, log entries are retrieved + /// for all indices. (optional) + /// - parameter type: (query) Type of log entries to retrieve. By default, all log entries are retrieved. /// (optional) /// - returns: GetLogsResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -1617,26 +1617,23 @@ open class SearchClient { } // The request must be authenticated by an API key with the [`logs` - // ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last - // seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your - // [operations + // ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the + // last + // seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations // quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - // but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) - // cluster, target the [DSN's - // endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). + // but doesn't appear in the logs itself. // Required API Key ACLs: // - logs // - // - parameter offset: (query) First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. - // (optional, default to 0) + // - parameter offset: (query) First log entry to retrieve. The most recent entries are listed first. (optional, + // default to 0) // // - parameter length: (query) Maximum number of entries to retrieve. (optional, default to 10) // - // - parameter indexName: (query) Index for which log entries should be retrieved. When omitted, log entries are - // retrieved for all indices. (optional) + // - parameter indexName: (query) Index for which to retrieve log entries. By default, log entries are retrieved for + // all indices. (optional) // - // - parameter type: (query) Type of log entries to retrieve. When omitted, all log entries are retrieved. - // (optional) + // - parameter type: (query) Type of log entries to retrieve. By default, all log entries are retrieved. (optional) // - returns: RequestBuilder open func getLogsWithHTTPInfo( @@ -1667,12 +1664,12 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter objectID: (path) Unique record (object) identifier. + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter objectID: (path) Unique record identifier. /// - parameter attributesToRetrieve: (query) Attributes to include with the records in the response. This is useful - /// to reduce the size of the API response. By default, all retrievable attributes are returned. - /// `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - /// won't be retrieved unless the request is authenticated with the admin API key. (optional) + /// to reduce the size of the API response. By default, all retrievable attributes are returned. + /// `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won't + /// be retrieved unless the request is authenticated with the admin API key. (optional) /// - returns: [String: String] @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func getObject( @@ -1695,18 +1692,21 @@ open class SearchClient { return body } - // To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). + // Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` + // operation](#tag/Records/operation/getObjects). // Required API Key ACLs: // - search // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter objectID: (path) Unique record (object) identifier. + // - parameter objectID: (path) Unique record identifier. // // - parameter attributesToRetrieve: (query) Attributes to include with the records in the response. This is useful - // to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` - // is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - // won't be retrieved unless the request is authenticated with the admin API key. (optional) + // to reduce the size of the API response. By default, all retrievable attributes are returned. + // `objectID` + // is always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless + // the + // request is authenticated with the admin API key. (optional) // - returns: RequestBuilder<[String: String]> open func getObjectWithHTTPInfo( @@ -1778,8 +1778,8 @@ open class SearchClient { return body } - // Retrieve one or more records, potentially from different indices, in a single API operation. Results will be - // received in the same order as the requests. + // Retrieves one or more records, potentially from different indices. Records are returned in the same order as the + // requests. // Required API Key ACLs: // - search // @@ -1807,7 +1807,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter objectID: (path) Unique identifier of a rule object. /// - returns: Rule @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -1825,12 +1825,12 @@ open class SearchClient { return body } - // Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` + // Retrieves a rule by its ID. To find the object ID of rules, use the [`search` // operation](#tag/Rules/operation/searchRules). // Required API Key ACLs: // - settings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter objectID: (path) Unique identifier of a rule object. // - returns: RequestBuilder @@ -1882,7 +1882,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - returns: IndexSettings @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func getSettings(indexName: String, requestOptions: RequestOptions? = nil) async throws -> IndexSettings { @@ -1898,12 +1898,11 @@ open class SearchClient { return body } - // Return an object containing an index's [configuration - // settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). + // Retrieves an object with non-null index settings. // Required API Key ACLs: // - search // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - returns: RequestBuilder open func getSettingsWithHTTPInfo( @@ -1951,7 +1950,7 @@ open class SearchClient { return body } - // Get all allowed sources (IP addresses). + // Retrieves all allowed IP addresses with access to your application. // Required API Key ACLs: // - admin // - returns: RequestBuilder<[Source]> @@ -1974,7 +1973,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter objectID: (path) Unique identifier of a synonym object. /// - returns: SynonymHit @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -1996,12 +1995,12 @@ open class SearchClient { return body } - // Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` + // Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` // operation](#tag/Synonyms/operation/searchSynonyms). // Required API Key ACLs: // - settings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter objectID: (path) Unique identifier of a synonym object. // - returns: RequestBuilder @@ -2053,7 +2052,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter taskID: (path) Unique task identifier. /// - returns: GetTaskResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -2075,12 +2074,13 @@ open class SearchClient { return body } - // Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the - // status of that task. + // Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or + // indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks' + // responses include a task ID that you can use to check the status. // Required API Key ACLs: // - addObject // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter taskID: (path) Unique task identifier. // - returns: RequestBuilder @@ -2141,8 +2141,8 @@ open class SearchClient { return body } - // Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds - // to get the data from the different clusters, the response isn't real-time. + // Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to + // get the data from the different clusters, the response isn't real-time. // Required API Key ACLs: // - admin // - returns: RequestBuilder @@ -2165,7 +2165,7 @@ open class SearchClient { ) } - /// - parameter userID: (path) userID to assign. + /// - parameter userID: (path) User ID to assign. /// - returns: UserId @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func getUserId(userID: String, requestOptions: RequestOptions? = nil) async throws -> UserId { @@ -2178,12 +2178,12 @@ open class SearchClient { return body } - // Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the + // Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the // different clusters, the response isn't real-time. // Required API Key ACLs: // - admin // - // - parameter userID: (path) userID to assign. + // - parameter userID: (path) User ID to assign. // - returns: RequestBuilder open func getUserIdWithHTTPInfo( @@ -2219,8 +2219,8 @@ open class SearchClient { ) } - /// - parameter getClusters: (query) Indicates whether to include the cluster's pending mapping state in the - /// response. (optional) + /// - parameter getClusters: (query) Whether to include the cluster's pending mapping state in the response. + /// (optional) /// - returns: HasPendingMappingsResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func hasPendingMappings( @@ -2244,8 +2244,8 @@ open class SearchClient { // Required API Key ACLs: // - admin // - // - parameter getClusters: (query) Indicates whether to include the cluster's pending mapping state in the - // response. (optional) + // - parameter getClusters: (query) Whether to include the cluster's pending mapping state in the response. + // (optional) // - returns: RequestBuilder open func hasPendingMappingsWithHTTPInfo( @@ -2282,7 +2282,7 @@ open class SearchClient { return body } - // List all API keys associated with your Algolia application, including their permissions and restrictions. + // Lists all API keys associated with your Algolia application, including their permissions and restrictions. // Required API Key ACLs: // - admin // - returns: RequestBuilder @@ -2318,7 +2318,7 @@ open class SearchClient { return body } - // List the available clusters in a multi-cluster setup. + // Lists the available clusters in a multi-cluster setup. // Required API Key ACLs: // - admin // - returns: RequestBuilder @@ -2341,10 +2341,9 @@ open class SearchClient { ) } - /// - parameter page: (query) Returns the requested page number. The page size is determined by the - /// `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response - /// attribute. When `page` is null, the API response is not paginated. (optional) - /// - parameter hitsPerPage: (query) Maximum number of hits per page. (optional, default to 100) + /// - parameter page: (query) Requested page of the API response. If `null`, the API response is not + /// paginated. (optional) + /// - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) /// - returns: ListIndicesResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func listIndices( @@ -2365,15 +2364,15 @@ open class SearchClient { return body } - // List indices in an Algolia application. + // Lists all indices in the current Algolia application. The request follows any index restrictions of the API key + // you use to make the request. // Required API Key ACLs: // - listIndexes // - // - parameter page: (query) Returns the requested page number. The page size is determined by the - // `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response - // attribute. When `page` is null, the API response is not paginated. (optional) + // - parameter page: (query) Requested page of the API response. If `null`, the API response is not + // paginated. (optional) // - // - parameter hitsPerPage: (query) Maximum number of hits per page. (optional, default to 100) + // - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) // - returns: RequestBuilder open func listIndicesWithHTTPInfo( @@ -2400,10 +2399,9 @@ open class SearchClient { ) } - /// - parameter page: (query) Returns the requested page number. The page size is determined by the - /// `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response - /// attribute. When `page` is null, the API response is not paginated. (optional) - /// - parameter hitsPerPage: (query) Maximum number of hits per page. (optional, default to 100) + /// - parameter page: (query) Requested page of the API response. If `null`, the API response is not + /// paginated. (optional) + /// - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) /// - returns: ListUserIdsResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func listUserIds( @@ -2424,16 +2422,15 @@ open class SearchClient { return body } - // List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data - // from the different clusters, the response isn't real-time. + // Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from + // the different clusters, the response isn't real-time. // Required API Key ACLs: // - admin // - // - parameter page: (query) Returns the requested page number. The page size is determined by the - // `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response - // attribute. When `page` is null, the API response is not paginated. (optional) + // - parameter page: (query) Requested page of the API response. If `null`, the API response is not + // paginated. (optional) // - // - parameter hitsPerPage: (query) Maximum number of hits per page. (optional, default to 100) + // - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) // - returns: RequestBuilder open func listUserIdsWithHTTPInfo( @@ -2479,9 +2476,8 @@ open class SearchClient { return body } - // To reduce the time spent on network round trips, you can perform several write actions in a single request. It's - // a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order - // they are specified. The supported actions are equivalent to the individual operations of the same name. + // Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the + // order they are specified. - Actions are equivalent to the individual API requests of the same name. // // // - parameter batchParams: (body) @@ -2507,7 +2503,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter operationIndexParams: (body) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -2529,17 +2525,25 @@ open class SearchClient { return body } - // This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, - // and rules to a `destination` index. If the destination index exists, it will be replaced, except for - // index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The - // choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - - // **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When - // considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - // on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + // Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are + // overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist yet, + // it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and + // default settings. - The API keys of the source index are merged with the existing keys in the destination index. + // - + // You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index + // that already has replicas. - Be aware of the [size + // limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). + // - + // Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) + // **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an + // index, the analytics data keep their original name and a new set of analytics data is started for the new name. + // To access the original analytics in the dashboard, create an index with the original name. - If the destination + // index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related + // guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). // Required API Key ACLs: // - addObject // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter operationIndexParams: (body) // - returns: RequestBuilder @@ -2578,11 +2582,11 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter objectID: (path) Unique record (object) identifier. - /// - parameter attributesToUpdate: (body) Object with attributes to update. - /// - parameter createIfNotExists: (query) Indicates whether to create a new record if it doesn't exist yet. - /// (optional, default to true) + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter objectID: (path) Unique record identifier. + /// - parameter attributesToUpdate: (body) Attributes with their values. + /// - parameter createIfNotExists: (query) Whether to create a new record if it doesn't exist. (optional, + /// default to true) /// - returns: UpdatedAtWithObjectIdResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func partialUpdateObject( @@ -2607,20 +2611,21 @@ open class SearchClient { return body } - // Add new attributes or update current ones in an existing record. You can use any first-level attribute but not - // nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - // the engine treats it as a replacement for its first-level ancestor. + // Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't + // exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, + // this method creates a new index. - You can use any first-level attribute but not nested attributes. If you + // specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. // Required API Key ACLs: // - addObject // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter objectID: (path) Unique record (object) identifier. + // - parameter objectID: (path) Unique record identifier. // - // - parameter attributesToUpdate: (body) Object with attributes to update. + // - parameter attributesToUpdate: (body) Attributes with their values. // - // - parameter createIfNotExists: (query) Indicates whether to create a new record if it doesn't exist yet. - // (optional, default to true) + // - parameter createIfNotExists: (query) Whether to create a new record if it doesn't exist. (optional, default + // to true) // - returns: RequestBuilder open func partialUpdateObjectWithHTTPInfo( @@ -2674,7 +2679,7 @@ open class SearchClient { ) } - /// - parameter userID: (path) userID to assign. + /// - parameter userID: (path) User ID to assign. /// - returns: RemoveUserIdResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func removeUserId(userID: String, requestOptions: RequestOptions? = nil) async throws -> RemoveUserIdResponse { @@ -2690,11 +2695,11 @@ open class SearchClient { return body } - // Remove a userID and its associated data from the multi-clusters. + // Deletes a user ID and its associated data from the clusters. // Required API Key ACLs: // - admin // - // - parameter userID: (path) userID to assign. + // - parameter userID: (path) User ID to assign. // - returns: RequestBuilder open func removeUserIdWithHTTPInfo( @@ -2749,7 +2754,7 @@ open class SearchClient { return body } - // Replace all allowed sources. + // Replaces the list of allowed sources. // Required API Key ACLs: // - admin // @@ -2792,8 +2797,8 @@ open class SearchClient { return body } - // Restore a deleted API key, along with its associated permissions. The request must be authenticated with the - // admin API key. + // Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API + // keys per application. If you create more, the oldest API keys are deleted and can't be restored. // Required API Key ACLs: // - admin // @@ -2832,8 +2837,10 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter body: (body) The Algolia record. + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter body: (body) The record, a schemaless object with attributes that are useful in the context of + /// search + /// and discovery. /// - returns: SaveObjectResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func saveObject( @@ -2854,17 +2861,20 @@ open class SearchClient { return body } - // Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia - // automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To - // add - // multiple records to your index in a single API request, use the [`batch` - // operation](#tag/Records/operation/batch). + // Adds a record to an index or replace it. - If the record doesn't have an object ID, a new record with an + // auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing + // record is replaced. - If a record with the specified object ID doesn't exist, a new record is added to your + // index. + // - If you add a record to an index that doesn't exist yet, a new index is created. To update _some_ attributes of + // a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple + // records, use the [`batch` operation](#tag/Records/operation/batch). // Required API Key ACLs: // - addObject // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter body: (body) The Algolia record. + // - parameter body: (body) The record, a schemaless object with attributes that are useful in the context of search + // and discovery. // - returns: RequestBuilder open func saveObjectWithHTTPInfo( @@ -2905,11 +2915,10 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter objectID: (path) Unique identifier of a rule object. /// - parameter rule: (body) - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) /// - returns: UpdatedRuleResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func saveRule( @@ -2934,18 +2943,18 @@ open class SearchClient { return body } - // To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). + // If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To + // create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter objectID: (path) Unique identifier of a rule object. // // - parameter rule: (body) // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - returns: RequestBuilder open func saveRuleWithHTTPInfo( @@ -2999,12 +3008,11 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter rules: (body) - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) - /// - parameter clearExistingRules: (query) Indicates whether existing rules should be deleted before adding this - /// batch. (optional) + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) + /// - parameter clearExistingRules: (query) Whether existing rules should be deleted before adding this batch. + /// (optional) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func saveRules( @@ -3029,19 +3037,19 @@ open class SearchClient { return body } - // Create or update multiple rules. + // Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new + // one. Otherwise, existing rules are replaced. // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter rules: (body) // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - // - parameter clearExistingRules: (query) Indicates whether existing rules should be deleted before adding this - // batch. (optional) + // - parameter clearExistingRules: (query) Whether existing rules should be deleted before adding this batch. + // (optional) // - returns: RequestBuilder open func saveRulesWithHTTPInfo( @@ -3083,11 +3091,10 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter objectID: (path) Unique identifier of a synonym object. /// - parameter synonymHit: (body) - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) /// - returns: SaveSynonymResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func saveSynonym( @@ -3112,22 +3119,19 @@ open class SearchClient { return body } - // Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - // to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an - // existing - // synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API - // request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). + // If a synonym with the specified object ID doesn't exist, Algolia adds a new one. Otherwise, the existing synonym + // is replaced. To add multiple synonyms in a single API request, use the [`batch` + // operation](#tag/Synonyms/operation/saveSynonyms). // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter objectID: (path) Unique identifier of a synonym object. // // - parameter synonymHit: (body) // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - returns: RequestBuilder open func saveSynonymWithHTTPInfo( @@ -3181,12 +3185,11 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter synonymHit: (body) - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) - /// - parameter replaceExistingSynonyms: (query) Indicates whether to replace all synonyms in the index with the - /// ones sent with this request. (optional) + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) + /// - parameter replaceExistingSynonyms: (query) Whether to replace all synonyms in the index with the ones sent + /// with this request. (optional) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func saveSynonyms( @@ -3211,19 +3214,19 @@ open class SearchClient { return body } - // Create or update multiple synonyms. + // If a synonym with the `objectID` doesn't exist, Algolia adds a new one. Otherwise, existing synonyms are + // replaced. // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter synonymHit: (body) // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - // - parameter replaceExistingSynonyms: (query) Indicates whether to replace all synonyms in the index with the ones - // sent with this request. (optional) + // - parameter replaceExistingSynonyms: (query) Whether to replace all synonyms in the index with the ones sent with + // this request. (optional) // - returns: RequestBuilder open func saveSynonymsWithHTTPInfo( @@ -3265,8 +3268,8 @@ open class SearchClient { ) } - /// - parameter searchMethodParams: (body) Query requests and strategies. Results will be received in the same order - /// as the queries. + /// - parameter searchMethodParams: (body) Muli-search request body. Results are returned in the same order as the + /// requests. /// - returns: SearchResponses @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func search( @@ -3285,12 +3288,15 @@ open class SearchClient { return body } - // Send multiple search queries to one or more indices. + // Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices + // for different purposes, such as, one index for products, another one for marketing content. - Multiple searches + // to + // the same index—for example, with different filters. // Required API Key ACLs: // - search // - // - parameter searchMethodParams: (body) Query requests and strategies. Results will be received in the same order - // as the queries. + // - parameter searchMethodParams: (body) Muli-search request body. Results are returned in the same order as the + // requests. // - returns: RequestBuilder open func searchWithHTTPInfo( @@ -3314,16 +3320,16 @@ open class SearchClient { ) } - /// - parameter dictionaryName: (path) Dictionary to search in. + /// - parameter dictionaryName: (path) Dictionary type in which to search. /// - parameter searchDictionaryEntriesParams: (body) - /// - returns: UpdatedAtResponse + /// - returns: SearchDictionaryEntriesResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func searchDictionaryEntries( dictionaryName: DictionaryType, searchDictionaryEntriesParams: SearchDictionaryEntriesParams, requestOptions: RequestOptions? = nil - ) async throws -> UpdatedAtResponse { - let response: Response = try await searchDictionaryEntriesWithHTTPInfo( + ) async throws -> SearchDictionaryEntriesResponse { + let response: Response = try await searchDictionaryEntriesWithHTTPInfo( dictionaryName: dictionaryName, searchDictionaryEntriesParams: searchDictionaryEntriesParams, requestOptions: requestOptions @@ -3336,24 +3342,20 @@ open class SearchClient { return body } - // Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - // entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - // [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - // or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - // dictionaries. + // Searches for standard and custom dictionary entries. // Required API Key ACLs: // - settings // - // - parameter dictionaryName: (path) Dictionary to search in. + // - parameter dictionaryName: (path) Dictionary type in which to search. // // - parameter searchDictionaryEntriesParams: (body) - // - returns: RequestBuilder + // - returns: RequestBuilder open func searchDictionaryEntriesWithHTTPInfo( dictionaryName: DictionaryType, searchDictionaryEntriesParams: SearchDictionaryEntriesParams, requestOptions userRequestOptions: RequestOptions? = nil - ) async throws -> Response { + ) async throws -> Response { var resourcePath = "/1/dictionaries/{dictionaryName}/search" let dictionaryNamePreEscape = "\(APIHelper.mapValueToPathItem(dictionaryName))" let dictionaryNamePostEscape = dictionaryNamePreEscape @@ -3380,8 +3382,9 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. - /// - parameter facetName: (path) Facet name. + /// - parameter indexName: (path) Name of the index on which to perform the operation. + /// - parameter facetName: (path) Facet attribute in which to search for values. This attribute must be included in + /// the `attributesForFaceting` index setting with the `searchable()` modifier. /// - parameter searchForFacetValuesRequest: (body) (optional) /// - returns: SearchForFacetValuesResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -3405,16 +3408,16 @@ open class SearchClient { return body } - // [Search for a facet's - // values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - // optionally restricting the returned values to those contained in records matching other search criteria. > - // **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. + // Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. + // You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have + // **more than 65 searchable facets and searchable attributes combined**. // Required API Key ACLs: // - search // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // - // - parameter facetName: (path) Facet name. + // - parameter facetName: (path) Facet attribute in which to search for values. This attribute must be included in + // the `attributesForFaceting` index setting with the `searchable()` modifier. // // - parameter searchForFacetValuesRequest: (body) (optional) // - returns: RequestBuilder @@ -3468,7 +3471,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter searchRulesParams: (body) (optional) /// - returns: SearchRulesResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -3490,12 +3493,11 @@ open class SearchClient { return body } - // Search for rules in your index. You can control the search with parameters. To list all rules, send an empty - // request body. + // Searches for rules in your index. // Required API Key ACLs: // - settings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter searchRulesParams: (body) (optional) // - returns: RequestBuilder @@ -3535,7 +3537,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter searchParams: (body) (optional) /// - returns: SearchResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -3557,11 +3559,13 @@ open class SearchClient { return body } - // Return records that match the query. + // Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 + // hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the + // `paginatedLimitedTo` index setting. // Required API Key ACLs: // - search // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter searchParams: (body) (optional) // - returns: RequestBuilder @@ -3601,7 +3605,7 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter searchSynonymsParams: (body) Body of the `searchSynonyms` operation. (optional) /// - returns: SearchSynonymsResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -3623,12 +3627,11 @@ open class SearchClient { return body } - // Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, - // send an empty request body. + // Searches for synonyms in your index. // Required API Key ACLs: // - settings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter searchSynonymsParams: (body) Body of the `searchSynonyms` operation. (optional) // - returns: RequestBuilder @@ -3687,11 +3690,12 @@ open class SearchClient { return body } - // Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. - // To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built - // every - // 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search - // will show an old value until the next time the mapping is rebuilt (every 12 hours). + // Since it can take a few seconds to get the data from the different clusters, the response isn't real-time. To + // ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every + // 12 + // hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search + // will + // show an old value until the next time the mapping is rebuilt (every 12 hours). // Required API Key ACLs: // - admin // @@ -3738,7 +3742,7 @@ open class SearchClient { return body } - // Set stop word settings for a specific language. + // Turns standard stop word dictionary entries on or off for a given language. // Required API Key ACLs: // - editSettings // @@ -3765,10 +3769,9 @@ open class SearchClient { ) } - /// - parameter indexName: (path) Index on which to perform the request. + /// - parameter indexName: (path) Name of the index on which to perform the operation. /// - parameter indexSettings: (body) - /// - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - /// indices. (optional) + /// - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) /// - returns: UpdatedAtResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func setSettings( @@ -3791,17 +3794,17 @@ open class SearchClient { return body } - // Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - // Specifying null for a setting resets it to its default value. + // Update the specified index settings. Index settings that you don't specify are left unchanged. Specify `null` to + // reset a setting to its default value. For best performance, update the index settings before you add new records + // to your index. // Required API Key ACLs: // - editSettings // - // - parameter indexName: (path) Index on which to perform the request. + // - parameter indexName: (path) Name of the index on which to perform the operation. // // - parameter indexSettings: (body) // - // - parameter forwardToReplicas: (query) Indicates whether changed index settings are forwarded to the replica - // indices. (optional) + // - parameter forwardToReplicas: (query) Whether changes are applied to replica indices. (optional) // - returns: RequestBuilder open func setSettingsWithHTTPInfo( @@ -3863,8 +3866,8 @@ open class SearchClient { return body } - // Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default - // value. The request must be authenticated with the admin API key. + // Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default + // value. // Required API Key ACLs: // - admin // diff --git a/snippets/csharp/src/Search.cs b/snippets/csharp/src/Search.cs index af083d9ae8..df3992852f 100644 --- a/snippets/csharp/src/Search.cs +++ b/snippets/csharp/src/Search.cs @@ -1047,8 +1047,8 @@ public async Task SnippetForSearchClientSearchDictionaryEntries() // Call the API var response = await client.SearchDictionaryEntriesAsync( - Enum.Parse("Compounds"), - new SearchDictionaryEntriesParams { Query = "foo", } + Enum.Parse("Stopwords"), + new SearchDictionaryEntriesParams { Query = "about", } ); // SEPARATOR< } diff --git a/snippets/dart/lib/search.dart b/snippets/dart/lib/search.dart index 4220895b76..150d3d08bb 100644 --- a/snippets/dart/lib/search.dart +++ b/snippets/dart/lib/search.dart @@ -955,9 +955,9 @@ void snippetForsearchDictionaryEntries() async { // Call the API final response = await client.searchDictionaryEntries( - dictionaryName: DictionaryType.fromJson("compounds"), + dictionaryName: DictionaryType.fromJson("stopwords"), searchDictionaryEntriesParams: SearchDictionaryEntriesParams( - query: "foo", + query: "about", ), ); // SEPARATOR< diff --git a/snippets/go/src/search.go b/snippets/go/src/search.go index aee3fec1cf..bdae205ad5 100644 --- a/snippets/go/src/search.go +++ b/snippets/go/src/search.go @@ -1493,8 +1493,8 @@ func SnippetForSearchDictionaryEntriesOfSearch() { // Call the API resp, err := client.SearchDictionaryEntries(client.NewApiSearchDictionaryEntriesRequest( - search.DictionaryType("compounds"), - search.NewEmptySearchDictionaryEntriesParams().SetQuery("foo"), + search.DictionaryType("stopwords"), + search.NewEmptySearchDictionaryEntriesParams().SetQuery("about"), )) if err != nil { // handle the eventual error diff --git a/snippets/java/src/test/java/com/algolia/Search.java b/snippets/java/src/test/java/com/algolia/Search.java index 652300e785..dc16d583c7 100644 --- a/snippets/java/src/test/java/com/algolia/Search.java +++ b/snippets/java/src/test/java/com/algolia/Search.java @@ -778,7 +778,7 @@ void snippetForSearchDictionaryEntries() { SearchClient client = new SearchClient("YOUR_APP_ID", "YOUR_API_KEY"); // Call the API - client.searchDictionaryEntries(DictionaryType.fromValue("compounds"), new SearchDictionaryEntriesParams().setQuery("foo")); + client.searchDictionaryEntries(DictionaryType.fromValue("stopwords"), new SearchDictionaryEntriesParams().setQuery("about")); // SEPARATOR< } diff --git a/snippets/javascript/src/search.ts b/snippets/javascript/src/search.ts index 270960e655..18443a1d96 100644 --- a/snippets/javascript/src/search.ts +++ b/snippets/javascript/src/search.ts @@ -987,8 +987,8 @@ export async function snippetForsearchDictionaryEntries(): Promise { // Call the API const response = await client.searchDictionaryEntries({ - dictionaryName: 'compounds', - searchDictionaryEntriesParams: { query: 'foo' }, + dictionaryName: 'stopwords', + searchDictionaryEntriesParams: { query: 'about' }, }); // use typed response diff --git a/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Search.kt b/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Search.kt index b183773db4..326ef25844 100644 --- a/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Search.kt +++ b/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Search.kt @@ -1050,9 +1050,9 @@ class SnippetSearchClient { // Call the API var response = client.searchDictionaryEntries( - dictionaryName = DictionaryType.entries.first { it.value == "compounds" }, + dictionaryName = DictionaryType.entries.first { it.value == "stopwords" }, searchDictionaryEntriesParams = SearchDictionaryEntriesParams( - query = "foo", + query = "about", ), ) diff --git a/snippets/php/src/Search.php b/snippets/php/src/Search.php index 616301d8c6..936eab5f38 100644 --- a/snippets/php/src/Search.php +++ b/snippets/php/src/Search.php @@ -1253,8 +1253,8 @@ public function snippetForSearchDictionaryEntries() // Call the API $response = $client->searchDictionaryEntries( - 'compounds', - ['query' => 'foo', + 'stopwords', + ['query' => 'about', ], ); diff --git a/snippets/python/search.py b/snippets/python/search.py index 073cbe89ed..371f65297b 100644 --- a/snippets/python/search.py +++ b/snippets/python/search.py @@ -1374,9 +1374,9 @@ async def snippet_for_search_dictionary_entries(): # Call the API resp = await _client.search_dictionary_entries( - dictionary_name="compounds", + dictionary_name="stopwords", search_dictionary_entries_params={ - "query": "foo", + "query": "about", }, ) diff --git a/snippets/ruby/search.rb b/snippets/ruby/search.rb index 0a26508b64..2cf6251923 100644 --- a/snippets/ruby/search.rb +++ b/snippets/ruby/search.rb @@ -1100,8 +1100,8 @@ def snippet_for_search_dictionary_entries # Call the API resp = client.search_dictionary_entries( - 'compounds', - SearchDictionaryEntriesParams.new(query: "foo") + 'stopwords', + SearchDictionaryEntriesParams.new(query: "about") ) # use the class directly diff --git a/snippets/scala/src/main/scala/Search.scala b/snippets/scala/src/main/scala/Search.scala index d5e0ce2165..483af6b664 100644 --- a/snippets/scala/src/main/scala/Search.scala +++ b/snippets/scala/src/main/scala/Search.scala @@ -1157,9 +1157,9 @@ class SnippetSearchClient { // Call the API val res = client.searchDictionaryEntries( - dictionaryName = DictionaryType.withName("compounds"), + dictionaryName = DictionaryType.withName("stopwords"), searchDictionaryEntriesParams = SearchDictionaryEntriesParams( - query = "foo" + query = "about" ) ) diff --git a/snippets/swift/Sources/Search.swift b/snippets/swift/Sources/Search.swift index a82bc45bbc..34f048afb9 100644 --- a/snippets/swift/Sources/Search.swift +++ b/snippets/swift/Sources/Search.swift @@ -961,9 +961,9 @@ final class SearchClientSnippet { // Call the API _ = try await client.searchDictionaryEntries( - dictionaryName: DictionaryType.compounds, + dictionaryName: DictionaryType.stopwords, searchDictionaryEntriesParams: SearchDictionaryEntriesParams( - query: "foo" + query: "about" ) ) // SEPARATOR< diff --git a/specs/bundled/abtesting.doc.yml b/specs/bundled/abtesting.doc.yml index 19171e9935..0477671884 100644 --- a/specs/bundled/abtesting.doc.yml +++ b/specs/bundled/abtesting.doc.yml @@ -32,14 +32,15 @@ components: Offset: in: query name: offset - description: Position of the starting record. Used for paging. 0 is the first record. + description: Position of the first item to return. schema: type: integer default: 0 + minimum: 0 Limit: in: query name: limit - description: Number of records to return (page size). + description: Number of items to return. schema: type: integer default: 10 @@ -440,9 +441,10 @@ components: description: > Unique identifier of a task. + A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the - `task` operation and this `taskID`. + [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ABTestResponse: type: object additionalProperties: false diff --git a/specs/bundled/abtesting.yml b/specs/bundled/abtesting.yml index d851bd08ad..a051449099 100644 --- a/specs/bundled/abtesting.yml +++ b/specs/bundled/abtesting.yml @@ -32,14 +32,15 @@ components: Offset: in: query name: offset - description: Position of the starting record. Used for paging. 0 is the first record. + description: Position of the first item to return. schema: type: integer default: 0 + minimum: 0 Limit: in: query name: limit - description: Number of records to return (page size). + description: Number of items to return. schema: type: integer default: 10 @@ -440,9 +441,10 @@ components: description: > Unique identifier of a task. + A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the - `task` operation and this `taskID`. + [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. ABTestResponse: type: object additionalProperties: false diff --git a/specs/bundled/algoliasearch.yml b/specs/bundled/algoliasearch.yml index 21c89bf996..4f8e504083 100644 --- a/specs/bundled/algoliasearch.yml +++ b/specs/bundled/algoliasearch.yml @@ -1,19 +1,148 @@ openapi: 3.0.2 info: title: Search API - description: >- - Use the Search REST API to manage your data (indices and records), - implement search, and improve relevance (with Rules, synonyms, and language - dictionaries). + description: > + The Algolia Search API lets you search, configure, and mange your indices + and records. - Although Algolia provides a REST API, you should use the official open - source API [clients, libraries, and - tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) - instead. + # Client libraries - There's no [SLA](https://www.algolia.com/policies/sla/) if you use the REST - API directly. + + Use Algolia's API clients and libraries to reliably integrate Algolia's APIs + with your apps. + + The official API clients are covered by Algolia's [Service Level + Agreement](https://www.algolia.com/policies/sla/). + + + See: [Algolia's + ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) + + + # Base URLs + + + The base URLs for making requests to the Search API are: + + + - `https://{APPLICATION_ID}.algolia.net` + + - `https://{APPLICATION_ID}-dsn.algolia.net`. + If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra), + this ensures that requests are sent to servers closest to users. + + Both URLs provide high availability by distributing requests with load + balancing. + + + **All requests must use HTTPS.** + + + # Retry strategy + + + To guarantee a high availability, implement a retry strategy for all API + requests using the URLs of your servers as fallbacks: + + + - `https://{APPLICATION_ID}-1.algolianet.com` + + - `https://{APPLICATION_ID}-2.algolianet.com` + + - `https://{APPLICATION_ID}-3.algolianet.com` + + + These URLs use a different DNS provider than the primary URLs. + + You should randomize this list to ensure an even load across the three + servers. + + + All Algolia API clients implement this retry strategy. + + + # Authentication + + + To authenticate your API requests, add these headers: + + +
+ +
x-algolia-application-id
+ +
Your Algolia application ID.
+ +
x-algolia-api-key
+ +
+ + An API key with the necessary permissions to make the request. + + The required access control list (ACL) to make a request is listed in each + endpoint's reference. + +
+ +
+ + + You can find your application ID and API key in the [Algolia + dashboard](https://dashboard.algolia.com/account). + + + # Request format + + + Depending on the endpoint, request bodies are either JSON objects or arrays + of JSON objects, + + + # Parameters + + + Parameters are passed as query parameters for GET and DELETE requests, + + and in the request body for POST and PUT requests. + + + Query parameters must be + [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). + + Non-ASCII characters must be UTF-8 encoded. + + Plus characters (`+`) are interpreted as spaces. + + Arrays as query parameters must be one of: + + + - A comma-separated string: `attributesToRetrieve=title,description` + + - A URL-encoded JSON array: + `attributesToRetrieve=%5B%22title%22,%22description%22%D` + + + # Response status and errors + + + The Search API returns JSON responses. + + Since JSON doesn't guarantee any specific ordering, don't rely on the order + of attributes in the API response. + + + Successful responses return a `2xx` status. Client errors return a `4xx` + status. Server errors are indicated by a `5xx` status. + + Error responses have a `message` property with more information. + + + # Version + + + The current version of the Search API is version 1, as indicated by the + `/1/` in each endpoint's URL. version: 1.0.0 components: securitySchemes: @@ -44,15 +173,15 @@ components: IndexName: name: indexName in: path - description: Index on which to perform the request. + description: Name of the index on which to perform the operation. required: true schema: type: string - example: myIndexName + example: YourIndexName ObjectID: name: objectID in: path - description: Unique record (object) identifier. + description: Unique record identifier. required: true schema: type: string @@ -60,9 +189,7 @@ components: ForwardToReplicas: in: query name: forwardToReplicas - description: >- - Indicates whether changed index settings are forwarded to the replica - indices. + description: Whether changes are applied to replica indices. schema: type: boolean parameters_ObjectID: @@ -79,8 +206,8 @@ components: schema: type: boolean description: >- - Indicates whether to replace all synonyms in the index with the ones - sent with this request. + Whether to replace all synonyms in the index with the ones sent with + this request. KeyString: in: path name: key @@ -93,34 +220,29 @@ components: in: path name: objectID description: Unique identifier of a rule object. - example: a-rule-id required: true schema: - type: string + $ref: '#/components/schemas/ruleID' ClearExistingRules: in: query name: clearExistingRules required: false schema: type: boolean - description: >- - Indicates whether existing rules should be deleted before adding this - batch. + description: Whether existing rules should be deleted before adding this batch. DictionaryName: in: path name: dictionaryName - description: Dictionary to search in. + description: Dictionary type in which to search. required: true schema: $ref: '#/components/schemas/dictionaryType' Page: in: query name: page - description: > - Returns the requested page number. The page size is determined by the - `hitsPerPage` parameter. You can see the number of available pages in - the `nbPages` response attribute. When `page` is null, the API response - is not paginated. + description: | + Requested page of the API response. + If `null`, the API response is not paginated. schema: type: integer minimum: 0 @@ -129,13 +251,13 @@ components: HitsPerPage: in: query name: hitsPerPage - description: Maximum number of hits per page. + description: Number of hits per page. schema: type: integer default: 100 UserIDInHeader: name: X-Algolia-User-ID - description: userID to assign. + description: User ID to assign. in: header required: true schema: @@ -143,7 +265,7 @@ components: pattern: ^[a-zA-Z0-9 \-*.]+$ UserIDInPath: name: userID - description: userID to assign. + description: User ID to assign. in: path required: true schema: @@ -165,6 +287,7 @@ components: default: '' searchParamsString: type: object + title: Search parameters as query string additionalProperties: false x-discriminator-fields: - params @@ -173,7 +296,7 @@ components: $ref: '#/components/schemas/paramsAsString' query: type: string - description: Text to search for in an index. + description: Search query. default: '' x-categories: - Search @@ -186,13 +309,53 @@ components: filters: type: string description: > - [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) - the query with numeric, facet, or tag filters. + Filter the search so that only records with matching values are included + in the results. + + + These filters are supported: + + + - **Numeric filters.** ` `, where `` is one of + `<`, `<=`, `=`, `!=`, `>`, `>=`. + + - **Ranges.** `: TO ` where `` and `` + are the lower and upper limits of the range (inclusive). + + - **Facet filters.** `:` where `` is a facet + attribute (case-sensitive) and `` a facet value. + + - **Tag filters.** `_tags:` or just `` (case-sensitive). + + - **Boolean filters.** `: true | false`. + + + You can combine filters with `AND`, `OR`, and `NOT` operators with the + following restrictions: + + + - You can only combine filters of the same type with `OR`. + **Not supported:** `facet:value OR num > 3`. + - You can't use `NOT` with combinations of filters. + **Not supported:** `NOT(facet:value OR facet:value)` + - You can't combine conjunctions (`AND`) with `OR`. + **Not supported:** `facet:value OR (facet:value AND facet:value)` + + Use quotes around your filters, if the facet attribute name or facet + value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. + + If a facet attribute is an array, the filter matches if it matches at + least one element of the array. + + + For more information, see + [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). example: (category:Book OR category:Ebook) AND _tags:published default: '' x-categories: - Filtering searchFiltersArrayString: + title: search filter array type: array items: type: string @@ -202,14 +365,35 @@ components: - type: string listOfSearchFilters: type: array + title: search filters items: $ref: '#/components/schemas/mixedSearchFilters' facetFilters: description: > - [Filter hits by facet - value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + Filter the search by facet values, so that only records with the same + facet values are retrieved. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. + + - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 + AND filter3`. + + - `facet:-value` is interpreted as `NOT facet:value`. + + + While it's best to avoid attributes that start with a `-`, you can still + filter them by escaping with a backslash: + + `facet:\-value`. example: - - category:Book + - + - category:Book + - category:-Movie - author:John Doe oneOf: - $ref: '#/components/schemas/listOfSearchFilters' @@ -218,13 +402,24 @@ components: - Filtering optionalFilters: description: > - Create filters to boost or demote records. + Filters to promote or demote records in the search results. + + + Optional filters work like facet filters, but they don't exclude records + from the search results. + + Records that match the optional filter rank before records that don't + match. + If you're using a negative filter `facet:-value`, matching records rank + after records that don't match. - Records that match the filter are ranked higher for positive and lower - for negative optional filters. In contrast to regular filters, records - that don't match the optional filter are still included in the results, - only their ranking is affected. + + - Optional filters don't work on virtual replicas. + + - Optional filters are applied _after_ sort-by attributes. + + - Optional filters don't work with numeric attributes. example: - category:Book - author:John Doe @@ -235,8 +430,20 @@ components: - Filtering numericFilters: description: > - [Filter on numeric - attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + Filter by numeric facets. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, + `>=`. Comparsions are precise up to 3 decimals. + + You can also provide ranges: `facet: TO `. The range + includes the lower and upper boundaries. + + The same combination rules apply as for `facetFilters`. example: - - inStock = 1 @@ -249,8 +456,19 @@ components: - Filtering tagFilters: description: > - [Filter hits by - tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + Filter the search by values of the special `_tags` attribute. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + Different from regular facets, `_tags` can only be used for filtering + (including or excluding records). + + You won't get a facet count. + + The same combination and escaping rules apply as for `facetFilters`. example: - - Book @@ -263,64 +481,104 @@ components: - Filtering page: type: integer - description: Page to retrieve (the first page is `0`, not `1`). + description: Page of search results to retrieve. default: 0 + minimum: 0 x-categories: - Pagination aroundLatLng: type: string - description: >- - Search for entries [around a central - location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - enabling a geographical search within a circular area. + description: > + Coordinates for the center of a circle, expressed as a comma-separated + string of latitude and longitude. + + + Only records included within circle around this central location are + included in the results. + + The radius of the circle is determined by the `aroundRadius` and + `minimumAroundRadius` settings. + + This parameter is ignored if you also specify `insidePolygon` or + `insideBoundingBox`. example: 40.71,-74.01 default: '' x-categories: - Geo-Search aroundLatLngViaIP: type: boolean - description: >- - Search for entries around a location. The location is automatically - computed from the requester's IP address. + description: Whether to obtain the coordinates from the request's IP address. default: false x-categories: - Geo-Search aroundRadiusAll: + title: all type: string + description: >- + Return all records with a valid `_geoloc` attribute. Don't filter by + distance. enum: - all aroundRadius: description: > - [Maximum - radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - for a geographical search (in meters). + Maximum radius for a search around a central location. + + + This parameter works in combination with the `aroundLatLng` and + `aroundLatLngViaIP` parameters. + + By default, the search radius is determined automatically from the + density of hits around the central location. + + The search radius is small if there are many hits close to the central + coordinates. oneOf: - type: integer minimum: 1 + description: Maximum search radius around a central location in meters. - $ref: '#/components/schemas/aroundRadiusAll' x-categories: - Geo-Search aroundPrecisionFromValue: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + title: range objects type: array items: type: object + description: >- + Range object with lower and upper values in meters to define custom + ranges. properties: from: type: integer + description: >- + Lower boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. + example: 20 value: type: integer + description: >- + Upper boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. aroundPrecision: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + description: > + Precision of a coordinate-based search in meters to group results with + similar distances. + + + The Geo ranking criterion considers all matches within the same range of + distances to be equal. oneOf: - type: integer default: 10 + description: > + Distance in meters to group results by similar distances. + + + For example, if you set `aroundPrecision` to 100, records wihin 100 + meters to the central coordinate are considered to have the same + distance, + + as are records between 100 and 199 meters. - $ref: '#/components/schemas/aroundPrecisionFromValue' x-categories: - Geo-Search @@ -329,12 +587,23 @@ components: items: type: array items: + minItems: 4 + maxItems: 4 type: number format: double - description: >- - Search inside a [rectangular - area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates for a rectangular area in which to search. + + + Each bounding box is defined by the two opposite points of its diagonal, + and expressed as latitude and longitude pair: + + `[p1 lat, p1 long, p2 lat, p2 long]`. + + Provide multiple bounding boxes as nested arrays. + + For more information, see [rectangular + area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). example: - - 47.3165 @@ -353,12 +622,23 @@ components: items: type: array items: + minItems: 6 + maxItems: 20000 type: number format: double - description: >- - Search inside a - [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates of a polygon in which to search. + + + Polygons are defined by 3 to 10,000 points. Each point is represented by + its latitude and longitude. + + Provide multiple polygons as nested arrays. + + For more information, see [filtering inside + polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + + This parameter is ignored, if you also specify `insideBoundingBox`. example: - - 47.3165 @@ -378,11 +658,15 @@ components: - Geo-Search userToken: type: string - description: >- - Associates a [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) - with the current search. - example: '123456' + description: > + Unique pseudonymous or anonymous user identifier. + + + This helps with analytics and click and conversion events. + + For more information, see [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + example: test-user-123 x-categories: - Personalization baseSearchParamsWithoutQuery: @@ -391,8 +675,29 @@ components: properties: similarQuery: type: string - description: Overrides the query parameter and performs a more generic search. + description: > + Keywords to be used instead of the search query to conduct a more + broader search. + + + Using the `similarQuery` parameter changes other settings: + + + - `queryType` is set to `prefixNone`. + + - `removeStopWords` is set to true. + + - `words` is set as the first ranking criterion. + + - All remaining words are treated as `optionalWords`. + + + Since the `similarQuery` is supposed to do a broad search, they + usually return many results. + + Combine it with `filters` to narrow down the list of results. default: '' + example: comedy drama crime Macy Buscemi x-categories: - Search filters: @@ -408,12 +713,15 @@ components: sumOrFiltersScores: type: boolean description: > - Determines how to calculate [filter - scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + Whether to sum all filter scores. + + + If true, all filter scores are summed. - If `false`, maximum score is kept. + Otherwise, the maximum filter score is kept. - If `true`, score is summed. + For more information, see [filter + scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). default: false x-categories: - Filtering @@ -424,9 +732,7 @@ components: example: - title - author - description: >- - Restricts a query to only look at a subset of your [searchable - attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + description: Restricts a search to a subset of your searchable attributes. default: [] x-categories: - Filtering @@ -434,21 +740,35 @@ components: type: array items: type: string - description: >- - Returns - [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - their facet values, and the number of matching facet values. + description: > + Facets for which to retrieve facet values that match the search + criteria and the number of matching facet values. + + + To retrieve all facets, use the wildcard character `*`. + + For more information, see + [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). default: [] + example: + - '*' x-categories: - Faceting facetingAfterDistinct: type: boolean description: > - Forces faceting to be applied after - [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - (with the distinct feature). Alternatively, the `afterDistinct` - [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - of `attributesForFaceting` allows for more granular control. + Whether faceting should be applied after deduplication with + `distinct`. + + + This leads to accurate facet counts when using faceting in + combination with `distinct`. + + It's usually better to use `afterDistinct` modifiers in the + `attributesForFaceting` setting, + + as `facetingAfterDistinct` only computes correct facet counts if all + records have the same facet values for the `attributeForDistinct`. default: false x-categories: - Faceting @@ -456,28 +776,12 @@ components: $ref: '#/components/schemas/page' offset: type: integer - description: > - Specifies the offset of the first hit to return. - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Position of the first hit to retrieve. x-categories: - Pagination length: type: integer - description: > - Sets the number of hits to retrieve (for use with `offset`). - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 x-categories: @@ -493,7 +797,7 @@ components: minimumAroundRadius: type: integer description: >- - Minimum radius (in meters) used for a geographical search when + Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. minimum: 1 x-categories: @@ -506,13 +810,19 @@ components: type: array items: type: string - description: >- - Changes the default values of parameters that work best for a - natural language query, such as `ignorePlurals`, `removeStopWords`, - `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These - parameters work well together when the query consists of fuller - natural language strings instead of keywords, for example when - processing voice search queries. + description: > + ISO language codes that adjust settings that are useful for + processing natural language queries (as opposed to keyword + searches): + + + - Sets `removeStopWords` and `ignorePlurals` to the list of provided + languages. + + - Sets `removeWordsIfNoResults` to `allOptional`. + + - Adds a `natural_language` attribute to `ruleContexts` and + `analyticsTags`. default: [] x-categories: - Languages @@ -520,19 +830,32 @@ components: type: array items: type: string - description: >- - Assigns [rule + description: > + Assigns a rule context to the search query. + + + [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - to search queries. + are strings that you can use to trigger matching rules. default: [] + example: + - mobile x-categories: - Rules personalizationImpact: type: integer - description: >- - Defines how much [Personalization affects - results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + description: > + Impact that Personalization should have on this search. + + + The higher this value is, the more Personalization determines the + ranking compared to other factors. + + For more information, see [Understanding Personalization + impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). default: 100 + minimum: 0 + maximum: 100 x-categories: - Personalization userToken: @@ -540,43 +863,32 @@ components: getRankingInfo: type: boolean description: >- - Incidates whether the search response includes [detailed ranking - information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + Whether the search response should include detailed ranking + information. default: false x-categories: - Advanced - explain: - type: array - items: - type: string - description: >- - Enriches the API's response with information about how the query was - processed. - default: [] - x-categories: - - Advanced synonyms: type: boolean - description: >- - Whether to take into account an index's synonyms for a particular - search. + description: Whether to take into account an index's synonyms for this search. default: true x-categories: - Advanced clickAnalytics: type: boolean - description: >- - Indicates whether a query ID parameter is included in the search - response. This is required for [tracking click and conversion - events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + description: > + Whether to include a `queryID` attribute in the response. + + + The query ID is a unique identifier for a search query and is + required for tracking [click and conversion + events](https://www.algolia.com/guides/sending-events/getting-started/). default: false x-categories: - Analytics analytics: type: boolean - description: >- - Indicates whether this query will be included in - [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + description: Whether this search will be included in Analytics. default: true x-categories: - Analytics @@ -593,14 +905,14 @@ components: percentileComputation: type: boolean description: >- - Whether to include or exclude a query from the processing-time - percentile computation. + Whether to include this search when calculating processing-time + percentiles. default: true x-categories: - Advanced enableABTest: type: boolean - description: Incidates whether this search will be considered in A/B testing. + description: Whether to enable A/B testing for this search. default: true x-categories: - Advanced @@ -618,37 +930,39 @@ components: - Pagination typoToleranceEnum: type: string + title: typo tolerance + description: | + - `min`. Return matches with the lowest number of typos. + For example, if you have matches without typos, only include those. + But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). + - `strict`. Return matches with the two lowest numbers of typos. + With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. enum: - min - strict typoTolerance: - description: >- - Controls whether [typo + description: > + Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + + + If typo tolerance is true, `min`, or `strict`, [word splitting and + concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + is also active. oneOf: - type: boolean default: true + description: >- + Whether typo tolerance is active. If true, matches with typos are + included in the search results and rank after exact matches. - $ref: '#/components/schemas/typoToleranceEnum' x-categories: - Typos ignorePlurals: - description: > - Treats singular, plurals, and other forms of declensions as matching - terms. - - `ignorePlurals` is used in conjunction with the `queryLanguages` - setting. - - _list_: language ISO codes for which ignoring plurals should be enabled. - This list will override any values that you may have set in - `queryLanguages`. _true_: enables the ignore plurals feature, where - singulars and plurals are considered equivalent ("foot" = "feet"). The - languages supported here are either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the ignore plurals feature, so that singulars and plurals aren't - considered to be the same ("foot" will not find "feet"). + description: | + Treat singular, plurals, and other forms of declensions as equivalent. + You should only use this feature for the languages used in your index. example: - ca - es @@ -656,26 +970,32 @@ components: - type: array items: type: string + description: | + ISO code for languages for which this feature should be active. + This overrides languages you set with `queryLanguages`. - type: boolean + description: > + If true, `ignorePlurals` is active for all languages included in + `queryLanguages`, or for all supported languages, if `queryLanguges` + is empty. + + If false, singulars, plurals, and other declensions won't be + considered equivalent. default: false x-categories: - Languages removeStopWords: description: > - Removes stop (common) words from the query before executing it. + Removes stop words from the search query. - `removeStopWords` is used in conjunction with the `queryLanguages` - setting. - _list_: language ISO codes for which stop words should be enabled. This - list will override any values that you may have set in `queryLanguages`. - _true_: enables the stop words feature, ensuring that stop words are - removed from consideration in a search. The languages supported here are - either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the stop words feature, allowing stop words to be taken into account - in a search. + Stop words are common words like articles, conjunctions, prepositions, + or pronouns that have little or no meaning on their own. + + In English, "the", "a", or "and" are stop words. + + + You should only use this feature for the languages used in your index. example: - ca - es @@ -683,8 +1003,17 @@ components: - type: array items: type: string + description: >- + ISO code for languages for which stop words should be removed. + This overrides languages you set in `queryLanguges`. - type: boolean default: false + description: > + If true, stop words are removed for all languages you included in + `queryLanguages`, or for all supported languages, if + `queryLanguages` is empty. + + If false, stop words are not removed. x-categories: - Languages queryType: @@ -693,9 +1022,23 @@ components: - prefixLast - prefixAll - prefixNone - description: >- - Determines how query words are [interpreted as - prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + description: > + Determines if and how query words are interpreted as prefixes. + + + By default, only the last query word is treated as prefix + (`prefixLast`). + + To turn off prefix search, use `prefixNone`. + + Avoid `prefixAll`, which treats all query words as prefixes. + + This might lead to counterintuitive results and makes your search + slower. + + + For more information, see [Prefix + searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). default: prefixLast x-categories: - Query strategy @@ -707,10 +1050,39 @@ components: - firstWords - allOptional example: firstWords - description: >- - Strategy to [remove - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - from the query when it doesn't match any hits. + description: > + Strategy for removing words from the query when it doesn't return any + results. + + This helps to avoid returning empty search results. + + +
+ +
none
+ +
No words are removed when a query doesn't return results.
+ +
lastWords
+ +
Treat the last (then second to last, then third to last) word as + optional, until there are results or at most 5 words have been + removed.
+ +
firstWords
+ +
Treat the first (then second, then third) word as optional, until + there are results or at most 5 words have been removed.
+ +
allOptional
+ +
Treat all words as optional.
+ +
+ + + For more information, see [Remove words to improve + results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). default: none x-categories: - Query strategy @@ -719,21 +1091,26 @@ components: enum: - neuralSearch - keywordSearch - description: Search mode the index will use to query for results. + description: > + Search mode the index will use to query for results. + + + This setting only applies to indices, for which Algolia enabled + NeuralSearch for you. default: keywordSearch x-categories: - Query strategy semanticSearch: type: object - description: > - Settings for the semantic search part of NeuralSearch. Only used when - `mode` is _neuralSearch_. + description: | + Settings for the semantic search part of NeuralSearch. + Only used when `mode` is `neuralSearch`. properties: eventSources: - description: >- - Indices from which to collect click and conversion events. If null, - the current index and replica group will be used as the event - source. + description: | + Indices from which to collect click and conversion events. + + If null, the current index and all its replicas are used. nullable: true type: array items: @@ -744,10 +1121,51 @@ components: - attribute - none - word - description: >- + description: > Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - is computed when the query contains only one word. + is computed when the search query has only one word. + + +
+ +
attribute
+ +
+ + The Exact ranking criterion is 1 if the query word and attribute value + are the same. + + For example, a search for "road" will match the value "road", but not + "road trip". + +
+ +
none
+ +
+ + The Exact ranking criterion is ignored on single-word searches. + +
+ +
word
+ +
+ + The Exact ranking criterion is 1 if the query word is found in the + attribute value. + + The query word must have at least 3 characters and must not be a stop + word. + +
+ +
+ + + If `exactOnSingleWordQuery` is `word`, only exact matches will be + highlighted, partial and prefix matches won't. default: attribute x-categories: - Query strategy @@ -767,13 +1185,41 @@ components: x-categories: - Query strategy distinct: - description: >- - Enables [deduplication or grouping of results (Algolia's _distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + description: > + Determines how many records of a group are included in the search + results. + + + Records with the same value for the `attributeForDistinct` attribute are + considered a group. + + The `distinct` setting controls how many members of the group are + returned. + + This is useful for [deduplication and + grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + + + The `distinct` setting is ignored if `attributeForDistinct` is not set. example: 1 oneOf: - type: boolean + description: >- + Whether deduplication is turned on. If true, only one member of a + group is shown in the search results. - type: integer + description: > + Number of members of a group of records to include in the search + results. + + + - Don't use `distinct > 1` for records that might be [promoted by + rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/). + The number of hits won't be correct and faceting won't work as expected. + - With `distinct > 1`, the `hitsPerPage` parameter controls the + number of returned groups. + For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned. + Likewise, the `nbHits` response attribute contains the number of returned groups. minimum: 0 maximum: 4 default: 0 @@ -782,31 +1228,56 @@ components: maxFacetHits: type: integer description: >- - Maximum number of facet hits to return when [searching for facet + Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). maximum: 100 default: 10 x-categories: - Advanced order: - description: Pinned order of facet lists. + description: > + Explicit order of facets or facet values. + + + This setting lets you always show specific facets or facet values at the + top of the list. type: array items: type: string facets: - description: Ordering of facets (widgets). + description: Order of facet names. type: object additionalProperties: false properties: order: $ref: '#/components/schemas/order' sortRemainingBy: - description: | - How to display the remaining items: + description: > + Order of facet values that aren't explicitly positioned with the `order` + setting. + + +
+ +
count
+ +
+ + Order remaining facet values by decreasing count. + + The count is the number of matching records containing this facet value. + +
- - `count`: facet count (descending). - - `alpha`: alphabetical (ascending). - - `hidden`: show only pinned values. +
alpha
+ +
Sort facet values alphabetically.
+ +
hidden
+ +
Don't show facet values that aren't explicitly positioned.
+ +
. type: string enum: - count @@ -821,12 +1292,13 @@ components: sortRemainingBy: $ref: '#/components/schemas/sortRemainingBy' values: - description: Ordering of facet values within an individual facet. + description: Order of facet values. One object for each facet. type: object additionalProperties: + x-additionalPropertiesName: facet $ref: '#/components/schemas/value' facetOrdering: - description: Defines the ordering of facets (widgets). + description: Order of facet names and facet values in your UI. type: object additionalProperties: false properties: @@ -835,12 +1307,14 @@ components: values: $ref: '#/components/schemas/values' renderingContent: - description: >- - Extra content for the search UI, for example, to control the [ordering - and display of - facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - You can set a default value and dynamically override it with - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + description: > + Extra data that can be used in the search UI. + + + You can use this to control aspects of your search UI, such as, the + order of facet names and values + + without changing your frontend code. type: object additionalProperties: false properties: @@ -849,11 +1323,11 @@ components: x-categories: - Advanced reRankingApplyFilter: - description: >- - When [Dynamic - Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) - is enabled, only records that match these filters will be affected by - Dynamic Re-Ranking. + description: > + Restrict [Dynamic + Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) + to records that match these filters. + nullable: true oneOf: - $ref: '#/components/schemas/listOfSearchFilters' - type: string @@ -864,26 +1338,6 @@ components: type: object additionalProperties: false properties: - attributesForFaceting: - type: array - items: - type: string - example: - - author - - filterOnly(isbn) - - searchable(edition) - - afterDistinct(category) - - afterDistinct(searchable(publisher)) - description: > - Attributes used for - [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) - and the - [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - that can be applied: `filterOnly`, `searchable`, and - `afterDistinct`. - default: [] - x-categories: - - Faceting attributesToRetrieve: type: array items: @@ -892,10 +1346,22 @@ components: - author - title - content - description: >- - Attributes to include in the API response. To reduce the size of - your response, you can retrieve only some of the attributes. By - default, the response includes all attributes. + description: > + Attributes to include in the API response. + + + To reduce the size of your response, you can retrieve only some of + the attributes. + + + - `*` retrieves all attributes, except attributes included in the + `customRanking` and `unretrievableAttributes` settings. + + - To retrieve all attributes except a specific one, prefix the + attribute with a dash and combine it with the `*`: `["*", + "-ATTRIBUTE"]`. + + - The `objectID` attribute is always included. default: - '*' x-categories: @@ -904,9 +1370,46 @@ components: type: array items: type: string - description: >- - Determines the order in which Algolia [returns your - results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + description: > + Determines the order in which Algolia returns your results. + + + By default, each entry corresponds to a [ranking + criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + + The tie-breaking algorithm sequentially applies each criterion in + the order they're specified. + + If you configure a replica index for [sorting by an + attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + + you put the sorting attribute at the top of the list. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + Before you modify the default setting, + + you should test your changes in the dashboard, + + and by [A/B + testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). default: - typo - geo @@ -926,19 +1429,59 @@ components: - desc(popularity) - asc(price) description: > - Specifies the [Custom ranking - criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). - Use the `asc` and `desc` modifiers to specify the ranking order: - ascending or descending. + Attributes to use as [custom + ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). + + + The custom ranking attributes decide which items are shown first if + the other ranking criteria are equal. + + + Records with missing values for your selected custom ranking + attributes are always sorted last. + + Boolean attributes are sorted based on their alphabetical order. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + If you use two or more custom ranking attributes, [reduce the + precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + of your first attributes, + + or the other attributes will never be applied. default: [] x-categories: - Ranking relevancyStrictness: type: integer example: 90 - description: >- + description: > Relevancy threshold below which less relevant results aren't included in the results. + + + You can only set `relevancyStrictness` on [virtual replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + + Use this setting to strike a balance between the relevance and + number of returned results. default: 100 x-categories: - Ranking @@ -949,11 +1492,28 @@ components: example: - author - title + - conten - content - description: >- - Attributes to highlight. Strings that match the search query in the - attributes are highlighted by surrounding them with HTML tags - (`highlightPreTag` and `highlightPostTag`). + description: > + Attributes to highlight. + + + By default, all searchable attributes are highlighted. + + Use `*` to highlight all attributes or use an empty array `[]` to + turn off highlighting. + + + With highlighting, strings that match the search query are + surrounded by HTML tags defined by `highlightPreTag` and + `highlightPostTag`. + + You can use this to visually highlight matching parts of a search + query in your UI. + + + For more information, see [Highlighting and + snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). x-categories: - Highlighting and Snippeting attributesToSnippet: @@ -964,26 +1524,36 @@ components: - content:80 - description description: > - Attributes to _snippet_. 'Snippeting' is shortening the attribute to - a certain number of words. If not specified, the attribute is - shortened to the 10 words around the matching string but you can - specify the number. For example: `body:20`. + Attributes for which to enable snippets. + + + Snippets provide additional context to matched words. + + If you enable snippets, they include 10 words, including the matched + word. + + The matched word will also be wrapped by HTML tags for highlighting. + + You can adjust the number of words with the following notation: + `ATTRIBUTE:NUMBER`, + + where `NUMBER` is the number of words to be extracted. default: [] x-categories: - Highlighting and Snippeting highlightPreTag: type: string description: >- - HTML string to insert before the highlighted parts in all highlight - and snippet results. + HTML tag to insert before the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting highlightPostTag: type: string description: >- - HTML string to insert after the highlighted parts in all highlight - and snippet results. + HTML tag to insert after the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting @@ -995,9 +1565,11 @@ components: - Highlighting and Snippeting restrictHighlightAndSnippetArrays: type: boolean - description: >- - Restrict highlighting and snippeting to items that matched the - query. + description: > + Whether to restrict highlighting and snippeting to items that at + least partially matched the search query. + + By default, all items are highlighted and snippeted. default: false x-categories: - Highlighting and Snippeting @@ -1006,7 +1578,7 @@ components: minWordSizefor1Typo: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 4 @@ -1015,7 +1587,7 @@ components: minWordSizefor2Typos: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 8 @@ -1025,9 +1597,11 @@ components: $ref: '#/components/schemas/typoTolerance' allowTyposOnNumericTokens: type: boolean - description: >- - Whether to allow typos on numbers ("numeric tokens") in the query - string. + description: | + Whether to allow typos on numbers in the search query. + + Turn off this setting to reduce the number of irrelevant matches + when searching in large sets of similar numbers. default: true x-categories: - Typos @@ -1037,9 +1611,23 @@ components: type: string example: - sku - description: >- + description: > Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + + Returning only exact matches can help when: + + + - [Searching in hyphenated + attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + + - Reducing the number of matches when you have too many. + This can happen with attributes that are long blocks of text, such as product descriptions. + + Consider alternatives such as `disableTypoToleranceOnWords` or + adding synonyms if your attributes have intentional unusual + spellings that might look like typos. default: [] x-categories: - Typos @@ -1050,9 +1638,12 @@ components: keepDiacriticsOnCharacters: type: string example: øé - description: >- - Characters that the engine shouldn't automatically - [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: | + Characters for which diacritics should be preserved. + + By default, Algolia removes diacritics from letters. + For example, `é` becomes `e`. If this causes issues in your search, + you can specify characters that should keep their diacritics. default: '' x-categories: - Languages @@ -1062,39 +1653,64 @@ components: type: string example: - es - description: >- - Sets your user's search language. This adjusts language-specific - settings and features such as `ignorePlurals`, `removeStopWords`, - and + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for language-specific settings such as plurals, stop words, and + word-detection dictionaries. + + + This setting sets a default list of languages used by the + `removeStopWords` and `ignorePlurals` settings. + + This setting also sets a dictionary for word detection in the + logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - word detection. + languages. + + To support this, you must place the CJK language **first**. + + + + **You should always specify a query language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages decompoundQuery: type: boolean description: > - [Splits compound - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - into their component word parts in the query. + Whether to split compound words into their building blocks. + + + For more information, see [Word + segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + + Word segmentation is supported for these languages: German, Dutch, + Finnish, Swedish, and Norwegian. default: true x-categories: - Languages enableRules: type: boolean - description: >- - Incidates whether - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) - are enabled. + description: Whether to enable rules. default: true x-categories: - Rules enablePersonalization: type: boolean - description: >- - Incidates whether - [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - is enabled. + description: Whether to enable Personalization. default: false x-categories: - Personalization @@ -1108,9 +1724,13 @@ components: $ref: '#/components/schemas/semanticSearch' advancedSyntax: type: boolean - description: >- - Enables the [advanced query - syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + description: > + Whether to support phrase matching and excluding words from search + queries. + + + Use the `advancedSyntaxFeatures` parameter to control which feature + is supported. default: false x-categories: - Query strategy @@ -1121,10 +1741,43 @@ components: example: - blue - iphone case - description: >- - Words which should be considered - [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - when found in a query. + description: > + Words that should be considered optional when found in the query. + + + By default, records must match all words in the search query to be + included in the search results. + + Adding optional words can help to increase the number of search + results by running an additional search query that doesn't include + the optional words. + + For example, if the search query is "action video" and "video" is an + optional word, + + the search engine runs two queries. One for "action video" and one + for "action". + + Records that match all words are ranked higher. + + + For a search query with 4 or more words **and** all its words are + optional, + + the number of matched words required for a record to be included in + the search results increases for every 1,000 records: + + + - If `optionalWords` has less than 10 words, the required number of + matched words increases by 1: + results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. + - If `optionalWords` has 10 or more words, the number of required + matched words increases by the number of optional words dividied by + 5 (rounded down). + For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. + + For more information, see [Optional + words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). default: [] x-categories: - Query strategy @@ -1134,9 +1787,22 @@ components: type: string example: - description - description: >- - Attributes for which you want to [turn off the exact ranking + description: > + Searchable attributes for which you want to [turn off the Exact + ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + + + This can be useful for attributes with long values, where the + likelyhood of an exact match is high, + + such as product descriptions. + + Turning off the Exact ranking criterion for these attributes favors + exact matching on other attributes. + + This reduces the impact of individual attributes with a lot of + content on ranking. default: [] x-categories: - Query strategy @@ -1146,10 +1812,42 @@ components: type: array items: $ref: '#/components/schemas/alternativesAsExact' - description: >- - Alternatives that should be considered an exact match by [the exact - ranking - criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + description: > + Alternatives of query words that should be considered as exact + matches by the Exact ranking criterion. + + +
+ +
ignorePlurals
+ +
+ + + Plurals and similar declensions added by the `ignorePlurals` setting + are considered exact matches. + + +
+ +
singleWordSynonym
+ +
+ + Single-word synonyms, such as "NY/NYC" are considered exact matches. + +
+ +
multiWordsSynonym
+ +
+ + Multi-word synonyms, such as "NY/New York" are considered exact + matches. + +
+ +
. default: - ignorePlurals - singleWordSynonym @@ -1159,9 +1857,42 @@ components: type: array items: $ref: '#/components/schemas/advancedSyntaxFeatures' - description: >- - Allows you to specify which advanced syntax features are active when - `advancedSyntax` is enabled. + description: > + Advanced search syntax features you want to support. + + +
+ +
exactPhrase
+ +
+ + + Phrases in quotes must match exactly. + + For example, `sparkly blue "iPhone case"` only returns records with + the exact string "iPhone case". + + +
+ +
excludeWords
+ +
+ + + Query words prefixed with a `-` must not occur in a record. + + For example, `search -engine` matches records that contain "search" + but not "engine". + + +
+ +
+ + + This setting only has an effect if `advancedSyntax` is true. default: - exactPhrase - excludeWords @@ -1171,9 +1902,27 @@ components: $ref: '#/components/schemas/distinct' replaceSynonymsInHighlight: type: boolean - description: >- - Whether to highlight and snippet the original word that matches the - synonym or the synonym itself. + description: > + Whether to replace a highlighted word with the matched synonym. + + + By default, the original words are highlighted even if a synonym + matches. + + For example, with `home` as a synonym for `house` and a search for + `home`, + + records matching either "home" or "house" are included in the search + results, + + and either "home" or "house" are highlighted. + + + With `replaceSynonymsInHighlight` set to `true`, a search for `home` + still matches the same records, + + but all occurences of "house" are replaced by "home" in the + highlighted response. default: false x-categories: - Highlighting and Snippeting @@ -1181,9 +1930,18 @@ components: type: integer minimum: 1 maximum: 7 - description: >- - Precision of the [proximity ranking - criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + description: > + Minimum proximity score for two matching words. + + + This adjusts the [Proximity ranking + criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + + by equally scoring matches that are farther apart. + + + For example, if `minProximity` is 2, neighboring matches and matches + with one word between them would have the same score. default: 1 x-categories: - Advanced @@ -1191,10 +1949,28 @@ components: type: array items: type: string - description: >- - Attributes to include in the API response for search and browse - queries. - default: [] + description: > + Properties to include in the API response of `search` and `browse` + requests. + + + By default, all response properties are included. + + To reduce the response size, you can select, which attributes should + be included. + + + You can't exclude these properties: + + `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, + + `abTestVariantID`, `parsedQuery`, or any property triggered by the + `getRankingInfo` parameter. + + + Don't exclude properties that you might need in your search UI. + default: + - '*' x-categories: - Advanced maxFacetHits: @@ -1203,21 +1979,58 @@ components: type: integer description: Maximum number of facet values to return for each facet. default: 100 + maximum: 1000 x-categories: - Faceting sortFacetValuesBy: type: string - description: Controls how facet values are fetched. + description: > + Order in which to retrieve facet values. + + +
+ +
count
+ +
+ + Facet values are retrieved by decreasing count. + + The count is the number of matching records containing this facet + value. + +
+ +
alpha
+ +
Retrieve facet values alphabetically.
+ +
+ + + This setting doesn't influence how facet values are displayed in + your UI (see `renderingContent`). + + For more information, see [facet value + display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). default: count x-categories: - Faceting attributeCriteriaComputedByMinProximity: type: boolean - description: >- - When the [Attribute criterion is ranked above - Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - in your ranking formula, Proximity is used to select which - searchable attribute is matched in the Attribute ranking stage. + description: > + Whether the best matching attribute should be determined by minimum + proximity. + + + This setting only affects ranking if the Attribute ranking criterion + comes before Proximity in the `ranking` setting. + + If true, the best matching attribute is selected based on the + minimum proximity of multiple matches. + + Otherwise, the best matching attribute is determined by the order in + the `searchableAttributes` setting. default: false x-categories: - Advanced @@ -1225,15 +2038,20 @@ components: $ref: '#/components/schemas/renderingContent' enableReRanking: type: boolean - description: >- - Indicates whether this search will use [Dynamic + description: > + Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + + + This setting only has an effect if you activated Dynamic Re-Ranking + for this index in the Algolia dashboard. default: true x-categories: - Filtering reRankingApplyFilter: $ref: '#/components/schemas/reRankingApplyFilter' searchParamsObject: + title: Search parameters as object allOf: - $ref: '#/components/schemas/baseSearchParams' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -1247,11 +2065,11 @@ components: deprecated: true nbHits: type: integer - description: Number of hits the search query matched. + description: Number of results (hits). example: 20 nbPages: type: integer - description: Number of pages of results for the current query. + description: Number of pages of results. example: 1 processingTimeMS: type: integer @@ -1290,7 +2108,10 @@ components: example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 - description: Lets you store custom data in your indices. + description: | + An object with custom data. + + You can store up to 32 kB as custom data. default: {} x-categories: - Advanced @@ -1322,7 +2143,7 @@ components: pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$ automaticRadius: type: string - description: Automatically-computed radius. + description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: type: object title: exhaustive @@ -1386,10 +2207,12 @@ components: title: facets type: object additionalProperties: + x-additionalPropertiesName: facet type: object additionalProperties: + x-additionalPropertiesName: facet count type: integer - description: Mapping of each facet name to the corresponding facet counts. + description: Facet counts. example: category: food: 1 @@ -1493,22 +2316,21 @@ components: example: a00dbc80a8d13c4565a442e7e2dca80a objectID: type: string - description: Unique object identifier. - example: product-1 + description: Unique record identifier. highlightedValue: type: string - description: Markup text with `facetQuery` matches highlighted. + description: Highlighted attribute value, including HTML tags. example: George Clooney matchLevel: type: string - description: Indicates how well the attribute matched the search query. + description: Whether the whole query string matches or only a part. enum: - none - partial - full highlightResultOption: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: false properties: value: @@ -1517,7 +2339,7 @@ components: $ref: '#/components/schemas/matchLevel' matchedWords: type: array - description: List of words from the query that matched the object. + description: List of matched words from the search query. example: - action items: @@ -1531,12 +2353,13 @@ components: - matchedWords highlightResultOptionMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResultOption' highlightResultOptionArray: type: array - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. items: $ref: '#/components/schemas/highlightResultOption' highlightResult: @@ -1546,14 +2369,13 @@ components: - $ref: '#/components/schemas/highlightResultOptionArray' highlightResultMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResult' snippetResultOption: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: false properties: value: @@ -1565,16 +2387,13 @@ components: - matchLevel snippetResultOptionMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResultOption' snippetResultOptionArray: type: array - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. items: $ref: '#/components/schemas/snippetResultOption' snippetResult: @@ -1584,10 +2403,9 @@ components: - $ref: '#/components/schemas/snippetResultOptionArray' snippetResultMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResult' matchedGeoLocation: type: object @@ -1619,24 +2437,29 @@ components: description: The score of the event. rankingInfo: type: object + description: Object with detailed information about the record's ranking. additionalProperties: false properties: filters: type: integer - description: This field is reserved for advanced usage. + minimum: 0 + description: Whether a filter matched the query. firstMatchedWord: type: integer + minimum: 0 description: >- - Position of the most important matched attribute in the attributes - to index list. + Position of the first matched word in the best matching attribute of + the record. geoDistance: type: integer + minimum: 0 description: >- Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). geoPrecision: type: integer + minimum: 1 description: Precision used when computing the geo distance, in meters. matchedGeoLocation: $ref: '#/components/schemas/matchedGeoLocation' @@ -1644,27 +2467,33 @@ components: $ref: '#/components/schemas/personalization' nbExactWords: type: integer + minimum: 0 description: Number of exactly matched words. nbTypos: type: integer + minimum: 0 description: Number of typos encountered when matching the record. promoted: type: boolean - description: Present and set to true if a Rule promoted the hit. + description: Whether the record was promoted by a rule. proximityDistance: type: integer + minimum: 0 description: >- - When the query contains more than one word, the sum of the distances - between matched words (in meters). + Number of words between multiple matches in the query plus 1. For + single word queries, `proximityDistance` is 0. userScore: type: integer - description: Custom ranking for the object, expressed as a single integer value. + description: >- + Overall ranking of the record, expressed as a single integer. This + attribute is internal. words: type: integer - description: Number of matched words, including prefixes and typos. + minimum: 1 + description: Number of matched words. promotedByReRanking: type: boolean - description: Wether the record are promoted by the re-ranking strategy. + description: Whether the record is re-ranked. required: - promoted - nbTypos @@ -1678,7 +2507,12 @@ components: type: integer hit: type: object - description: A single hit. + description: > + Search result. + + + A hit is a record from your index, augmented with special attributes for + highlighting, snippeting, and ranking. x-is-generic: true additionalProperties: true required: @@ -1700,6 +2534,12 @@ components: properties: hits: type: array + description: > + Search results (hits). + + + Hits are records from your index that match the search criteria, + augmented with additional attributes, such as, for highlighting. items: $ref: '#/components/schemas/hit' query: @@ -1720,14 +2560,16 @@ components: indexName: type: string example: products - description: Algolia index name. + description: Index name. searchTypeDefault: type: string enum: - default default: default description: > - - `default`: perform a search query - `facet` [searches for facet + - `default`: perform a search query + + - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). searchForHitsOptions: x-is-SearchForHitsOptions: true @@ -1754,7 +2596,9 @@ components: - facet default: facet description: > - - `default`: perform a search query - `facet` [searches for facet + - `default`: perform a search query + + - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). searchForFacetsOptions: type: object @@ -1791,9 +2635,13 @@ components: - none - stopIfEnoughMatches description: > - - `none`: executes all queries. - `stopIfEnoughMatches`: executes - queries one by one, stopping further query execution as soon as a query - matches at least the `hitsPerPage` number of results. + Strategy for multiple search queries: + + + - `none`. Run all queries. + + - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as + a query matches at least the `hitsPerPage` number of results. searchForFacetValuesResponse: type: object additionalProperties: false @@ -1805,6 +2653,7 @@ components: properties: facetHits: type: array + description: Matching facet values. items: type: object title: facetHits @@ -1822,10 +2671,8 @@ components: $ref: '#/components/schemas/highlightedValue' count: description: >- - Number of records containing this facet value. This takes into - account the extra search parameters specified in the query. - Like for a regular search query, the [counts may not be - exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + Number of records with this facet value. [The count may be + 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' @@ -1842,14 +2689,13 @@ components: cursor: type: string description: > - Cursor indicating the location to resume browsing from. Must match - the value returned by the previous call. + Cursor to get the next page of the response. - Pass this value to the subsequent browse call to get the next page - of results. - When the end of the index has been reached, `cursor` is absent from - the response. + The parameter must match the value returned in the response of a + previous request. + + The last page of the response does not return a `cursor` attribute. example: jMDY3M2MwM2QwMWUxMmQwYWI0ZTN browseParamsObject: allOf: @@ -1871,9 +2717,10 @@ components: description: > Unique identifier of a task. + A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the - `task` operation and this `taskID`. + [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. deletedAt: type: string example: '2023-06-27T14:42:38.831Z' @@ -1882,7 +2729,7 @@ components: format. attribute: type: string - description: Value of the attribute to be updated. + description: Value of the attribute to update. updatedAt: type: string example: '2023-07-04T12:49:15Z' @@ -1919,12 +2766,10 @@ components: - AddUnique - IncrementFrom - IncrementSet - description: Operation to apply to the attribute. + description: How to change the attribute. builtInOperation: type: object - description: >- - To update an attribute without pushing the entire record, you can use - these built-in operations. + description: Update to perform on the attribute. additionalProperties: false properties: _operation: @@ -1933,7 +2778,7 @@ components: type: string description: >- Value that corresponds to the operation, for example an `Increment` - or `Decrement` step, `Add` or `Remove` value. + or `Decrement` step, or an `Add` or `Remove` value. required: - _operation - value @@ -1951,7 +2796,7 @@ components: - deleteObject - delete - clear - description: Type of batch operation. + description: Type of indexing operation. objectIDs: type: array items: @@ -1959,11 +2804,70 @@ components: example: - record-1 - record-2 - description: Unique object (record) identifiers. + description: Unique record identifiers. baseIndexSettings: type: object + title: Index settings. additionalProperties: false properties: + attributesForFaceting: + type: array + items: + type: string + example: + - author + - filterOnly(isbn) + - searchable(edition) + - afterDistinct(category) + - afterDistinct(searchable(publisher)) + description: > + Attributes used for + [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + + + Facets are ways to categorize search results based on attributes. + + Facets can be used to let user filter search results. + + By default, no attribute is used for faceting. + + + **Modifiers** + + +
+ +
filterOnly("ATTRIBUTE")
+ +
Allows using this attribute as a filter, but doesn't evalue the + facet values.
+ +
searchable("ATTRIBUTE")
+ +
Allows searching for facet values.
+ +
afterDistinct("ATTRIBUTE")
+ +
+ + + Evaluates the facet count _after_ deduplication with `distinct`. + + This ensures accurate facet counts. + + You can apply this modifier to searchable facets: + `afterDistinct(searchable(ATTRIBUTE))`. + + +
+ +
+ + + Without modifiers, the attribute is used as a regular facet. + default: [] + x-categories: + - Faceting replicas: type: array items: @@ -1971,26 +2875,85 @@ components: example: - virtual(prod_products_price_asc) - dev_products_replica - description: >- - Creates - [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - which are copies of a primary index with the same records but - different settings. + description: > + Creates [replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + + + Replicas are copies of a primary index with the same records but + different settings, synonyms, or rules. + + If you want to offer a different ranking or sorting of your search + results, you'll use replica indices. + + All index operations on a primary index are automatically forwarded + to its replicas. + + To add a replica index, you must provide the complete set of + replicas to this parameter. + + If you omit a replica from this list, the replica turns into a + regular, standalone index that will no longer by synced with the + primary index. + + + **Modifier** + + +
+ +
virtual("REPLICA")
+ +
+ + + Create a virtual replica, + + Virtual replicas don't increase the number of records and are + optimized for [Relevant + sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + + +
+ +
+ + + Without modifier, a standard replica is created, which duplicates + your record count and is used for strict, or [exhaustive + sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). default: [] x-categories: - Ranking paginationLimitedTo: type: integer - example: 20 - description: Maximum number of hits accessible through pagination. + example: 100 + description: > + Maximum number of search results that can be obtained through + pagination. + + + Higher pagination limits might slow down your search. + + For pagination limits above 1,000, the sorting of results beyond the + 1,000th hit can't be guaranteed. default: 1000 + maximum: 20000 unretrievableAttributes: type: array items: type: string example: - - popularity - description: Attributes that can't be retrieved at query time. + - total_sales + description: > + Attributes that can't be retrieved at query time. + + + This can be useful if you want to use an attribute for ranking or to + [restrict + access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), + + but don't want to include it in the search results. default: [] x-categories: - Attributes @@ -2001,18 +2964,27 @@ components: example: - wheel - 1X2BCD - description: >- + description: > Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + This also turns off [word splitting and + concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + for the specified words. default: [] x-categories: - Typos attributesToTransliterate: - description: >- - Attributes in your index to which [Japanese - transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - applies. This will ensure that words indexed in Katakana or Kanji - can also be searched in Hiragana. + description: > + Attributes, for which you want to support [Japanese + transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + + + Transliteration supports searching in any of the Japanese writing + systems. + + To support transliteration, you must set the indexing language to + Japanese. type: array items: type: string @@ -2028,7 +3000,7 @@ components: example: - description description: >- - Attributes on which to split [camel + Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. default: [] x-categories: @@ -2038,10 +3010,27 @@ components: example: de: - name - description: >- - Attributes in your index to which [word + description: > + Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - (decompounding) applies. + (decompounding). + + + Compound words are formed by combining two or more individual words, + + and are particularly prevalent in Germanic languages—for example, + "firefighter". + + With decompounding, the individual components are indexed + separately. + + + You can specify different lists for different languages. + + Decompounding is supported for these languages: + + Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish + (`sv`), and Norwegian (`no`). default: {} x-categories: - Languages @@ -2051,12 +3040,26 @@ components: type: string example: - ja - description: >- - Set the languages of your index, for language-specific processing - steps such as - [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - and - [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for a language for language-specific processing steps, such as word + detection and dictionary settings. + + + **You should always specify an indexing language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages @@ -2067,7 +3070,7 @@ components: example: - sku description: >- - Attributes for which you want to turn off [prefix + Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). default: [] x-categories: @@ -2075,10 +3078,10 @@ components: allowCompressionOfIntegerArray: type: boolean description: > - Incidates whether the engine compresses arrays with exclusively - non-negative integers. + Whether arrays with exclusively non-negative integers should be + compressed for better performance. - When enabled, the compressed arrays may be reordered. + If true, the compressed arrays may be reordered. default: false x-categories: - Performance @@ -2086,11 +3089,43 @@ components: type: array items: type: string - description: >- + description: > Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + + + By default, all numeric attributes are available as numerical + filters. + + For faster indexing, reduce the number of numeric attributes. + + + If you want to turn off filtering for all numeric attributes, + specifiy an attribute that doesn't exist in your index, such as + `NO_NUMERIC_FILTERING`. + + + **Modifier** + + +
+ +
equalOnly("ATTRIBUTE")
+ +
+ + + Support only filtering based on equality comparisons `=` and `!=`. + + +
+ +
+ + + Without modifier, all numeric comparisons are supported. example: - - quantity + - equalOnly(quantity) - popularity default: [] x-categories: @@ -2098,11 +3133,19 @@ components: separatorsToIndex: type: string example: +# - description: >- - Controls which separators are added to an Algolia index as part of - [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). + description: > + Controls which separators are indexed. + + Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + + By default, separator characters aren't indexed. + + With `separatorsToIndex`, Algolia treats separator characters as + separate words. + + For example, a search for `C#` would report two matches. default: '' x-categories: - Typos @@ -2116,24 +3159,64 @@ components: - unordered(text) - emails.personal description: > - [Attributes used for - searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), - including determining [if matches at the beginning of a word are - important (ordered) or not - (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + Attributes used for searching. + + + By default, all attributes are searchable and the + [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + ranking criterion is turned off. + + With a non-empty list, Algolia only returns results with matches in + the selected attributes. + + In addition, the Attribute ranking criterion is turned on: matches + in attributes that are higher in the list of `searchableAttributes` + rank first. + + To make matches in two attributes rank equally, include them in a + comma-separated string, such as `"title,alternate_title"`. + + Attributes with the same priority are always unordered. + + + For more information, see [Searchable + attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + + + **Modifier** + + +
+ +
unordered("ATTRIBUTE")
+ +
+ + Ignore the position of a match within the attribute. + +
+ +
+ + + Without modifier, matches at the beginning of an attribute rank + higer than matches at the end. default: [] x-categories: - Attributes userData: $ref: '#/components/schemas/userData' customNormalization: - description: >- - A list of characters and their normalized replacements to override - Algolia's default + description: > + Characters and their normalized replacements. + + This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). type: object - example: | - {default: {'ä': 'ae', 'ĂĽ': 'ue'}} + example: + default: + ä: ae + ĂĽ: ue additionalProperties: type: object additionalProperties: @@ -2141,14 +3224,28 @@ components: x-categories: - Languages attributeForDistinct: - description: >- - Name of the deduplication attribute to be used with Algolia's - [_distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + description: > + Attribute that should be used to establish groups of results. + + + All records with the same value for this attribute are considered a + group. + + You can combine `attributeForDistinct` with the `distinct` search + parameter to control + + how many items per group are included in the search results. + + + If you want to use the same attribute also for faceting, use the + `afterDistinct` modifier of the `attributesForFaceting` setting. + + This applies faceting _after_ deduplication, which will result in + accurate facet counts. example: url type: string indexSettings: - description: Algolia index settings. + description: Index settings. allOf: - $ref: '#/components/schemas/baseIndexSettings' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -2227,7 +3324,7 @@ components: description: Unique identifier of a synonym object. synonymHits: type: array - description: Synonym objects. + description: Matching synonyms. items: $ref: '#/components/schemas/synonymHit' searchSynonymsResponse: @@ -2264,38 +3361,7 @@ components: - key - createdAt acl: - description: > - API key permissions: - - - `addObject`: required to add or update records, copy or move an index. - - `analytics`: required to access the Analytics API. - - `browse`: required to view records - - `deleteIndex`: required to delete indices. - - `deleteObject`: required to delete records. - - `editSettings`: required to change index settings. - - `inference`: required to access the Inference API. - - `listIndexes`: required to list indices. - - `logs`: required to access logs of search and indexing operations. - - `recommendation`: required to access the Personalization and Recommend - APIs. - - `search`: required to search records - - `seeUnretrievableAttributes`: required to retrieve - [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - for all operations that return records. - - `settings`: required to examine index settings. + description: Access control list permissions. type: string enum: - addObject @@ -2321,8 +3387,13 @@ components: acl: type: array description: > - [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) - associated with the key. + Permissions that determine the type of API requests this key can + make. + + The required ACL is listed in each endpoint's reference. + + For more information, see [access control + list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). example: - search - addObject @@ -2331,78 +3402,92 @@ components: $ref: '#/components/schemas/acl' description: type: string - description: Description of an API key for you and your team members. - example: Browse-restricted key + description: Description of an API key to help you identify this API key. + example: Used for indexing by the CLI default: '' indexes: type: array description: > - Restricts this API key to a list of indices or index patterns. If - the list is empty, all indices are allowed. + Index names or patterns that this API key can access. - Specify either an exact index name or a pattern with a leading or - trailing wildcard character (or both). For example: + By default, an API key can access all indices in the same + application. - - `dev_*` matches all indices starting with "dev_" - `*_dev` matches - all indices ending with "_dev" - `*_products_*` matches all indices - containing "_products_". + + You can use leading and trailing wildcard characters (`*`): + + + - `dev_*` matches all indices starting with "dev_". + + - `*_dev` matches all indices ending with "_dev". + + - `*_products_*` matches all indices containing "_products_". example: - dev_* - - prod_products + - prod_en_products default: [] items: type: string maxHitsPerQuery: type: integer - description: > - Maximum number of hits this API key can retrieve in one query. If - zero, no limit is enforced. - - > **Note**: Use this parameter to protect you from third-party - attempts to retrieve your entire content by massively querying the - index. + description: | + Maximum number of results this API key can retrieve in one query. + By default, there's no limit. default: 0 maxQueriesPerIPPerHour: type: integer description: > - Maximum number of API calls per hour allowed from a given IP address - or [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + Maximum number of API requests allowed per IP address or [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) + per hour. - Each time an API call is performed with this key, a check is - performed. If there were more than the specified number of calls - within the last hour, the API returns an error with the status code - `429` (Too Many Requests). + If this limit is reached, the API returns an error with status code + `429`. - > **Note**: Use this parameter to protect you from third-party - attempts to retrieve your entire content by massively querying the - index. + By default, there's no limit. default: 0 queryParameters: type: string description: > - Force some [query - parameters](https://www.algolia.com/doc/api-reference/api-parameters/) - to be applied for each query made with this API key. + Query parameters to add when making API requests with this API key. + - It's a URL-encoded query string. - example: >- - typoTolerance%3Dstrict%26ignorePlurals%3Dfalse%26filters%3Drights%3Apublic + To restrict this API key to specific IP addresses, add the + `restrictSources` parameter. + + You can only add a single source, but you can provide a range of IP + addresses. + + + Creating an API key fails if the request is made from an IP address + that's outside the restricted range. + example: typoTolerance=strict&restrictSources=192.168.1.0/24 default: '' referers: type: array description: > - Restrict this API key to specific - [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - If empty, all referrers are allowed. + Allowed HTTP referrers for this API key. + + + By default, all referrers are allowed. + + You can use leading and trailing wildcard characters (`*`): + + + - `https://algolia.com/*` allows all referrers starting with + "https://algolia.com/" - For example: + - `*.algolia.com` allows all referrers ending with ".algolia.com" - - `https://algolia.com/*` matches all referrers starting with - "https://algolia.com/" - `*.algolia.com` matches all referrers - ending with ".algolia.com" - `*algolia.com*` allows everything in - the domain "algolia.com". + - `*algolia.com*` allows all referrers in the domain "algolia.com". + + + Like all HTTP headers, referrers can be spoofed. Don't rely on them + to secure your data. + + For more information, see [HTTP referrer + restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). example: - '*algolia.com*' default: [] @@ -2410,18 +3495,9 @@ components: type: string validity: type: integer - description: > - Validity duration of a key (in seconds). The key will automatically - be removed after this time has expired. The default value of 0 never - expires. - - Short-lived API keys are useful to grant temporary access to your - data. For example, in mobile apps, you can't [control when users - update your - app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - So instead of encoding keys into your app as you would for a web - app, you should dynamically fetch them from your mobile app's - backend. + description: | + Duration (in seconds) after which the API key expires. + By default, API keys don't expire. example: 86400 default: 0 required: @@ -2434,7 +3510,7 @@ components: type: string example: '2023-07-04T12:49:15Z' description: >- - Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) + Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. addApiKeyResponse: type: object @@ -2447,12 +3523,21 @@ components: required: - key - createdAt + ruleID: + title: objectID + type: string + description: Unique identifier of a rule object. anchoring: type: string - description: >- - Whether the pattern parameter matches the beginning (`startsWith`) or - end (`endsWith`) of the query string, is an exact match (`is`), or a - partial match (`contains`). + description: | + Which part of the search query the pattern should match: + + - `startsWith`. The pattern must match the begginning of the query. + - `endsWith`. The pattern must match the end of the query. + - `is`. The pattern must match the query exactly. + - `contains`. The pattern must match anywhere in the query. + + Empty queries are only allowed as pattern with `anchoring: is`. enum: - is - startsWith @@ -2464,18 +3549,49 @@ components: properties: pattern: type: string - description: Query pattern syntax. - example: '{facet:brand}' + description: > + Query pattern that triggers the rule. + + + You can use either a literal string, or a special pattern + `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. + + The rule is triggered if the query matches the literal string or a + value of the specified facet. + + For example, with `pattern: {facet:genre}`, the rule is triggered + when users search for a genre, such as "comedy". + example: '{facet:genre}' anchoring: $ref: '#/components/schemas/anchoring' alternatives: type: boolean - description: Whether the pattern matches on plurals, synonyms, and typos. + description: Whether the pattern should match plurals, synonyms, and typos. default: false context: type: string - description: 'Rule context format: [A-Za-z0-9_-]+).' - example: trackedFilters + pattern: '[A-Za-z0-9_-]+' + description: > + An additional restriction that only triggers the rule, when the + search has the same value as `ruleContexts` parameter. + + For example, if `context: mobile`, the rule is only triggered when + the search request has a matching `ruleContexts: mobile`. + + A rule context must only contain alphanumeric characters. + example: mobile + filters: + type: string + description: > + Filters that trigger the rule. + + + You can add add filters using the syntax `facet:value` so that the + rule is triggered, when the specific filter is selected. + + You can use `filters` on its own or combine it with the `pattern` + parameter. + example: genre:comedy editType: description: Type of edit. type: string @@ -2493,57 +3609,79 @@ components: type: string insert: description: >- - Text that should be inserted in place of the removed text inside the - query string. + Text to be added in place of the deleted text inside the query + string. type: string consequenceQueryObject: type: object additionalProperties: false properties: remove: - description: Words to remove. + description: Words to remove from the search query. type: array items: type: string edits: - description: Edits to apply. + description: Changes to make to the search query. type: array items: $ref: '#/components/schemas/edit' consequenceQuery: - description: >- - When providing a string, it replaces the entire query string. When - providing an object, it describes incremental edits to be made to the - query string (but you can't do both). + description: > + Replace or edit the search query. + + + If `consequenceQuery` is a string, the entire search query is replaced + with that string. + + If `consequenceQuery` is an object, it describes incremental edits made + to the query. oneOf: - $ref: '#/components/schemas/consequenceQueryObject' - type: string automaticFacetFilter: type: object - description: Automatic facet Filter. + description: Filter or optional filter to be applied to the search. additionalProperties: false properties: facet: type: string - description: >- - Attribute to filter on. This must match a facet placeholder in the - Rule's pattern. + description: > + Facet name to be applied as filter. + + The name must match placeholders in the `pattern` parameter. + + For example, with `pattern: {facet:genre}`, `automaticFacetFilters` + must be `genre`. score: type: integer default: 1 - description: >- - Score for the filter. Typically used for optional or disjunctive - filters. + description: Filter scores to give different weights to individual filters. disjunctive: type: boolean default: false - description: Whether the filter is disjunctive (true) or conjunctive (false). + description: > + Whether the filter is disjunctive or conjunctive. + + + If true the filter has multiple matches, multiple occurences are + combined with the logical `OR` operation. + + If false, multiple occurences are combined with the logical `AND` + operation. required: - facet automaticFacetFilters: - description: >- - Names of facets to which automatic filtering must be applied; they must - match the facet name of a facet value placeholder in the query pattern. + description: > + Filter to be applied to the search. + + + You can use this to respond to search queries that match a facet value. + + For example, if users search for "comedy", which matches a facet value + of the "genre" facet, + + you can filter the results to show the top-ranked comedy movies. oneOf: - type: array items: @@ -2553,7 +3691,12 @@ components: type: string params: type: object - description: Additional search parameters. + description: > + Parameters to apply to this search. + + + You can use all search parameters, plus special `automaticFacetFilters`, + `automaticOptionalFacetFilters`, and `query`. additionalProperties: false properties: query: @@ -2572,38 +3715,39 @@ components: promotePosition: type: integer description: >- - The position to promote the records to. If you pass objectIDs, the - records are placed at this position as a group. For example, if you - pronmote four objectIDs to position 0, the records take the first four - positions. + Position in the search results where you want to show the promoted + records. example: 0 promoteObjectIDs: + title: objectIDs description: Records to promote. type: object additionalProperties: false properties: objectIDs: type: array - description: Unique identifiers of the records to promote. - example: - - 3f31c087763a2ceec359b318fc3edef3 - - 63c3c871e31a152d67df7720192fd752 + maxItems: 100 + description: | + Object IDs of the records you want to promote. + + The records are placed as a group at the `position`. + For example, if you want to promote four records to position `0`, + they will be the first four search results. items: - type: string + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: - position - objectIDs promoteObjectID: + title: objectID description: Record to promote. type: object additionalProperties: false properties: objectID: - type: string - example: 2b642cf64c587f50388eb1b8d047bf56 - description: Unique identifier of the record to promote. + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: @@ -2616,32 +3760,50 @@ components: consequence: type: object description: > - [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - of a rule. + Effect of the rule. + + + For more information, see + [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). additionalProperties: false properties: params: $ref: '#/components/schemas/consequenceParams' promote: type: array - description: Records to promote. + maxItems: 300 + description: > + Records you want to pin to a specific position in the search + results. + + + You can promote up to 300 records, either individually, or as groups + of up to 100 records each. items: $ref: '#/components/schemas/promote' filterPromotes: type: boolean default: false - description: >- - Only use in combination with the `promote` consequence. When `true`, - promoted results will be restricted to match the filters of the - current search. When `false`, the promoted results will show up - regardless of the filters. + description: > + Whether promoted records must match an active filter for the + consequence to be applied. + + + This ensures that user actions (filtering the search) are given a + higher precendence. + + For example, if you promote a record with the `color: red` + attribute, and the user filters the search for `color: blue`, + + the "red" record won't be shown. hide: type: array - description: Records to hide. By default, you can hide up to 50 records per rule. + maxItems: 50 + description: Records you want to hide from the search results. items: title: consequenceHide type: object - description: Unique identifier of the record to hide. + description: Object ID of the record to hide. additionalProperties: false properties: objectID: @@ -2649,10 +3811,12 @@ components: required: - objectID userData: - description: >- - Custom JSON object that will be appended to the userData array in - the response. This object isn't interpreted by the API. It's limited - to 1kB of minified JSON. + description: > + A JSON object with custom data that will be appended to the + `userData` array in the response. + + This object isn't interpreted by the API and is limited to 1 kB + of minified JSON. example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 @@ -2662,10 +3826,10 @@ components: properties: from: type: integer - description: Lower bound of the time range (Unix timestamp). + description: When the rule should start to be active, in Unix epoch time. until: type: integer - description: Upper bound of the time range (Unix timestamp). + description: When the rule should stop to be active, in Unix epoch time. required: - from - until @@ -2675,15 +3839,20 @@ components: additionalProperties: false properties: objectID: - type: string - description: Unique identifier for a rule object. - example: hide-12345 + $ref: '#/components/schemas/ruleID' conditions: type: array + minItems: 0 + maxItems: 25 description: > - [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) - required to activate a rule. You can use up to 25 conditions per - rule. + Conditions that trigger a rule. + + + Some consequences require specific conditions or don't require any + condition. + + For more information, see + [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). items: $ref: '#/components/schemas/condition' consequence: @@ -2691,20 +3860,16 @@ components: description: type: string description: >- - Description of the rule's purpose. This can be helpful for display - in the Algolia dashboard. + Description of the rule's purpose to help you distinguish between + different rules. example: Display a promotional banner enabled: type: boolean default: true - description: >- - Indicates whether to enable the rule. If it isn't enabled, it isn't - applied at query time. + description: Whether the rule is active. validity: type: array - description: >- - If you specify a validity period, the rule _only_ applies only - during that period. If specified, the array must not be empty. + description: Time periods when the rule is active. items: $ref: '#/components/schemas/timeRange' required: @@ -2714,7 +3879,7 @@ components: additionalProperties: false properties: objectID: - $ref: '#/components/schemas/objectID' + $ref: '#/components/schemas/ruleID' updatedAt: $ref: '#/components/schemas/updatedAt' taskID: @@ -2725,12 +3890,12 @@ components: - taskID parameters_query: type: string - description: Rule object query. + description: Search query for rules. default: '' parameters_page: type: integer minimum: 0 - description: Requested page (the first page is page 0). + description: Requested page of the API response. parameters_hitsPerPage: type: integer default: 20 @@ -2755,9 +3920,7 @@ components: - enabled - disabled default: enabled - description: >- - Indicates whether a dictionary entry is active (`enabled`) or inactive - (`disabled`). + description: Whether a dictionary entry is active. dictionaryEntry: type: object description: Dictionary entry. @@ -2768,55 +3931,33 @@ components: properties: objectID: type: string - description: Unique identifier for a dictionary object. - example: under + description: Unique identifier for the dictionary entry. + example: 828afd405e1f4fe950b6b98c2c43c032 language: type: string - description: > - [Supported language ISO - code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + description: >- + ISO code of a [supported + language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). example: de word: type: string - description: > - Dictionary entry word. Usage depends on the type of dictionary - entry. - - **`stopwordEntry`** - - The stop word you want to add or update. If the entry already exists - in Algolia's standard dictionary, you can override its behavior by - adding it to the custom dictionary and setting its `state` to - `disabled`. - - **`compoundEntry`** - - When `decomposition` is empty: adds `word` as a compound atom. For - example, atom “kino” decomposes the query “kopfkino” into "kopf" and - "kino". - - When `decomposition` isn't empty: creates a decomposition exception. - For example, when decomposition is set to the ["hund", "hutte"] - exception, "hundehutte" decomposes into “hund” and “hutte”, - discarding the linking "e". - example: down + description: >- + Matching dictionary word for `stopwords` and `compounds` + dictionaries. + example: the words: type: array - description: > - Compound dictionary [word - declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). - - If the entry already exists in Algolia's standard dictionary, you - can override its behavior by adding it to the custom dictionary and - setting its `state` to `disabled`. + description: Matching words in the `plurals` dictionary including declensions. example: - cheval - - chevaux + - cheveaux items: type: string decomposition: type: array - description: For compound entries, governs the behavior of the `word` parameter. + description: >- + Invividual components of a compound word in the `compounds` + dictionary. example: - kopf - schmerz @@ -2826,18 +3967,39 @@ components: state: $ref: '#/components/schemas/dictionaryEntryState' language: - description: > - [Supported language ISO - code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + description: >- + ISO code of a [supported + language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). example: en type: string + searchDictionaryEntriesResponse: + type: object + additionalProperties: false + properties: + hits: + type: array + description: Dictionary entries matching the search criteria. + items: + $ref: '#/components/schemas/dictionaryEntry' + page: + $ref: '#/components/schemas/parameters_page' + nbHits: + $ref: '#/components/schemas/nbHits' + nbPages: + $ref: '#/components/schemas/nbPages' + required: + - hits + - page + - nbHits + - nbPages standardEntry: description: Key-value pair of a language ISO code and a boolean value. - example: | - {'fr': false} + example: + fr: false type: object nullable: true additionalProperties: + x-additionalPropertiesName: language type: boolean standardEntries: description: > @@ -2856,15 +4018,12 @@ components: type: object additionalProperties: false nullable: true - description: Custom entries for a dictionary. + description: >- + Dictionary type. If `null`, this dictionary type isn't supported for the + language. properties: nbCustomEntries: - description: > - If `0`, the dictionary hasn't been customized and only contains - standard entries provided by Algolia. - - If `null`, that feature isn't available or isn't supported for that - language. + description: Number of custom dictionary entries. type: integer languages: type: object @@ -2884,7 +4043,7 @@ components: userID: type: string pattern: ^[a-zA-Z0-9 \-*.]+$ - description: userID of the user. + description: User ID. example: user1 userId: title: userID @@ -2953,14 +4112,16 @@ components: enum: - published - notPublished - description: _published_ if the task has been processed, _notPublished_ otherwise. + description: >- + Task status, `published` if the task is completed, `notPublished` + otherwise. operationType: type: string enum: - move - copy example: copy - description: Operation to perform (_move_ or _copy_). + description: Operation to perform on the index. scopeType: type: string enum: @@ -3068,47 +4229,62 @@ components: type: string description: > Filters that apply to every search made with the secured API key. - You can add extra filters at search time with the filters query - parameter. - For example, if you set the filter group:admin on your generated API - key, and you add groups:press OR groups:visitors with the filters - query parameter, your final search filter is equivalent to - groups:admin AND (groups:press OR groups:visitors). + Extra filters added at search time will be combined with `AND`. + + For example, if you set `group:admin` as fixed filter on your + generated API key, + + and add `groups:visitors` to the search query, the complete set of + filters will be `group:admin AND groups:visitors`. validUntil: type: integer format: int64 - description: Unix timestamp used to set the expiration date of the API key. + description: >- + Timestamp in [Unix epoch + time](https://en.wikipedia.org/wiki/Unix_time) when the API key + should expire. restrictIndices: type: array items: type: string - description: Index names that can be queried. + description: > + Index names or patterns that this API key can access. + + By default, an API key can access all indices in the same + application. + + + You can use leading and trailing wildcard characters (`*`): + + + - `dev_*` matches all indices starting with "dev_". + + - `*_dev` matches all indices ending with "_dev". + + - `*_products_*` matches all indices containing "_products_". restrictSources: type: string description: > - IPv4 network allowed to use the generated key. Use this to protect - against API key leaking and reuse. + IP network that are allowed to use this key. - You can only provide a single source, but you can specify a range of - IPs (for example, 192.168.1.0/24). + + You can only add a single source, but you can provide a range of IP + addresses. + + Use this to protect against API key leaking and reuse. + example: 192.168.1.0/24 userToken: type: string description: > - Unique user IP address. - - This can be useful when you want to impose a rate limit on specific - users. By default, rate limits are set based on the IP address. This - can become an issue when several users search from the same IP - address. To avoid this, you can set a unique userToken for each user - when generating their API key. This lets you restrict each user to a - maximum number of API calls per hour, even if they share their IP - with another user. Specifying the userToken in a secured API key is - also a good security practice as it ensures users don't change it. - Many features like Analytics, Personalization, and Dynamic - Re-ranking rely on the authenticity of user identifiers. Setting the - userToken at the API key level ensures that downstream services work - as expected and prevents abuse. + Pseudonymous user identifier to restrict usage of this API key to + specific users. + + + By default, rate limits are set based on IP addresses. This can be + an issue if many users search from the same IP address. + + To avoid this, add a user token to each generated API key. responses: BadRequest: description: Bad request or request arguments. @@ -3226,58 +4402,114 @@ security: apiKey: [] tags: - name: Advanced - description: Advanced operations. + description: Query your logs. - name: Api Keys - description: Manage your API keys. - - name: Clusters + x-displayName: API keys description: > - Multi-cluster operations. + Manage your API keys. + - Algolia no longer offers [multi-cluster - management](https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/). + API requests must be authenticated with an API key. + + API keys can have permissions (access control lists, ACL) and + restrictions. + externalDocs: + url: https://www.algolia.com/doc/guides/security/api-keys/ + description: | + Related guide: API keys. + - name: Clusters + description: | + Multi-cluster operations. - - If you want to partition your data per user, use facets and secured API - keys instead. - If you need more data, consider upgrading to a bigger - cluster to suit your needs. Contact [Algolia's support - team](https://support.algolia.com/hc/en-us/requests/new) for details. + Algolia no longer offers multi-cluster management. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/ + description: | + Related guide: Multi-cluster management. - name: Dictionaries - description: >- - Dictionary operations allow you to customize linguistic features such as - [stop - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - and [segmentation - (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/). + description: > + Manage your dictionaries. + + + Customize language-specific settings, such as stop words, plurals, or word + segmentation. + + + Dictionaries are application-wide. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/ + description: | + Related guide: Natural languages. - name: Indices - description: >- - Manage indices, including listing them, checking and updating settings, - deleting, copying, and renaming. + description: > + Manage your indices and index settings. + + + Indices are copies of your data that are stored on Algolia's servers. + + They're optimal data structures for fast search and are made up of records + and settings. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/ + description: | + Related guide: Manage your indices. - name: Records - description: Record operations. + description: > + Add, update, and delete records from your indices. + + + Records are individual items in your index. + + When they match a search query, they're returned as search results, in the + order determined by your ranking. + + Records are schemaless JSON objects. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/ + description: | + Related guide: Prepare your records. - name: Rules - description: Rules operations. - - name: Search - description: Search operations. - - name: Synonyms - description: Synonym operations. - - name: Vaults description: > - Vault operations. + Create, update, delete, and search for rules. - Algolia Vault allows you to restrict network-level access to your cluster - to a specific set of IP addresses: for non-authorized IP addresses, the - cluster is invisible. - You should authorize the IP addresses of team members who need to access - the Alglolia dashboard, as it's also affected by the restricted list you - set up. + Rules are _if-then_ statements that you can use to curate search results. - To access this feature, [Algolia - Vault](https://www.algolia.com/doc/guides/security/algolia-vault/) must be - enabled on your server. Contact [Algolia's support - team](https://support.algolia.com/hc/en-us/requests/new) for details. + Rules have _conditions_ which can trigger _consequences_. - > **Note**: The maximum number of allowed sources is 1,000. + Consequences are changes to the search results, such as changing the order + of search results, or boosting a facet. + + This can be useful for tuning specific queries or for merchandising. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/ + description: | + Related guide: Rules. + - name: Search + description: Search one or more indices for matching records or facet values. + - name: Synonyms + description: | + Create, update, delete, and search for synonyms. + + Synonyms are terms that the search engine should consider equal. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/ + description: | + Related guide: Synonyms. + - name: Vaults + description: >- + Algolia Vault lets you restrict access to your clusters to specific IP + addresses and provides disk-level encryption at rest. + externalDocs: + url: https://www.algolia.com/doc/guides/security/algolia-vault/ + description: | + Related guide: Algolia Vault. - name: _model_index_settings x-displayName: Index settings description: | @@ -3345,12 +4577,23 @@ paths: x-acl: - search summary: Search multiple indices. - description: Send multiple search queries to one or more indices. + description: > + Sends multiple search request to one or more indices. + + + This can be useful in these cases: + + + - Different indices for different purposes, such as, one index for + products, another one for marketing content. + + - Multiple searches to the same index—for example, with different + filters. requestBody: required: true description: >- - Query requests and strategies. Results will be received in the same - order as the queries. + Muli-search request body. Results are returned in the same order as + the requests. content: application/json: schema: diff --git a/specs/bundled/analytics.doc.yml b/specs/bundled/analytics.doc.yml index ffad71a83d..96f0711a35 100644 --- a/specs/bundled/analytics.doc.yml +++ b/specs/bundled/analytics.doc.yml @@ -38,7 +38,7 @@ components: Index: in: query name: index - description: Index name to target. + description: Index name. required: true schema: type: string @@ -56,21 +56,19 @@ components: StartDate: in: query name: startDate - description: >- - Start date (a string in the format `YYYY-MM-DD`) of the period to - analyze. + description: Start date (`YYYY-MM-DD`) of the period to analyze. schema: type: string + format: date example: '2022-09-19' - pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$ EndDate: in: query name: endDate - description: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + description: End date (`YYYY-MM-DD`) of the period to analyze. schema: type: string + format: date example: '2023-01-21' - pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$ OrderBy: in: query name: orderBy @@ -87,17 +85,18 @@ components: Limit: in: query name: limit - description: Number of records to return (page size). + description: Number of items to return. schema: type: integer default: 10 Offset: in: query name: offset - description: Position of the starting record. Used for paging. 0 is the first record. + description: Position of the first item to return. schema: type: integer default: 0 + minimum: 0 Tags: name: tags in: query @@ -165,7 +164,7 @@ components: example: 504 nbHits: type: integer - description: Number of hits the search query matched. + description: Number of results (hits). example: 20 topSearchesResponse: type: object diff --git a/specs/bundled/analytics.yml b/specs/bundled/analytics.yml index fadffbed51..b0ee6ae2ce 100644 --- a/specs/bundled/analytics.yml +++ b/specs/bundled/analytics.yml @@ -38,7 +38,7 @@ components: Index: in: query name: index - description: Index name to target. + description: Index name. required: true schema: type: string @@ -56,21 +56,19 @@ components: StartDate: in: query name: startDate - description: >- - Start date (a string in the format `YYYY-MM-DD`) of the period to - analyze. + description: Start date (`YYYY-MM-DD`) of the period to analyze. schema: type: string + format: date example: '2022-09-19' - pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$ EndDate: in: query name: endDate - description: End date (a string in the format `YYYY-MM-DD`) of the period to analyze. + description: End date (`YYYY-MM-DD`) of the period to analyze. schema: type: string + format: date example: '2023-01-21' - pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$ OrderBy: in: query name: orderBy @@ -87,17 +85,18 @@ components: Limit: in: query name: limit - description: Number of records to return (page size). + description: Number of items to return. schema: type: integer default: 10 Offset: in: query name: offset - description: Position of the starting record. Used for paging. 0 is the first record. + description: Position of the first item to return. schema: type: integer default: 0 + minimum: 0 Tags: name: tags in: query @@ -165,7 +164,7 @@ components: example: 504 nbHits: type: integer - description: Number of hits the search query matched. + description: Number of results (hits). example: 20 topSearchesResponse: type: object diff --git a/specs/bundled/recommend.doc.yml b/specs/bundled/recommend.doc.yml index 004642eb55..2d9fcdded8 100644 --- a/specs/bundled/recommend.doc.yml +++ b/specs/bundled/recommend.doc.yml @@ -39,11 +39,11 @@ components: IndexName: name: indexName in: path - description: Index on which to perform the request. + description: Name of the index on which to perform the operation. required: true schema: type: string - example: myIndexName + example: YourIndexName Models: in: path name: model @@ -56,7 +56,7 @@ components: ObjectID: name: objectID in: path - description: Unique record (object) identifier. + description: Unique record identifier. required: true schema: type: string @@ -73,7 +73,7 @@ components: indexName: type: string example: products - description: Algolia index name. + description: Index name. baseRecommendRequest: type: object additionalProperties: false @@ -112,7 +112,7 @@ components: - trending-items query: type: string - description: Text to search for in an index. + description: Search query. default: '' x-categories: - Search @@ -125,13 +125,53 @@ components: filters: type: string description: > - [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) - the query with numeric, facet, or tag filters. + Filter the search so that only records with matching values are included + in the results. + + + These filters are supported: + + + - **Numeric filters.** ` `, where `` is one of + `<`, `<=`, `=`, `!=`, `>`, `>=`. + + - **Ranges.** `: TO ` where `` and `` + are the lower and upper limits of the range (inclusive). + + - **Facet filters.** `:` where `` is a facet + attribute (case-sensitive) and `` a facet value. + + - **Tag filters.** `_tags:` or just `` (case-sensitive). + + - **Boolean filters.** `: true | false`. + + + You can combine filters with `AND`, `OR`, and `NOT` operators with the + following restrictions: + + + - You can only combine filters of the same type with `OR`. + **Not supported:** `facet:value OR num > 3`. + - You can't use `NOT` with combinations of filters. + **Not supported:** `NOT(facet:value OR facet:value)` + - You can't combine conjunctions (`AND`) with `OR`. + **Not supported:** `facet:value OR (facet:value AND facet:value)` + + Use quotes around your filters, if the facet attribute name or facet + value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. + + If a facet attribute is an array, the filter matches if it matches at + least one element of the array. + + + For more information, see + [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). example: (category:Book OR category:Ebook) AND _tags:published default: '' x-categories: - Filtering searchFiltersArrayString: + title: search filter array type: array items: type: string @@ -141,14 +181,35 @@ components: - type: string listOfSearchFilters: type: array + title: search filters items: $ref: '#/components/schemas/mixedSearchFilters' facetFilters: description: > - [Filter hits by facet - value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + Filter the search by facet values, so that only records with the same + facet values are retrieved. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. + + - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 + AND filter3`. + + - `facet:-value` is interpreted as `NOT facet:value`. + + + While it's best to avoid attributes that start with a `-`, you can still + filter them by escaping with a backslash: + + `facet:\-value`. example: - - category:Book + - + - category:Book + - category:-Movie - author:John Doe oneOf: - $ref: '#/components/schemas/listOfSearchFilters' @@ -157,13 +218,24 @@ components: - Filtering optionalFilters: description: > - Create filters to boost or demote records. + Filters to promote or demote records in the search results. + + + Optional filters work like facet filters, but they don't exclude records + from the search results. + + Records that match the optional filter rank before records that don't + match. + If you're using a negative filter `facet:-value`, matching records rank + after records that don't match. - Records that match the filter are ranked higher for positive and lower - for negative optional filters. In contrast to regular filters, records - that don't match the optional filter are still included in the results, - only their ranking is affected. + + - Optional filters don't work on virtual replicas. + + - Optional filters are applied _after_ sort-by attributes. + + - Optional filters don't work with numeric attributes. example: - category:Book - author:John Doe @@ -174,8 +246,20 @@ components: - Filtering numericFilters: description: > - [Filter on numeric - attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + Filter by numeric facets. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, + `>=`. Comparsions are precise up to 3 decimals. + + You can also provide ranges: `facet: TO `. The range + includes the lower and upper boundaries. + + The same combination rules apply as for `facetFilters`. example: - - inStock = 1 @@ -188,8 +272,19 @@ components: - Filtering tagFilters: description: > - [Filter hits by - tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + Filter the search by values of the special `_tags` attribute. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + Different from regular facets, `_tags` can only be used for filtering + (including or excluding records). + + You won't get a facet count. + + The same combination and escaping rules apply as for `facetFilters`. example: - - Book @@ -202,64 +297,104 @@ components: - Filtering page: type: integer - description: Page to retrieve (the first page is `0`, not `1`). + description: Page of search results to retrieve. default: 0 + minimum: 0 x-categories: - Pagination aroundLatLng: type: string - description: >- - Search for entries [around a central - location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - enabling a geographical search within a circular area. + description: > + Coordinates for the center of a circle, expressed as a comma-separated + string of latitude and longitude. + + + Only records included within circle around this central location are + included in the results. + + The radius of the circle is determined by the `aroundRadius` and + `minimumAroundRadius` settings. + + This parameter is ignored if you also specify `insidePolygon` or + `insideBoundingBox`. example: 40.71,-74.01 default: '' x-categories: - Geo-Search aroundLatLngViaIP: type: boolean - description: >- - Search for entries around a location. The location is automatically - computed from the requester's IP address. + description: Whether to obtain the coordinates from the request's IP address. default: false x-categories: - Geo-Search aroundRadiusAll: + title: all type: string + description: >- + Return all records with a valid `_geoloc` attribute. Don't filter by + distance. enum: - all aroundRadius: description: > - [Maximum - radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - for a geographical search (in meters). + Maximum radius for a search around a central location. + + + This parameter works in combination with the `aroundLatLng` and + `aroundLatLngViaIP` parameters. + + By default, the search radius is determined automatically from the + density of hits around the central location. + + The search radius is small if there are many hits close to the central + coordinates. oneOf: - type: integer minimum: 1 + description: Maximum search radius around a central location in meters. - $ref: '#/components/schemas/aroundRadiusAll' x-categories: - Geo-Search aroundPrecisionFromValue: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + title: range objects type: array items: type: object + description: >- + Range object with lower and upper values in meters to define custom + ranges. properties: from: type: integer + description: >- + Lower boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. + example: 20 value: type: integer + description: >- + Upper boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. aroundPrecision: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + description: > + Precision of a coordinate-based search in meters to group results with + similar distances. + + + The Geo ranking criterion considers all matches within the same range of + distances to be equal. oneOf: - type: integer default: 10 + description: > + Distance in meters to group results by similar distances. + + + For example, if you set `aroundPrecision` to 100, records wihin 100 + meters to the central coordinate are considered to have the same + distance, + + as are records between 100 and 199 meters. - $ref: '#/components/schemas/aroundPrecisionFromValue' x-categories: - Geo-Search @@ -268,12 +403,23 @@ components: items: type: array items: + minItems: 4 + maxItems: 4 type: number format: double - description: >- - Search inside a [rectangular - area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates for a rectangular area in which to search. + + + Each bounding box is defined by the two opposite points of its diagonal, + and expressed as latitude and longitude pair: + + `[p1 lat, p1 long, p2 lat, p2 long]`. + + Provide multiple bounding boxes as nested arrays. + + For more information, see [rectangular + area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). example: - - 47.3165 @@ -292,12 +438,23 @@ components: items: type: array items: + minItems: 6 + maxItems: 20000 type: number format: double - description: >- - Search inside a - [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates of a polygon in which to search. + + + Polygons are defined by 3 to 10,000 points. Each point is represented by + its latitude and longitude. + + Provide multiple polygons as nested arrays. + + For more information, see [filtering inside + polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + + This parameter is ignored, if you also specify `insideBoundingBox`. example: - - 47.3165 @@ -317,11 +474,15 @@ components: - Geo-Search userToken: type: string - description: >- - Associates a [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) - with the current search. - example: '123456' + description: > + Unique pseudonymous or anonymous user identifier. + + + This helps with analytics and click and conversion events. + + For more information, see [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + example: test-user-123 x-categories: - Personalization baseSearchParamsWithoutQuery: @@ -330,8 +491,29 @@ components: properties: similarQuery: type: string - description: Overrides the query parameter and performs a more generic search. + description: > + Keywords to be used instead of the search query to conduct a more + broader search. + + + Using the `similarQuery` parameter changes other settings: + + + - `queryType` is set to `prefixNone`. + + - `removeStopWords` is set to true. + + - `words` is set as the first ranking criterion. + + - All remaining words are treated as `optionalWords`. + + + Since the `similarQuery` is supposed to do a broad search, they + usually return many results. + + Combine it with `filters` to narrow down the list of results. default: '' + example: comedy drama crime Macy Buscemi x-categories: - Search filters: @@ -347,12 +529,15 @@ components: sumOrFiltersScores: type: boolean description: > - Determines how to calculate [filter - scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + Whether to sum all filter scores. - If `false`, maximum score is kept. - If `true`, score is summed. + If true, all filter scores are summed. + + Otherwise, the maximum filter score is kept. + + For more information, see [filter + scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). default: false x-categories: - Filtering @@ -363,9 +548,7 @@ components: example: - title - author - description: >- - Restricts a query to only look at a subset of your [searchable - attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + description: Restricts a search to a subset of your searchable attributes. default: [] x-categories: - Filtering @@ -373,21 +556,35 @@ components: type: array items: type: string - description: >- - Returns - [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - their facet values, and the number of matching facet values. + description: > + Facets for which to retrieve facet values that match the search + criteria and the number of matching facet values. + + + To retrieve all facets, use the wildcard character `*`. + + For more information, see + [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). default: [] + example: + - '*' x-categories: - Faceting facetingAfterDistinct: type: boolean description: > - Forces faceting to be applied after - [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - (with the distinct feature). Alternatively, the `afterDistinct` - [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - of `attributesForFaceting` allows for more granular control. + Whether faceting should be applied after deduplication with + `distinct`. + + + This leads to accurate facet counts when using faceting in + combination with `distinct`. + + It's usually better to use `afterDistinct` modifiers in the + `attributesForFaceting` setting, + + as `facetingAfterDistinct` only computes correct facet counts if all + records have the same facet values for the `attributeForDistinct`. default: false x-categories: - Faceting @@ -395,28 +592,12 @@ components: $ref: '#/components/schemas/page' offset: type: integer - description: > - Specifies the offset of the first hit to return. - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Position of the first hit to retrieve. x-categories: - Pagination length: type: integer - description: > - Sets the number of hits to retrieve (for use with `offset`). - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 x-categories: @@ -432,7 +613,7 @@ components: minimumAroundRadius: type: integer description: >- - Minimum radius (in meters) used for a geographical search when + Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. minimum: 1 x-categories: @@ -445,13 +626,19 @@ components: type: array items: type: string - description: >- - Changes the default values of parameters that work best for a - natural language query, such as `ignorePlurals`, `removeStopWords`, - `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These - parameters work well together when the query consists of fuller - natural language strings instead of keywords, for example when - processing voice search queries. + description: > + ISO language codes that adjust settings that are useful for + processing natural language queries (as opposed to keyword + searches): + + + - Sets `removeStopWords` and `ignorePlurals` to the list of provided + languages. + + - Sets `removeWordsIfNoResults` to `allOptional`. + + - Adds a `natural_language` attribute to `ruleContexts` and + `analyticsTags`. default: [] x-categories: - Languages @@ -459,19 +646,32 @@ components: type: array items: type: string - description: >- - Assigns [rule + description: > + Assigns a rule context to the search query. + + + [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - to search queries. + are strings that you can use to trigger matching rules. default: [] + example: + - mobile x-categories: - Rules personalizationImpact: type: integer - description: >- - Defines how much [Personalization affects - results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + description: > + Impact that Personalization should have on this search. + + + The higher this value is, the more Personalization determines the + ranking compared to other factors. + + For more information, see [Understanding Personalization + impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). default: 100 + minimum: 0 + maximum: 100 x-categories: - Personalization userToken: @@ -479,43 +679,32 @@ components: getRankingInfo: type: boolean description: >- - Incidates whether the search response includes [detailed ranking - information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + Whether the search response should include detailed ranking + information. default: false x-categories: - Advanced - explain: - type: array - items: - type: string - description: >- - Enriches the API's response with information about how the query was - processed. - default: [] - x-categories: - - Advanced synonyms: type: boolean - description: >- - Whether to take into account an index's synonyms for a particular - search. + description: Whether to take into account an index's synonyms for this search. default: true x-categories: - Advanced clickAnalytics: type: boolean - description: >- - Indicates whether a query ID parameter is included in the search - response. This is required for [tracking click and conversion - events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + description: > + Whether to include a `queryID` attribute in the response. + + + The query ID is a unique identifier for a search query and is + required for tracking [click and conversion + events](https://www.algolia.com/guides/sending-events/getting-started/). default: false x-categories: - Analytics analytics: type: boolean - description: >- - Indicates whether this query will be included in - [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + description: Whether this search will be included in Analytics. default: true x-categories: - Analytics @@ -532,14 +721,14 @@ components: percentileComputation: type: boolean description: >- - Whether to include or exclude a query from the processing-time - percentile computation. + Whether to include this search when calculating processing-time + percentiles. default: true x-categories: - Advanced enableABTest: type: boolean - description: Incidates whether this search will be considered in A/B testing. + description: Whether to enable A/B testing for this search. default: true x-categories: - Advanced @@ -557,37 +746,39 @@ components: - Pagination typoToleranceEnum: type: string + title: typo tolerance + description: | + - `min`. Return matches with the lowest number of typos. + For example, if you have matches without typos, only include those. + But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). + - `strict`. Return matches with the two lowest numbers of typos. + With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. enum: - min - strict typoTolerance: - description: >- - Controls whether [typo + description: > + Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + + + If typo tolerance is true, `min`, or `strict`, [word splitting and + concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + is also active. oneOf: - type: boolean default: true + description: >- + Whether typo tolerance is active. If true, matches with typos are + included in the search results and rank after exact matches. - $ref: '#/components/schemas/typoToleranceEnum' x-categories: - Typos ignorePlurals: - description: > - Treats singular, plurals, and other forms of declensions as matching - terms. - - `ignorePlurals` is used in conjunction with the `queryLanguages` - setting. - - _list_: language ISO codes for which ignoring plurals should be enabled. - This list will override any values that you may have set in - `queryLanguages`. _true_: enables the ignore plurals feature, where - singulars and plurals are considered equivalent ("foot" = "feet"). The - languages supported here are either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the ignore plurals feature, so that singulars and plurals aren't - considered to be the same ("foot" will not find "feet"). + description: | + Treat singular, plurals, and other forms of declensions as equivalent. + You should only use this feature for the languages used in your index. example: - ca - es @@ -595,26 +786,32 @@ components: - type: array items: type: string + description: | + ISO code for languages for which this feature should be active. + This overrides languages you set with `queryLanguages`. - type: boolean + description: > + If true, `ignorePlurals` is active for all languages included in + `queryLanguages`, or for all supported languages, if `queryLanguges` + is empty. + + If false, singulars, plurals, and other declensions won't be + considered equivalent. default: false x-categories: - Languages removeStopWords: description: > - Removes stop (common) words from the query before executing it. + Removes stop words from the search query. - `removeStopWords` is used in conjunction with the `queryLanguages` - setting. - _list_: language ISO codes for which stop words should be enabled. This - list will override any values that you may have set in `queryLanguages`. - _true_: enables the stop words feature, ensuring that stop words are - removed from consideration in a search. The languages supported here are - either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the stop words feature, allowing stop words to be taken into account - in a search. + Stop words are common words like articles, conjunctions, prepositions, + or pronouns that have little or no meaning on their own. + + In English, "the", "a", or "and" are stop words. + + + You should only use this feature for the languages used in your index. example: - ca - es @@ -622,8 +819,17 @@ components: - type: array items: type: string + description: >- + ISO code for languages for which stop words should be removed. + This overrides languages you set in `queryLanguges`. - type: boolean default: false + description: > + If true, stop words are removed for all languages you included in + `queryLanguages`, or for all supported languages, if + `queryLanguages` is empty. + + If false, stop words are not removed. x-categories: - Languages queryType: @@ -632,9 +838,23 @@ components: - prefixLast - prefixAll - prefixNone - description: >- - Determines how query words are [interpreted as - prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + description: > + Determines if and how query words are interpreted as prefixes. + + + By default, only the last query word is treated as prefix + (`prefixLast`). + + To turn off prefix search, use `prefixNone`. + + Avoid `prefixAll`, which treats all query words as prefixes. + + This might lead to counterintuitive results and makes your search + slower. + + + For more information, see [Prefix + searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). default: prefixLast x-categories: - Query strategy @@ -646,10 +866,39 @@ components: - firstWords - allOptional example: firstWords - description: >- - Strategy to [remove - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - from the query when it doesn't match any hits. + description: > + Strategy for removing words from the query when it doesn't return any + results. + + This helps to avoid returning empty search results. + + +
+ +
none
+ +
No words are removed when a query doesn't return results.
+ +
lastWords
+ +
Treat the last (then second to last, then third to last) word as + optional, until there are results or at most 5 words have been + removed.
+ +
firstWords
+ +
Treat the first (then second, then third) word as optional, until + there are results or at most 5 words have been removed.
+ +
allOptional
+ +
Treat all words as optional.
+ +
+ + + For more information, see [Remove words to improve + results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). default: none x-categories: - Query strategy @@ -658,21 +907,26 @@ components: enum: - neuralSearch - keywordSearch - description: Search mode the index will use to query for results. + description: > + Search mode the index will use to query for results. + + + This setting only applies to indices, for which Algolia enabled + NeuralSearch for you. default: keywordSearch x-categories: - Query strategy semanticSearch: type: object - description: > - Settings for the semantic search part of NeuralSearch. Only used when - `mode` is _neuralSearch_. + description: | + Settings for the semantic search part of NeuralSearch. + Only used when `mode` is `neuralSearch`. properties: eventSources: - description: >- - Indices from which to collect click and conversion events. If null, - the current index and replica group will be used as the event - source. + description: | + Indices from which to collect click and conversion events. + + If null, the current index and all its replicas are used. nullable: true type: array items: @@ -683,10 +937,51 @@ components: - attribute - none - word - description: >- + description: > Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - is computed when the query contains only one word. + is computed when the search query has only one word. + + +
+ +
attribute
+ +
+ + The Exact ranking criterion is 1 if the query word and attribute value + are the same. + + For example, a search for "road" will match the value "road", but not + "road trip". + +
+ +
none
+ +
+ + The Exact ranking criterion is ignored on single-word searches. + +
+ +
word
+ +
+ + The Exact ranking criterion is 1 if the query word is found in the + attribute value. + + The query word must have at least 3 characters and must not be a stop + word. + +
+ +
+ + + If `exactOnSingleWordQuery` is `word`, only exact matches will be + highlighted, partial and prefix matches won't. default: attribute x-categories: - Query strategy @@ -706,13 +1001,41 @@ components: x-categories: - Query strategy distinct: - description: >- - Enables [deduplication or grouping of results (Algolia's _distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + description: > + Determines how many records of a group are included in the search + results. + + + Records with the same value for the `attributeForDistinct` attribute are + considered a group. + + The `distinct` setting controls how many members of the group are + returned. + + This is useful for [deduplication and + grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + + + The `distinct` setting is ignored if `attributeForDistinct` is not set. example: 1 oneOf: - type: boolean + description: >- + Whether deduplication is turned on. If true, only one member of a + group is shown in the search results. - type: integer + description: > + Number of members of a group of records to include in the search + results. + + + - Don't use `distinct > 1` for records that might be [promoted by + rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/). + The number of hits won't be correct and faceting won't work as expected. + - With `distinct > 1`, the `hitsPerPage` parameter controls the + number of returned groups. + For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned. + Likewise, the `nbHits` response attribute contains the number of returned groups. minimum: 0 maximum: 4 default: 0 @@ -721,31 +1044,56 @@ components: maxFacetHits: type: integer description: >- - Maximum number of facet hits to return when [searching for facet + Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). maximum: 100 default: 10 x-categories: - Advanced order: - description: Pinned order of facet lists. + description: > + Explicit order of facets or facet values. + + + This setting lets you always show specific facets or facet values at the + top of the list. type: array items: type: string facets: - description: Ordering of facets (widgets). + description: Order of facet names. type: object additionalProperties: false properties: order: $ref: '#/components/schemas/order' sortRemainingBy: - description: | - How to display the remaining items: + description: > + Order of facet values that aren't explicitly positioned with the `order` + setting. + + +
+ +
count
+ +
+ + Order remaining facet values by decreasing count. + + The count is the number of matching records containing this facet value. + +
+ +
alpha
- - `count`: facet count (descending). - - `alpha`: alphabetical (ascending). - - `hidden`: show only pinned values. +
Sort facet values alphabetically.
+ +
hidden
+ +
Don't show facet values that aren't explicitly positioned.
+ +
. type: string enum: - count @@ -760,12 +1108,13 @@ components: sortRemainingBy: $ref: '#/components/schemas/sortRemainingBy' values: - description: Ordering of facet values within an individual facet. + description: Order of facet values. One object for each facet. type: object additionalProperties: + x-additionalPropertiesName: facet $ref: '#/components/schemas/value' facetOrdering: - description: Defines the ordering of facets (widgets). + description: Order of facet names and facet values in your UI. type: object additionalProperties: false properties: @@ -774,12 +1123,14 @@ components: values: $ref: '#/components/schemas/values' renderingContent: - description: >- - Extra content for the search UI, for example, to control the [ordering - and display of - facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - You can set a default value and dynamically override it with - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + description: > + Extra data that can be used in the search UI. + + + You can use this to control aspects of your search UI, such as, the + order of facet names and values + + without changing your frontend code. type: object additionalProperties: false properties: @@ -788,11 +1139,11 @@ components: x-categories: - Advanced reRankingApplyFilter: - description: >- - When [Dynamic - Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) - is enabled, only records that match these filters will be affected by - Dynamic Re-Ranking. + description: > + Restrict [Dynamic + Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) + to records that match these filters. + nullable: true oneOf: - $ref: '#/components/schemas/listOfSearchFilters' - type: string @@ -803,26 +1154,6 @@ components: type: object additionalProperties: false properties: - attributesForFaceting: - type: array - items: - type: string - example: - - author - - filterOnly(isbn) - - searchable(edition) - - afterDistinct(category) - - afterDistinct(searchable(publisher)) - description: > - Attributes used for - [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) - and the - [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - that can be applied: `filterOnly`, `searchable`, and - `afterDistinct`. - default: [] - x-categories: - - Faceting attributesToRetrieve: type: array items: @@ -831,10 +1162,22 @@ components: - author - title - content - description: >- - Attributes to include in the API response. To reduce the size of - your response, you can retrieve only some of the attributes. By - default, the response includes all attributes. + description: > + Attributes to include in the API response. + + + To reduce the size of your response, you can retrieve only some of + the attributes. + + + - `*` retrieves all attributes, except attributes included in the + `customRanking` and `unretrievableAttributes` settings. + + - To retrieve all attributes except a specific one, prefix the + attribute with a dash and combine it with the `*`: `["*", + "-ATTRIBUTE"]`. + + - The `objectID` attribute is always included. default: - '*' x-categories: @@ -843,9 +1186,46 @@ components: type: array items: type: string - description: >- - Determines the order in which Algolia [returns your - results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + description: > + Determines the order in which Algolia returns your results. + + + By default, each entry corresponds to a [ranking + criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + + The tie-breaking algorithm sequentially applies each criterion in + the order they're specified. + + If you configure a replica index for [sorting by an + attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + + you put the sorting attribute at the top of the list. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + Before you modify the default setting, + + you should test your changes in the dashboard, + + and by [A/B + testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). default: - typo - geo @@ -865,19 +1245,59 @@ components: - desc(popularity) - asc(price) description: > - Specifies the [Custom ranking - criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). - Use the `asc` and `desc` modifiers to specify the ranking order: - ascending or descending. + Attributes to use as [custom + ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). + + + The custom ranking attributes decide which items are shown first if + the other ranking criteria are equal. + + + Records with missing values for your selected custom ranking + attributes are always sorted last. + + Boolean attributes are sorted based on their alphabetical order. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + If you use two or more custom ranking attributes, [reduce the + precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + of your first attributes, + + or the other attributes will never be applied. default: [] x-categories: - Ranking relevancyStrictness: type: integer example: 90 - description: >- + description: > Relevancy threshold below which less relevant results aren't included in the results. + + + You can only set `relevancyStrictness` on [virtual replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + + Use this setting to strike a balance between the relevance and + number of returned results. default: 100 x-categories: - Ranking @@ -888,11 +1308,28 @@ components: example: - author - title + - conten - content - description: >- - Attributes to highlight. Strings that match the search query in the - attributes are highlighted by surrounding them with HTML tags - (`highlightPreTag` and `highlightPostTag`). + description: > + Attributes to highlight. + + + By default, all searchable attributes are highlighted. + + Use `*` to highlight all attributes or use an empty array `[]` to + turn off highlighting. + + + With highlighting, strings that match the search query are + surrounded by HTML tags defined by `highlightPreTag` and + `highlightPostTag`. + + You can use this to visually highlight matching parts of a search + query in your UI. + + + For more information, see [Highlighting and + snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). x-categories: - Highlighting and Snippeting attributesToSnippet: @@ -903,26 +1340,36 @@ components: - content:80 - description description: > - Attributes to _snippet_. 'Snippeting' is shortening the attribute to - a certain number of words. If not specified, the attribute is - shortened to the 10 words around the matching string but you can - specify the number. For example: `body:20`. + Attributes for which to enable snippets. + + + Snippets provide additional context to matched words. + + If you enable snippets, they include 10 words, including the matched + word. + + The matched word will also be wrapped by HTML tags for highlighting. + + You can adjust the number of words with the following notation: + `ATTRIBUTE:NUMBER`, + + where `NUMBER` is the number of words to be extracted. default: [] x-categories: - Highlighting and Snippeting highlightPreTag: type: string description: >- - HTML string to insert before the highlighted parts in all highlight - and snippet results. + HTML tag to insert before the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting highlightPostTag: type: string description: >- - HTML string to insert after the highlighted parts in all highlight - and snippet results. + HTML tag to insert after the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting @@ -934,9 +1381,11 @@ components: - Highlighting and Snippeting restrictHighlightAndSnippetArrays: type: boolean - description: >- - Restrict highlighting and snippeting to items that matched the - query. + description: > + Whether to restrict highlighting and snippeting to items that at + least partially matched the search query. + + By default, all items are highlighted and snippeted. default: false x-categories: - Highlighting and Snippeting @@ -945,7 +1394,7 @@ components: minWordSizefor1Typo: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 4 @@ -954,7 +1403,7 @@ components: minWordSizefor2Typos: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 8 @@ -964,9 +1413,11 @@ components: $ref: '#/components/schemas/typoTolerance' allowTyposOnNumericTokens: type: boolean - description: >- - Whether to allow typos on numbers ("numeric tokens") in the query - string. + description: | + Whether to allow typos on numbers in the search query. + + Turn off this setting to reduce the number of irrelevant matches + when searching in large sets of similar numbers. default: true x-categories: - Typos @@ -976,9 +1427,23 @@ components: type: string example: - sku - description: >- + description: > Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + + Returning only exact matches can help when: + + + - [Searching in hyphenated + attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + + - Reducing the number of matches when you have too many. + This can happen with attributes that are long blocks of text, such as product descriptions. + + Consider alternatives such as `disableTypoToleranceOnWords` or + adding synonyms if your attributes have intentional unusual + spellings that might look like typos. default: [] x-categories: - Typos @@ -989,9 +1454,12 @@ components: keepDiacriticsOnCharacters: type: string example: øé - description: >- - Characters that the engine shouldn't automatically - [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: | + Characters for which diacritics should be preserved. + + By default, Algolia removes diacritics from letters. + For example, `é` becomes `e`. If this causes issues in your search, + you can specify characters that should keep their diacritics. default: '' x-categories: - Languages @@ -1001,39 +1469,64 @@ components: type: string example: - es - description: >- - Sets your user's search language. This adjusts language-specific - settings and features such as `ignorePlurals`, `removeStopWords`, - and + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for language-specific settings such as plurals, stop words, and + word-detection dictionaries. + + + This setting sets a default list of languages used by the + `removeStopWords` and `ignorePlurals` settings. + + This setting also sets a dictionary for word detection in the + logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - word detection. + languages. + + To support this, you must place the CJK language **first**. + + + + **You should always specify a query language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages decompoundQuery: type: boolean description: > - [Splits compound - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - into their component word parts in the query. + Whether to split compound words into their building blocks. + + + For more information, see [Word + segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + + Word segmentation is supported for these languages: German, Dutch, + Finnish, Swedish, and Norwegian. default: true x-categories: - Languages enableRules: type: boolean - description: >- - Incidates whether - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) - are enabled. + description: Whether to enable rules. default: true x-categories: - Rules enablePersonalization: type: boolean - description: >- - Incidates whether - [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - is enabled. + description: Whether to enable Personalization. default: false x-categories: - Personalization @@ -1047,9 +1540,13 @@ components: $ref: '#/components/schemas/semanticSearch' advancedSyntax: type: boolean - description: >- - Enables the [advanced query - syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + description: > + Whether to support phrase matching and excluding words from search + queries. + + + Use the `advancedSyntaxFeatures` parameter to control which feature + is supported. default: false x-categories: - Query strategy @@ -1060,10 +1557,43 @@ components: example: - blue - iphone case - description: >- - Words which should be considered - [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - when found in a query. + description: > + Words that should be considered optional when found in the query. + + + By default, records must match all words in the search query to be + included in the search results. + + Adding optional words can help to increase the number of search + results by running an additional search query that doesn't include + the optional words. + + For example, if the search query is "action video" and "video" is an + optional word, + + the search engine runs two queries. One for "action video" and one + for "action". + + Records that match all words are ranked higher. + + + For a search query with 4 or more words **and** all its words are + optional, + + the number of matched words required for a record to be included in + the search results increases for every 1,000 records: + + + - If `optionalWords` has less than 10 words, the required number of + matched words increases by 1: + results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. + - If `optionalWords` has 10 or more words, the number of required + matched words increases by the number of optional words dividied by + 5 (rounded down). + For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. + + For more information, see [Optional + words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). default: [] x-categories: - Query strategy @@ -1073,9 +1603,22 @@ components: type: string example: - description - description: >- - Attributes for which you want to [turn off the exact ranking + description: > + Searchable attributes for which you want to [turn off the Exact + ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + + + This can be useful for attributes with long values, where the + likelyhood of an exact match is high, + + such as product descriptions. + + Turning off the Exact ranking criterion for these attributes favors + exact matching on other attributes. + + This reduces the impact of individual attributes with a lot of + content on ranking. default: [] x-categories: - Query strategy @@ -1085,10 +1628,42 @@ components: type: array items: $ref: '#/components/schemas/alternativesAsExact' - description: >- - Alternatives that should be considered an exact match by [the exact - ranking - criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + description: > + Alternatives of query words that should be considered as exact + matches by the Exact ranking criterion. + + +
+ +
ignorePlurals
+ +
+ + + Plurals and similar declensions added by the `ignorePlurals` setting + are considered exact matches. + + +
+ +
singleWordSynonym
+ +
+ + Single-word synonyms, such as "NY/NYC" are considered exact matches. + +
+ +
multiWordsSynonym
+ +
+ + Multi-word synonyms, such as "NY/New York" are considered exact + matches. + +
+ +
. default: - ignorePlurals - singleWordSynonym @@ -1098,9 +1673,42 @@ components: type: array items: $ref: '#/components/schemas/advancedSyntaxFeatures' - description: >- - Allows you to specify which advanced syntax features are active when - `advancedSyntax` is enabled. + description: > + Advanced search syntax features you want to support. + + +
+ +
exactPhrase
+ +
+ + + Phrases in quotes must match exactly. + + For example, `sparkly blue "iPhone case"` only returns records with + the exact string "iPhone case". + + +
+ +
excludeWords
+ +
+ + + Query words prefixed with a `-` must not occur in a record. + + For example, `search -engine` matches records that contain "search" + but not "engine". + + +
+ +
+ + + This setting only has an effect if `advancedSyntax` is true. default: - exactPhrase - excludeWords @@ -1110,9 +1718,27 @@ components: $ref: '#/components/schemas/distinct' replaceSynonymsInHighlight: type: boolean - description: >- - Whether to highlight and snippet the original word that matches the - synonym or the synonym itself. + description: > + Whether to replace a highlighted word with the matched synonym. + + + By default, the original words are highlighted even if a synonym + matches. + + For example, with `home` as a synonym for `house` and a search for + `home`, + + records matching either "home" or "house" are included in the search + results, + + and either "home" or "house" are highlighted. + + + With `replaceSynonymsInHighlight` set to `true`, a search for `home` + still matches the same records, + + but all occurences of "house" are replaced by "home" in the + highlighted response. default: false x-categories: - Highlighting and Snippeting @@ -1120,9 +1746,18 @@ components: type: integer minimum: 1 maximum: 7 - description: >- - Precision of the [proximity ranking - criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + description: > + Minimum proximity score for two matching words. + + + This adjusts the [Proximity ranking + criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + + by equally scoring matches that are farther apart. + + + For example, if `minProximity` is 2, neighboring matches and matches + with one word between them would have the same score. default: 1 x-categories: - Advanced @@ -1130,10 +1765,28 @@ components: type: array items: type: string - description: >- - Attributes to include in the API response for search and browse - queries. - default: [] + description: > + Properties to include in the API response of `search` and `browse` + requests. + + + By default, all response properties are included. + + To reduce the response size, you can select, which attributes should + be included. + + + You can't exclude these properties: + + `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, + + `abTestVariantID`, `parsedQuery`, or any property triggered by the + `getRankingInfo` parameter. + + + Don't exclude properties that you might need in your search UI. + default: + - '*' x-categories: - Advanced maxFacetHits: @@ -1142,21 +1795,58 @@ components: type: integer description: Maximum number of facet values to return for each facet. default: 100 + maximum: 1000 x-categories: - Faceting sortFacetValuesBy: type: string - description: Controls how facet values are fetched. + description: > + Order in which to retrieve facet values. + + +
+ +
count
+ +
+ + Facet values are retrieved by decreasing count. + + The count is the number of matching records containing this facet + value. + +
+ +
alpha
+ +
Retrieve facet values alphabetically.
+ +
+ + + This setting doesn't influence how facet values are displayed in + your UI (see `renderingContent`). + + For more information, see [facet value + display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). default: count x-categories: - Faceting attributeCriteriaComputedByMinProximity: type: boolean - description: >- - When the [Attribute criterion is ranked above - Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - in your ranking formula, Proximity is used to select which - searchable attribute is matched in the Attribute ranking stage. + description: > + Whether the best matching attribute should be determined by minimum + proximity. + + + This setting only affects ranking if the Attribute ranking criterion + comes before Proximity in the `ranking` setting. + + If true, the best matching attribute is selected based on the + minimum proximity of multiple matches. + + Otherwise, the best matching attribute is determined by the order in + the `searchableAttributes` setting. default: false x-categories: - Advanced @@ -1164,15 +1854,20 @@ components: $ref: '#/components/schemas/renderingContent' enableReRanking: type: boolean - description: >- - Indicates whether this search will use [Dynamic + description: > + Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + + + This setting only has an effect if you activated Dynamic Re-Ranking + for this index in the Algolia dashboard. default: true x-categories: - Filtering reRankingApplyFilter: $ref: '#/components/schemas/reRankingApplyFilter' searchParamsObject: + title: Search parameters as object allOf: - $ref: '#/components/schemas/baseSearchParams' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -1221,8 +1916,7 @@ components: - bought-together objectID: type: string - description: Unique object identifier. - example: product-1 + description: Unique record identifier. baseRecommendationsQuery: type: object additionalProperties: false @@ -1286,11 +1980,11 @@ components: deprecated: true nbHits: type: integer - description: Number of hits the search query matched. + description: Number of results (hits). example: 20 nbPages: type: integer - description: Number of pages of results for the current query. + description: Number of pages of results. example: 1 processingTimeMS: type: integer @@ -1329,7 +2023,10 @@ components: example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 - description: Lets you store custom data in your indices. + description: | + An object with custom data. + + You can store up to 32 kB as custom data. default: {} x-categories: - Advanced @@ -1361,7 +2058,7 @@ components: pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$ automaticRadius: type: string - description: Automatically-computed radius. + description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: type: object title: exhaustive @@ -1425,10 +2122,12 @@ components: title: facets type: object additionalProperties: + x-additionalPropertiesName: facet type: object additionalProperties: + x-additionalPropertiesName: facet count type: integer - description: Mapping of each facet name to the corresponding facet counts. + description: Facet counts. example: category: food: 1 @@ -1532,18 +2231,18 @@ components: example: a00dbc80a8d13c4565a442e7e2dca80a highlightedValue: type: string - description: Markup text with `facetQuery` matches highlighted. + description: Highlighted attribute value, including HTML tags. example: George Clooney matchLevel: type: string - description: Indicates how well the attribute matched the search query. + description: Whether the whole query string matches or only a part. enum: - none - partial - full highlightResultOption: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: false properties: value: @@ -1552,7 +2251,7 @@ components: $ref: '#/components/schemas/matchLevel' matchedWords: type: array - description: List of words from the query that matched the object. + description: List of matched words from the search query. example: - action items: @@ -1566,12 +2265,13 @@ components: - matchedWords highlightResultOptionMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResultOption' highlightResultOptionArray: type: array - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. items: $ref: '#/components/schemas/highlightResultOption' highlightResult: @@ -1581,14 +2281,13 @@ components: - $ref: '#/components/schemas/highlightResultOptionArray' highlightResultMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResult' snippetResultOption: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: false properties: value: @@ -1600,16 +2299,13 @@ components: - matchLevel snippetResultOptionMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResultOption' snippetResultOptionArray: type: array - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. items: $ref: '#/components/schemas/snippetResultOption' snippetResult: @@ -1619,10 +2315,9 @@ components: - $ref: '#/components/schemas/snippetResultOptionArray' snippetResultMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResult' matchedGeoLocation: type: object @@ -1654,24 +2349,29 @@ components: description: The score of the event. rankingInfo: type: object + description: Object with detailed information about the record's ranking. additionalProperties: false properties: filters: type: integer - description: This field is reserved for advanced usage. + minimum: 0 + description: Whether a filter matched the query. firstMatchedWord: type: integer + minimum: 0 description: >- - Position of the most important matched attribute in the attributes - to index list. + Position of the first matched word in the best matching attribute of + the record. geoDistance: type: integer + minimum: 0 description: >- Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). geoPrecision: type: integer + minimum: 1 description: Precision used when computing the geo distance, in meters. matchedGeoLocation: $ref: '#/components/schemas/matchedGeoLocation' @@ -1679,27 +2379,33 @@ components: $ref: '#/components/schemas/personalization' nbExactWords: type: integer + minimum: 0 description: Number of exactly matched words. nbTypos: type: integer + minimum: 0 description: Number of typos encountered when matching the record. promoted: type: boolean - description: Present and set to true if a Rule promoted the hit. + description: Whether the record was promoted by a rule. proximityDistance: type: integer + minimum: 0 description: >- - When the query contains more than one word, the sum of the distances - between matched words (in meters). + Number of words between multiple matches in the query plus 1. For + single word queries, `proximityDistance` is 0. userScore: type: integer - description: Custom ranking for the object, expressed as a single integer value. + description: >- + Overall ranking of the record, expressed as a single integer. This + attribute is internal. words: type: integer - description: Number of matched words, including prefixes and typos. + minimum: 1 + description: Number of matched words. promotedByReRanking: type: boolean - description: Wether the record are promoted by the re-ranking strategy. + description: Whether the record is re-ranked. required: - promoted - nbTypos @@ -1790,10 +2496,15 @@ components: 8601](https://wikipedia.org/wiki/ISO_8601) format. anchoring: type: string - description: >- - Whether the pattern parameter matches the beginning (`startsWith`) or - end (`endsWith`) of the query string, is an exact match (`is`), or a - partial match (`contains`). + description: | + Which part of the search query the pattern should match: + + - `startsWith`. The pattern must match the begginning of the query. + - `endsWith`. The pattern must match the end of the query. + - `is`. The pattern must match the query exactly. + - `contains`. The pattern must match anywhere in the query. + + Empty queries are only allowed as pattern with `anchoring: is`. enum: - is - startsWith @@ -1805,18 +2516,49 @@ components: properties: pattern: type: string - description: Query pattern syntax. - example: '{facet:brand}' + description: > + Query pattern that triggers the rule. + + + You can use either a literal string, or a special pattern + `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. + + The rule is triggered if the query matches the literal string or a + value of the specified facet. + + For example, with `pattern: {facet:genre}`, the rule is triggered + when users search for a genre, such as "comedy". + example: '{facet:genre}' anchoring: $ref: '#/components/schemas/anchoring' alternatives: type: boolean - description: Whether the pattern matches on plurals, synonyms, and typos. + description: Whether the pattern should match plurals, synonyms, and typos. default: false context: type: string - description: 'Rule context format: [A-Za-z0-9_-]+).' - example: trackedFilters + pattern: '[A-Za-z0-9_-]+' + description: > + An additional restriction that only triggers the rule, when the + search has the same value as `ruleContexts` parameter. + + For example, if `context: mobile`, the rule is only triggered when + the search request has a matching `ruleContexts: mobile`. + + A rule context must only contain alphanumeric characters. + example: mobile + filters: + type: string + description: > + Filters that trigger the rule. + + + You can add add filters using the syntax `facet:value` so that the + rule is triggered, when the specific filter is selected. + + You can use `filters` on its own or combine it with the `pattern` + parameter. + example: genre:comedy editType: description: Type of edit. type: string @@ -1834,57 +2576,79 @@ components: type: string insert: description: >- - Text that should be inserted in place of the removed text inside the - query string. + Text to be added in place of the deleted text inside the query + string. type: string consequenceQueryObject: type: object additionalProperties: false properties: remove: - description: Words to remove. + description: Words to remove from the search query. type: array items: type: string edits: - description: Edits to apply. + description: Changes to make to the search query. type: array items: $ref: '#/components/schemas/edit' consequenceQuery: - description: >- - When providing a string, it replaces the entire query string. When - providing an object, it describes incremental edits to be made to the - query string (but you can't do both). + description: > + Replace or edit the search query. + + + If `consequenceQuery` is a string, the entire search query is replaced + with that string. + + If `consequenceQuery` is an object, it describes incremental edits made + to the query. oneOf: - $ref: '#/components/schemas/consequenceQueryObject' - type: string automaticFacetFilter: type: object - description: Automatic facet Filter. + description: Filter or optional filter to be applied to the search. additionalProperties: false properties: facet: type: string - description: >- - Attribute to filter on. This must match a facet placeholder in the - Rule's pattern. + description: > + Facet name to be applied as filter. + + The name must match placeholders in the `pattern` parameter. + + For example, with `pattern: {facet:genre}`, `automaticFacetFilters` + must be `genre`. score: type: integer default: 1 - description: >- - Score for the filter. Typically used for optional or disjunctive - filters. + description: Filter scores to give different weights to individual filters. disjunctive: type: boolean default: false - description: Whether the filter is disjunctive (true) or conjunctive (false). + description: > + Whether the filter is disjunctive or conjunctive. + + + If true the filter has multiple matches, multiple occurences are + combined with the logical `OR` operation. + + If false, multiple occurences are combined with the logical `AND` + operation. required: - facet automaticFacetFilters: - description: >- - Names of facets to which automatic filtering must be applied; they must - match the facet name of a facet value placeholder in the query pattern. + description: > + Filter to be applied to the search. + + + You can use this to respond to search queries that match a facet value. + + For example, if users search for "comedy", which matches a facet value + of the "genre" facet, + + you can filter the results to show the top-ranked comedy movies. oneOf: - type: array items: @@ -1894,7 +2658,12 @@ components: type: string params: type: object - description: Additional search parameters. + description: > + Parameters to apply to this search. + + + You can use all search parameters, plus special `automaticFacetFilters`, + `automaticOptionalFacetFilters`, and `query`. additionalProperties: false properties: query: @@ -1913,38 +2682,39 @@ components: promotePosition: type: integer description: >- - The position to promote the records to. If you pass objectIDs, the - records are placed at this position as a group. For example, if you - pronmote four objectIDs to position 0, the records take the first four - positions. + Position in the search results where you want to show the promoted + records. example: 0 promoteObjectIDs: + title: objectIDs description: Records to promote. type: object additionalProperties: false properties: objectIDs: type: array - description: Unique identifiers of the records to promote. - example: - - 3f31c087763a2ceec359b318fc3edef3 - - 63c3c871e31a152d67df7720192fd752 + maxItems: 100 + description: | + Object IDs of the records you want to promote. + + The records are placed as a group at the `position`. + For example, if you want to promote four records to position `0`, + they will be the first four search results. items: - type: string + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: - position - objectIDs promoteObjectID: + title: objectID description: Record to promote. type: object additionalProperties: false properties: objectID: - type: string - example: 2b642cf64c587f50388eb1b8d047bf56 - description: Unique identifier of the record to promote. + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: @@ -1957,32 +2727,50 @@ components: consequence: type: object description: > - [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - of a rule. + Effect of the rule. + + + For more information, see + [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). additionalProperties: false properties: params: $ref: '#/components/schemas/consequenceParams' promote: type: array - description: Records to promote. + maxItems: 300 + description: > + Records you want to pin to a specific position in the search + results. + + + You can promote up to 300 records, either individually, or as groups + of up to 100 records each. items: $ref: '#/components/schemas/promote' filterPromotes: type: boolean default: false - description: >- - Only use in combination with the `promote` consequence. When `true`, - promoted results will be restricted to match the filters of the - current search. When `false`, the promoted results will show up - regardless of the filters. + description: > + Whether promoted records must match an active filter for the + consequence to be applied. + + + This ensures that user actions (filtering the search) are given a + higher precendence. + + For example, if you promote a record with the `color: red` + attribute, and the user filters the search for `color: blue`, + + the "red" record won't be shown. hide: type: array - description: Records to hide. By default, you can hide up to 50 records per rule. + maxItems: 50 + description: Records you want to hide from the search results. items: title: consequenceHide type: object - description: Unique identifier of the record to hide. + description: Object ID of the record to hide. additionalProperties: false properties: objectID: @@ -1990,10 +2778,12 @@ components: required: - objectID userData: - description: >- - Custom JSON object that will be appended to the userData array in - the response. This object isn't interpreted by the API. It's limited - to 1kB of minified JSON. + description: > + A JSON object with custom data that will be appended to the + `userData` array in the response. + + This object isn't interpreted by the API and is limited to 1 kB + of minified JSON. example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 @@ -2042,9 +2832,10 @@ components: description: > Unique identifier of a task. + A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the - `task` operation and this `taskID`. + [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. deletedAt: type: string example: '2023-06-27T14:42:38.831Z' @@ -2056,15 +2847,17 @@ components: enum: - published - notPublished - description: _published_ if the task has been processed, _notPublished_ otherwise. + description: >- + Task status, `published` if the task is completed, `notPublished` + otherwise. parameters_query: type: string - description: Full-text query. + description: Search query. default: '' parameters_page: type: integer minimum: 0 - description: Requested page (the first page is page 0). + description: Requested page of the API response. parameters_hitsPerPage: type: integer default: 20 diff --git a/specs/bundled/recommend.yml b/specs/bundled/recommend.yml index 33346fee2a..31116ab4e7 100644 --- a/specs/bundled/recommend.yml +++ b/specs/bundled/recommend.yml @@ -39,11 +39,11 @@ components: IndexName: name: indexName in: path - description: Index on which to perform the request. + description: Name of the index on which to perform the operation. required: true schema: type: string - example: myIndexName + example: YourIndexName Models: in: path name: model @@ -56,7 +56,7 @@ components: ObjectID: name: objectID in: path - description: Unique record (object) identifier. + description: Unique record identifier. required: true schema: type: string @@ -73,7 +73,7 @@ components: indexName: type: string example: products - description: Algolia index name. + description: Index name. baseRecommendRequest: type: object additionalProperties: false @@ -112,7 +112,7 @@ components: - trending-items query: type: string - description: Text to search for in an index. + description: Search query. default: '' x-categories: - Search @@ -125,13 +125,53 @@ components: filters: type: string description: > - [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) - the query with numeric, facet, or tag filters. + Filter the search so that only records with matching values are included + in the results. + + + These filters are supported: + + + - **Numeric filters.** ` `, where `` is one of + `<`, `<=`, `=`, `!=`, `>`, `>=`. + + - **Ranges.** `: TO ` where `` and `` + are the lower and upper limits of the range (inclusive). + + - **Facet filters.** `:` where `` is a facet + attribute (case-sensitive) and `` a facet value. + + - **Tag filters.** `_tags:` or just `` (case-sensitive). + + - **Boolean filters.** `: true | false`. + + + You can combine filters with `AND`, `OR`, and `NOT` operators with the + following restrictions: + + + - You can only combine filters of the same type with `OR`. + **Not supported:** `facet:value OR num > 3`. + - You can't use `NOT` with combinations of filters. + **Not supported:** `NOT(facet:value OR facet:value)` + - You can't combine conjunctions (`AND`) with `OR`. + **Not supported:** `facet:value OR (facet:value AND facet:value)` + + Use quotes around your filters, if the facet attribute name or facet + value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. + + If a facet attribute is an array, the filter matches if it matches at + least one element of the array. + + + For more information, see + [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). example: (category:Book OR category:Ebook) AND _tags:published default: '' x-categories: - Filtering searchFiltersArrayString: + title: search filter array type: array items: type: string @@ -141,14 +181,35 @@ components: - type: string listOfSearchFilters: type: array + title: search filters items: $ref: '#/components/schemas/mixedSearchFilters' facetFilters: description: > - [Filter hits by facet - value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + Filter the search by facet values, so that only records with the same + facet values are retrieved. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. + + - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 + AND filter3`. + + - `facet:-value` is interpreted as `NOT facet:value`. + + + While it's best to avoid attributes that start with a `-`, you can still + filter them by escaping with a backslash: + + `facet:\-value`. example: - - category:Book + - + - category:Book + - category:-Movie - author:John Doe oneOf: - $ref: '#/components/schemas/listOfSearchFilters' @@ -157,13 +218,24 @@ components: - Filtering optionalFilters: description: > - Create filters to boost or demote records. + Filters to promote or demote records in the search results. + + + Optional filters work like facet filters, but they don't exclude records + from the search results. + + Records that match the optional filter rank before records that don't + match. + If you're using a negative filter `facet:-value`, matching records rank + after records that don't match. - Records that match the filter are ranked higher for positive and lower - for negative optional filters. In contrast to regular filters, records - that don't match the optional filter are still included in the results, - only their ranking is affected. + + - Optional filters don't work on virtual replicas. + + - Optional filters are applied _after_ sort-by attributes. + + - Optional filters don't work with numeric attributes. example: - category:Book - author:John Doe @@ -174,8 +246,20 @@ components: - Filtering numericFilters: description: > - [Filter on numeric - attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + Filter by numeric facets. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, + `>=`. Comparsions are precise up to 3 decimals. + + You can also provide ranges: `facet: TO `. The range + includes the lower and upper boundaries. + + The same combination rules apply as for `facetFilters`. example: - - inStock = 1 @@ -188,8 +272,19 @@ components: - Filtering tagFilters: description: > - [Filter hits by - tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + Filter the search by values of the special `_tags` attribute. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + Different from regular facets, `_tags` can only be used for filtering + (including or excluding records). + + You won't get a facet count. + + The same combination and escaping rules apply as for `facetFilters`. example: - - Book @@ -202,64 +297,104 @@ components: - Filtering page: type: integer - description: Page to retrieve (the first page is `0`, not `1`). + description: Page of search results to retrieve. default: 0 + minimum: 0 x-categories: - Pagination aroundLatLng: type: string - description: >- - Search for entries [around a central - location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - enabling a geographical search within a circular area. + description: > + Coordinates for the center of a circle, expressed as a comma-separated + string of latitude and longitude. + + + Only records included within circle around this central location are + included in the results. + + The radius of the circle is determined by the `aroundRadius` and + `minimumAroundRadius` settings. + + This parameter is ignored if you also specify `insidePolygon` or + `insideBoundingBox`. example: 40.71,-74.01 default: '' x-categories: - Geo-Search aroundLatLngViaIP: type: boolean - description: >- - Search for entries around a location. The location is automatically - computed from the requester's IP address. + description: Whether to obtain the coordinates from the request's IP address. default: false x-categories: - Geo-Search aroundRadiusAll: + title: all type: string + description: >- + Return all records with a valid `_geoloc` attribute. Don't filter by + distance. enum: - all aroundRadius: description: > - [Maximum - radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - for a geographical search (in meters). + Maximum radius for a search around a central location. + + + This parameter works in combination with the `aroundLatLng` and + `aroundLatLngViaIP` parameters. + + By default, the search radius is determined automatically from the + density of hits around the central location. + + The search radius is small if there are many hits close to the central + coordinates. oneOf: - type: integer minimum: 1 + description: Maximum search radius around a central location in meters. - $ref: '#/components/schemas/aroundRadiusAll' x-categories: - Geo-Search aroundPrecisionFromValue: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + title: range objects type: array items: type: object + description: >- + Range object with lower and upper values in meters to define custom + ranges. properties: from: type: integer + description: >- + Lower boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. + example: 20 value: type: integer + description: >- + Upper boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. aroundPrecision: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + description: > + Precision of a coordinate-based search in meters to group results with + similar distances. + + + The Geo ranking criterion considers all matches within the same range of + distances to be equal. oneOf: - type: integer default: 10 + description: > + Distance in meters to group results by similar distances. + + + For example, if you set `aroundPrecision` to 100, records wihin 100 + meters to the central coordinate are considered to have the same + distance, + + as are records between 100 and 199 meters. - $ref: '#/components/schemas/aroundPrecisionFromValue' x-categories: - Geo-Search @@ -268,12 +403,23 @@ components: items: type: array items: + minItems: 4 + maxItems: 4 type: number format: double - description: >- - Search inside a [rectangular - area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates for a rectangular area in which to search. + + + Each bounding box is defined by the two opposite points of its diagonal, + and expressed as latitude and longitude pair: + + `[p1 lat, p1 long, p2 lat, p2 long]`. + + Provide multiple bounding boxes as nested arrays. + + For more information, see [rectangular + area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). example: - - 47.3165 @@ -292,12 +438,23 @@ components: items: type: array items: + minItems: 6 + maxItems: 20000 type: number format: double - description: >- - Search inside a - [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates of a polygon in which to search. + + + Polygons are defined by 3 to 10,000 points. Each point is represented by + its latitude and longitude. + + Provide multiple polygons as nested arrays. + + For more information, see [filtering inside + polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + + This parameter is ignored, if you also specify `insideBoundingBox`. example: - - 47.3165 @@ -317,11 +474,15 @@ components: - Geo-Search userToken: type: string - description: >- - Associates a [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) - with the current search. - example: '123456' + description: > + Unique pseudonymous or anonymous user identifier. + + + This helps with analytics and click and conversion events. + + For more information, see [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + example: test-user-123 x-categories: - Personalization baseSearchParamsWithoutQuery: @@ -330,8 +491,29 @@ components: properties: similarQuery: type: string - description: Overrides the query parameter and performs a more generic search. + description: > + Keywords to be used instead of the search query to conduct a more + broader search. + + + Using the `similarQuery` parameter changes other settings: + + + - `queryType` is set to `prefixNone`. + + - `removeStopWords` is set to true. + + - `words` is set as the first ranking criterion. + + - All remaining words are treated as `optionalWords`. + + + Since the `similarQuery` is supposed to do a broad search, they + usually return many results. + + Combine it with `filters` to narrow down the list of results. default: '' + example: comedy drama crime Macy Buscemi x-categories: - Search filters: @@ -347,12 +529,15 @@ components: sumOrFiltersScores: type: boolean description: > - Determines how to calculate [filter - scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + Whether to sum all filter scores. - If `false`, maximum score is kept. - If `true`, score is summed. + If true, all filter scores are summed. + + Otherwise, the maximum filter score is kept. + + For more information, see [filter + scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). default: false x-categories: - Filtering @@ -363,9 +548,7 @@ components: example: - title - author - description: >- - Restricts a query to only look at a subset of your [searchable - attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + description: Restricts a search to a subset of your searchable attributes. default: [] x-categories: - Filtering @@ -373,21 +556,35 @@ components: type: array items: type: string - description: >- - Returns - [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - their facet values, and the number of matching facet values. + description: > + Facets for which to retrieve facet values that match the search + criteria and the number of matching facet values. + + + To retrieve all facets, use the wildcard character `*`. + + For more information, see + [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). default: [] + example: + - '*' x-categories: - Faceting facetingAfterDistinct: type: boolean description: > - Forces faceting to be applied after - [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - (with the distinct feature). Alternatively, the `afterDistinct` - [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - of `attributesForFaceting` allows for more granular control. + Whether faceting should be applied after deduplication with + `distinct`. + + + This leads to accurate facet counts when using faceting in + combination with `distinct`. + + It's usually better to use `afterDistinct` modifiers in the + `attributesForFaceting` setting, + + as `facetingAfterDistinct` only computes correct facet counts if all + records have the same facet values for the `attributeForDistinct`. default: false x-categories: - Faceting @@ -395,28 +592,12 @@ components: $ref: '#/components/schemas/page' offset: type: integer - description: > - Specifies the offset of the first hit to return. - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Position of the first hit to retrieve. x-categories: - Pagination length: type: integer - description: > - Sets the number of hits to retrieve (for use with `offset`). - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 x-categories: @@ -432,7 +613,7 @@ components: minimumAroundRadius: type: integer description: >- - Minimum radius (in meters) used for a geographical search when + Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. minimum: 1 x-categories: @@ -445,13 +626,19 @@ components: type: array items: type: string - description: >- - Changes the default values of parameters that work best for a - natural language query, such as `ignorePlurals`, `removeStopWords`, - `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These - parameters work well together when the query consists of fuller - natural language strings instead of keywords, for example when - processing voice search queries. + description: > + ISO language codes that adjust settings that are useful for + processing natural language queries (as opposed to keyword + searches): + + + - Sets `removeStopWords` and `ignorePlurals` to the list of provided + languages. + + - Sets `removeWordsIfNoResults` to `allOptional`. + + - Adds a `natural_language` attribute to `ruleContexts` and + `analyticsTags`. default: [] x-categories: - Languages @@ -459,19 +646,32 @@ components: type: array items: type: string - description: >- - Assigns [rule + description: > + Assigns a rule context to the search query. + + + [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - to search queries. + are strings that you can use to trigger matching rules. default: [] + example: + - mobile x-categories: - Rules personalizationImpact: type: integer - description: >- - Defines how much [Personalization affects - results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + description: > + Impact that Personalization should have on this search. + + + The higher this value is, the more Personalization determines the + ranking compared to other factors. + + For more information, see [Understanding Personalization + impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). default: 100 + minimum: 0 + maximum: 100 x-categories: - Personalization userToken: @@ -479,43 +679,32 @@ components: getRankingInfo: type: boolean description: >- - Incidates whether the search response includes [detailed ranking - information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + Whether the search response should include detailed ranking + information. default: false x-categories: - Advanced - explain: - type: array - items: - type: string - description: >- - Enriches the API's response with information about how the query was - processed. - default: [] - x-categories: - - Advanced synonyms: type: boolean - description: >- - Whether to take into account an index's synonyms for a particular - search. + description: Whether to take into account an index's synonyms for this search. default: true x-categories: - Advanced clickAnalytics: type: boolean - description: >- - Indicates whether a query ID parameter is included in the search - response. This is required for [tracking click and conversion - events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + description: > + Whether to include a `queryID` attribute in the response. + + + The query ID is a unique identifier for a search query and is + required for tracking [click and conversion + events](https://www.algolia.com/guides/sending-events/getting-started/). default: false x-categories: - Analytics analytics: type: boolean - description: >- - Indicates whether this query will be included in - [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + description: Whether this search will be included in Analytics. default: true x-categories: - Analytics @@ -532,14 +721,14 @@ components: percentileComputation: type: boolean description: >- - Whether to include or exclude a query from the processing-time - percentile computation. + Whether to include this search when calculating processing-time + percentiles. default: true x-categories: - Advanced enableABTest: type: boolean - description: Incidates whether this search will be considered in A/B testing. + description: Whether to enable A/B testing for this search. default: true x-categories: - Advanced @@ -557,37 +746,39 @@ components: - Pagination typoToleranceEnum: type: string + title: typo tolerance + description: | + - `min`. Return matches with the lowest number of typos. + For example, if you have matches without typos, only include those. + But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). + - `strict`. Return matches with the two lowest numbers of typos. + With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. enum: - min - strict typoTolerance: - description: >- - Controls whether [typo + description: > + Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + + + If typo tolerance is true, `min`, or `strict`, [word splitting and + concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + is also active. oneOf: - type: boolean default: true + description: >- + Whether typo tolerance is active. If true, matches with typos are + included in the search results and rank after exact matches. - $ref: '#/components/schemas/typoToleranceEnum' x-categories: - Typos ignorePlurals: - description: > - Treats singular, plurals, and other forms of declensions as matching - terms. - - `ignorePlurals` is used in conjunction with the `queryLanguages` - setting. - - _list_: language ISO codes for which ignoring plurals should be enabled. - This list will override any values that you may have set in - `queryLanguages`. _true_: enables the ignore plurals feature, where - singulars and plurals are considered equivalent ("foot" = "feet"). The - languages supported here are either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the ignore plurals feature, so that singulars and plurals aren't - considered to be the same ("foot" will not find "feet"). + description: | + Treat singular, plurals, and other forms of declensions as equivalent. + You should only use this feature for the languages used in your index. example: - ca - es @@ -595,26 +786,32 @@ components: - type: array items: type: string + description: | + ISO code for languages for which this feature should be active. + This overrides languages you set with `queryLanguages`. - type: boolean + description: > + If true, `ignorePlurals` is active for all languages included in + `queryLanguages`, or for all supported languages, if `queryLanguges` + is empty. + + If false, singulars, plurals, and other declensions won't be + considered equivalent. default: false x-categories: - Languages removeStopWords: description: > - Removes stop (common) words from the query before executing it. + Removes stop words from the search query. - `removeStopWords` is used in conjunction with the `queryLanguages` - setting. - _list_: language ISO codes for which stop words should be enabled. This - list will override any values that you may have set in `queryLanguages`. - _true_: enables the stop words feature, ensuring that stop words are - removed from consideration in a search. The languages supported here are - either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the stop words feature, allowing stop words to be taken into account - in a search. + Stop words are common words like articles, conjunctions, prepositions, + or pronouns that have little or no meaning on their own. + + In English, "the", "a", or "and" are stop words. + + + You should only use this feature for the languages used in your index. example: - ca - es @@ -622,8 +819,17 @@ components: - type: array items: type: string + description: >- + ISO code for languages for which stop words should be removed. + This overrides languages you set in `queryLanguges`. - type: boolean default: false + description: > + If true, stop words are removed for all languages you included in + `queryLanguages`, or for all supported languages, if + `queryLanguages` is empty. + + If false, stop words are not removed. x-categories: - Languages queryType: @@ -632,9 +838,23 @@ components: - prefixLast - prefixAll - prefixNone - description: >- - Determines how query words are [interpreted as - prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + description: > + Determines if and how query words are interpreted as prefixes. + + + By default, only the last query word is treated as prefix + (`prefixLast`). + + To turn off prefix search, use `prefixNone`. + + Avoid `prefixAll`, which treats all query words as prefixes. + + This might lead to counterintuitive results and makes your search + slower. + + + For more information, see [Prefix + searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). default: prefixLast x-categories: - Query strategy @@ -646,10 +866,39 @@ components: - firstWords - allOptional example: firstWords - description: >- - Strategy to [remove - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - from the query when it doesn't match any hits. + description: > + Strategy for removing words from the query when it doesn't return any + results. + + This helps to avoid returning empty search results. + + +
+ +
none
+ +
No words are removed when a query doesn't return results.
+ +
lastWords
+ +
Treat the last (then second to last, then third to last) word as + optional, until there are results or at most 5 words have been + removed.
+ +
firstWords
+ +
Treat the first (then second, then third) word as optional, until + there are results or at most 5 words have been removed.
+ +
allOptional
+ +
Treat all words as optional.
+ +
+ + + For more information, see [Remove words to improve + results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). default: none x-categories: - Query strategy @@ -658,21 +907,26 @@ components: enum: - neuralSearch - keywordSearch - description: Search mode the index will use to query for results. + description: > + Search mode the index will use to query for results. + + + This setting only applies to indices, for which Algolia enabled + NeuralSearch for you. default: keywordSearch x-categories: - Query strategy semanticSearch: type: object - description: > - Settings for the semantic search part of NeuralSearch. Only used when - `mode` is _neuralSearch_. + description: | + Settings for the semantic search part of NeuralSearch. + Only used when `mode` is `neuralSearch`. properties: eventSources: - description: >- - Indices from which to collect click and conversion events. If null, - the current index and replica group will be used as the event - source. + description: | + Indices from which to collect click and conversion events. + + If null, the current index and all its replicas are used. nullable: true type: array items: @@ -683,10 +937,51 @@ components: - attribute - none - word - description: >- + description: > Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - is computed when the query contains only one word. + is computed when the search query has only one word. + + +
+ +
attribute
+ +
+ + The Exact ranking criterion is 1 if the query word and attribute value + are the same. + + For example, a search for "road" will match the value "road", but not + "road trip". + +
+ +
none
+ +
+ + The Exact ranking criterion is ignored on single-word searches. + +
+ +
word
+ +
+ + The Exact ranking criterion is 1 if the query word is found in the + attribute value. + + The query word must have at least 3 characters and must not be a stop + word. + +
+ +
+ + + If `exactOnSingleWordQuery` is `word`, only exact matches will be + highlighted, partial and prefix matches won't. default: attribute x-categories: - Query strategy @@ -706,13 +1001,41 @@ components: x-categories: - Query strategy distinct: - description: >- - Enables [deduplication or grouping of results (Algolia's _distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + description: > + Determines how many records of a group are included in the search + results. + + + Records with the same value for the `attributeForDistinct` attribute are + considered a group. + + The `distinct` setting controls how many members of the group are + returned. + + This is useful for [deduplication and + grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + + + The `distinct` setting is ignored if `attributeForDistinct` is not set. example: 1 oneOf: - type: boolean + description: >- + Whether deduplication is turned on. If true, only one member of a + group is shown in the search results. - type: integer + description: > + Number of members of a group of records to include in the search + results. + + + - Don't use `distinct > 1` for records that might be [promoted by + rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/). + The number of hits won't be correct and faceting won't work as expected. + - With `distinct > 1`, the `hitsPerPage` parameter controls the + number of returned groups. + For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned. + Likewise, the `nbHits` response attribute contains the number of returned groups. minimum: 0 maximum: 4 default: 0 @@ -721,31 +1044,56 @@ components: maxFacetHits: type: integer description: >- - Maximum number of facet hits to return when [searching for facet + Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). maximum: 100 default: 10 x-categories: - Advanced order: - description: Pinned order of facet lists. + description: > + Explicit order of facets or facet values. + + + This setting lets you always show specific facets or facet values at the + top of the list. type: array items: type: string facets: - description: Ordering of facets (widgets). + description: Order of facet names. type: object additionalProperties: false properties: order: $ref: '#/components/schemas/order' sortRemainingBy: - description: | - How to display the remaining items: + description: > + Order of facet values that aren't explicitly positioned with the `order` + setting. + + +
+ +
count
+ +
+ + Order remaining facet values by decreasing count. + + The count is the number of matching records containing this facet value. + +
+ +
alpha
- - `count`: facet count (descending). - - `alpha`: alphabetical (ascending). - - `hidden`: show only pinned values. +
Sort facet values alphabetically.
+ +
hidden
+ +
Don't show facet values that aren't explicitly positioned.
+ +
. type: string enum: - count @@ -760,12 +1108,13 @@ components: sortRemainingBy: $ref: '#/components/schemas/sortRemainingBy' values: - description: Ordering of facet values within an individual facet. + description: Order of facet values. One object for each facet. type: object additionalProperties: + x-additionalPropertiesName: facet $ref: '#/components/schemas/value' facetOrdering: - description: Defines the ordering of facets (widgets). + description: Order of facet names and facet values in your UI. type: object additionalProperties: false properties: @@ -774,12 +1123,14 @@ components: values: $ref: '#/components/schemas/values' renderingContent: - description: >- - Extra content for the search UI, for example, to control the [ordering - and display of - facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - You can set a default value and dynamically override it with - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + description: > + Extra data that can be used in the search UI. + + + You can use this to control aspects of your search UI, such as, the + order of facet names and values + + without changing your frontend code. type: object additionalProperties: false properties: @@ -788,11 +1139,11 @@ components: x-categories: - Advanced reRankingApplyFilter: - description: >- - When [Dynamic - Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) - is enabled, only records that match these filters will be affected by - Dynamic Re-Ranking. + description: > + Restrict [Dynamic + Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) + to records that match these filters. + nullable: true oneOf: - $ref: '#/components/schemas/listOfSearchFilters' - type: string @@ -803,26 +1154,6 @@ components: type: object additionalProperties: false properties: - attributesForFaceting: - type: array - items: - type: string - example: - - author - - filterOnly(isbn) - - searchable(edition) - - afterDistinct(category) - - afterDistinct(searchable(publisher)) - description: > - Attributes used for - [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) - and the - [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - that can be applied: `filterOnly`, `searchable`, and - `afterDistinct`. - default: [] - x-categories: - - Faceting attributesToRetrieve: type: array items: @@ -831,10 +1162,22 @@ components: - author - title - content - description: >- - Attributes to include in the API response. To reduce the size of - your response, you can retrieve only some of the attributes. By - default, the response includes all attributes. + description: > + Attributes to include in the API response. + + + To reduce the size of your response, you can retrieve only some of + the attributes. + + + - `*` retrieves all attributes, except attributes included in the + `customRanking` and `unretrievableAttributes` settings. + + - To retrieve all attributes except a specific one, prefix the + attribute with a dash and combine it with the `*`: `["*", + "-ATTRIBUTE"]`. + + - The `objectID` attribute is always included. default: - '*' x-categories: @@ -843,9 +1186,46 @@ components: type: array items: type: string - description: >- - Determines the order in which Algolia [returns your - results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + description: > + Determines the order in which Algolia returns your results. + + + By default, each entry corresponds to a [ranking + criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + + The tie-breaking algorithm sequentially applies each criterion in + the order they're specified. + + If you configure a replica index for [sorting by an + attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + + you put the sorting attribute at the top of the list. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + Before you modify the default setting, + + you should test your changes in the dashboard, + + and by [A/B + testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). default: - typo - geo @@ -865,19 +1245,59 @@ components: - desc(popularity) - asc(price) description: > - Specifies the [Custom ranking - criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). - Use the `asc` and `desc` modifiers to specify the ranking order: - ascending or descending. + Attributes to use as [custom + ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). + + + The custom ranking attributes decide which items are shown first if + the other ranking criteria are equal. + + + Records with missing values for your selected custom ranking + attributes are always sorted last. + + Boolean attributes are sorted based on their alphabetical order. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + If you use two or more custom ranking attributes, [reduce the + precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + of your first attributes, + + or the other attributes will never be applied. default: [] x-categories: - Ranking relevancyStrictness: type: integer example: 90 - description: >- + description: > Relevancy threshold below which less relevant results aren't included in the results. + + + You can only set `relevancyStrictness` on [virtual replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + + Use this setting to strike a balance between the relevance and + number of returned results. default: 100 x-categories: - Ranking @@ -888,11 +1308,28 @@ components: example: - author - title + - conten - content - description: >- - Attributes to highlight. Strings that match the search query in the - attributes are highlighted by surrounding them with HTML tags - (`highlightPreTag` and `highlightPostTag`). + description: > + Attributes to highlight. + + + By default, all searchable attributes are highlighted. + + Use `*` to highlight all attributes or use an empty array `[]` to + turn off highlighting. + + + With highlighting, strings that match the search query are + surrounded by HTML tags defined by `highlightPreTag` and + `highlightPostTag`. + + You can use this to visually highlight matching parts of a search + query in your UI. + + + For more information, see [Highlighting and + snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). x-categories: - Highlighting and Snippeting attributesToSnippet: @@ -903,26 +1340,36 @@ components: - content:80 - description description: > - Attributes to _snippet_. 'Snippeting' is shortening the attribute to - a certain number of words. If not specified, the attribute is - shortened to the 10 words around the matching string but you can - specify the number. For example: `body:20`. + Attributes for which to enable snippets. + + + Snippets provide additional context to matched words. + + If you enable snippets, they include 10 words, including the matched + word. + + The matched word will also be wrapped by HTML tags for highlighting. + + You can adjust the number of words with the following notation: + `ATTRIBUTE:NUMBER`, + + where `NUMBER` is the number of words to be extracted. default: [] x-categories: - Highlighting and Snippeting highlightPreTag: type: string description: >- - HTML string to insert before the highlighted parts in all highlight - and snippet results. + HTML tag to insert before the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting highlightPostTag: type: string description: >- - HTML string to insert after the highlighted parts in all highlight - and snippet results. + HTML tag to insert after the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting @@ -934,9 +1381,11 @@ components: - Highlighting and Snippeting restrictHighlightAndSnippetArrays: type: boolean - description: >- - Restrict highlighting and snippeting to items that matched the - query. + description: > + Whether to restrict highlighting and snippeting to items that at + least partially matched the search query. + + By default, all items are highlighted and snippeted. default: false x-categories: - Highlighting and Snippeting @@ -945,7 +1394,7 @@ components: minWordSizefor1Typo: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 4 @@ -954,7 +1403,7 @@ components: minWordSizefor2Typos: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 8 @@ -964,9 +1413,11 @@ components: $ref: '#/components/schemas/typoTolerance' allowTyposOnNumericTokens: type: boolean - description: >- - Whether to allow typos on numbers ("numeric tokens") in the query - string. + description: | + Whether to allow typos on numbers in the search query. + + Turn off this setting to reduce the number of irrelevant matches + when searching in large sets of similar numbers. default: true x-categories: - Typos @@ -976,9 +1427,23 @@ components: type: string example: - sku - description: >- + description: > Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + + Returning only exact matches can help when: + + + - [Searching in hyphenated + attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + + - Reducing the number of matches when you have too many. + This can happen with attributes that are long blocks of text, such as product descriptions. + + Consider alternatives such as `disableTypoToleranceOnWords` or + adding synonyms if your attributes have intentional unusual + spellings that might look like typos. default: [] x-categories: - Typos @@ -989,9 +1454,12 @@ components: keepDiacriticsOnCharacters: type: string example: øé - description: >- - Characters that the engine shouldn't automatically - [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: | + Characters for which diacritics should be preserved. + + By default, Algolia removes diacritics from letters. + For example, `é` becomes `e`. If this causes issues in your search, + you can specify characters that should keep their diacritics. default: '' x-categories: - Languages @@ -1001,39 +1469,64 @@ components: type: string example: - es - description: >- - Sets your user's search language. This adjusts language-specific - settings and features such as `ignorePlurals`, `removeStopWords`, - and + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for language-specific settings such as plurals, stop words, and + word-detection dictionaries. + + + This setting sets a default list of languages used by the + `removeStopWords` and `ignorePlurals` settings. + + This setting also sets a dictionary for word detection in the + logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - word detection. + languages. + + To support this, you must place the CJK language **first**. + + + + **You should always specify a query language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages decompoundQuery: type: boolean description: > - [Splits compound - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - into their component word parts in the query. + Whether to split compound words into their building blocks. + + + For more information, see [Word + segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + + Word segmentation is supported for these languages: German, Dutch, + Finnish, Swedish, and Norwegian. default: true x-categories: - Languages enableRules: type: boolean - description: >- - Incidates whether - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) - are enabled. + description: Whether to enable rules. default: true x-categories: - Rules enablePersonalization: type: boolean - description: >- - Incidates whether - [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - is enabled. + description: Whether to enable Personalization. default: false x-categories: - Personalization @@ -1047,9 +1540,13 @@ components: $ref: '#/components/schemas/semanticSearch' advancedSyntax: type: boolean - description: >- - Enables the [advanced query - syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + description: > + Whether to support phrase matching and excluding words from search + queries. + + + Use the `advancedSyntaxFeatures` parameter to control which feature + is supported. default: false x-categories: - Query strategy @@ -1060,10 +1557,43 @@ components: example: - blue - iphone case - description: >- - Words which should be considered - [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - when found in a query. + description: > + Words that should be considered optional when found in the query. + + + By default, records must match all words in the search query to be + included in the search results. + + Adding optional words can help to increase the number of search + results by running an additional search query that doesn't include + the optional words. + + For example, if the search query is "action video" and "video" is an + optional word, + + the search engine runs two queries. One for "action video" and one + for "action". + + Records that match all words are ranked higher. + + + For a search query with 4 or more words **and** all its words are + optional, + + the number of matched words required for a record to be included in + the search results increases for every 1,000 records: + + + - If `optionalWords` has less than 10 words, the required number of + matched words increases by 1: + results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. + - If `optionalWords` has 10 or more words, the number of required + matched words increases by the number of optional words dividied by + 5 (rounded down). + For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. + + For more information, see [Optional + words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). default: [] x-categories: - Query strategy @@ -1073,9 +1603,22 @@ components: type: string example: - description - description: >- - Attributes for which you want to [turn off the exact ranking + description: > + Searchable attributes for which you want to [turn off the Exact + ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + + + This can be useful for attributes with long values, where the + likelyhood of an exact match is high, + + such as product descriptions. + + Turning off the Exact ranking criterion for these attributes favors + exact matching on other attributes. + + This reduces the impact of individual attributes with a lot of + content on ranking. default: [] x-categories: - Query strategy @@ -1085,10 +1628,42 @@ components: type: array items: $ref: '#/components/schemas/alternativesAsExact' - description: >- - Alternatives that should be considered an exact match by [the exact - ranking - criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + description: > + Alternatives of query words that should be considered as exact + matches by the Exact ranking criterion. + + +
+ +
ignorePlurals
+ +
+ + + Plurals and similar declensions added by the `ignorePlurals` setting + are considered exact matches. + + +
+ +
singleWordSynonym
+ +
+ + Single-word synonyms, such as "NY/NYC" are considered exact matches. + +
+ +
multiWordsSynonym
+ +
+ + Multi-word synonyms, such as "NY/New York" are considered exact + matches. + +
+ +
. default: - ignorePlurals - singleWordSynonym @@ -1098,9 +1673,42 @@ components: type: array items: $ref: '#/components/schemas/advancedSyntaxFeatures' - description: >- - Allows you to specify which advanced syntax features are active when - `advancedSyntax` is enabled. + description: > + Advanced search syntax features you want to support. + + +
+ +
exactPhrase
+ +
+ + + Phrases in quotes must match exactly. + + For example, `sparkly blue "iPhone case"` only returns records with + the exact string "iPhone case". + + +
+ +
excludeWords
+ +
+ + + Query words prefixed with a `-` must not occur in a record. + + For example, `search -engine` matches records that contain "search" + but not "engine". + + +
+ +
+ + + This setting only has an effect if `advancedSyntax` is true. default: - exactPhrase - excludeWords @@ -1110,9 +1718,27 @@ components: $ref: '#/components/schemas/distinct' replaceSynonymsInHighlight: type: boolean - description: >- - Whether to highlight and snippet the original word that matches the - synonym or the synonym itself. + description: > + Whether to replace a highlighted word with the matched synonym. + + + By default, the original words are highlighted even if a synonym + matches. + + For example, with `home` as a synonym for `house` and a search for + `home`, + + records matching either "home" or "house" are included in the search + results, + + and either "home" or "house" are highlighted. + + + With `replaceSynonymsInHighlight` set to `true`, a search for `home` + still matches the same records, + + but all occurences of "house" are replaced by "home" in the + highlighted response. default: false x-categories: - Highlighting and Snippeting @@ -1120,9 +1746,18 @@ components: type: integer minimum: 1 maximum: 7 - description: >- - Precision of the [proximity ranking - criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + description: > + Minimum proximity score for two matching words. + + + This adjusts the [Proximity ranking + criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + + by equally scoring matches that are farther apart. + + + For example, if `minProximity` is 2, neighboring matches and matches + with one word between them would have the same score. default: 1 x-categories: - Advanced @@ -1130,10 +1765,28 @@ components: type: array items: type: string - description: >- - Attributes to include in the API response for search and browse - queries. - default: [] + description: > + Properties to include in the API response of `search` and `browse` + requests. + + + By default, all response properties are included. + + To reduce the response size, you can select, which attributes should + be included. + + + You can't exclude these properties: + + `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, + + `abTestVariantID`, `parsedQuery`, or any property triggered by the + `getRankingInfo` parameter. + + + Don't exclude properties that you might need in your search UI. + default: + - '*' x-categories: - Advanced maxFacetHits: @@ -1142,21 +1795,58 @@ components: type: integer description: Maximum number of facet values to return for each facet. default: 100 + maximum: 1000 x-categories: - Faceting sortFacetValuesBy: type: string - description: Controls how facet values are fetched. + description: > + Order in which to retrieve facet values. + + +
+ +
count
+ +
+ + Facet values are retrieved by decreasing count. + + The count is the number of matching records containing this facet + value. + +
+ +
alpha
+ +
Retrieve facet values alphabetically.
+ +
+ + + This setting doesn't influence how facet values are displayed in + your UI (see `renderingContent`). + + For more information, see [facet value + display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). default: count x-categories: - Faceting attributeCriteriaComputedByMinProximity: type: boolean - description: >- - When the [Attribute criterion is ranked above - Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - in your ranking formula, Proximity is used to select which - searchable attribute is matched in the Attribute ranking stage. + description: > + Whether the best matching attribute should be determined by minimum + proximity. + + + This setting only affects ranking if the Attribute ranking criterion + comes before Proximity in the `ranking` setting. + + If true, the best matching attribute is selected based on the + minimum proximity of multiple matches. + + Otherwise, the best matching attribute is determined by the order in + the `searchableAttributes` setting. default: false x-categories: - Advanced @@ -1164,15 +1854,20 @@ components: $ref: '#/components/schemas/renderingContent' enableReRanking: type: boolean - description: >- - Indicates whether this search will use [Dynamic + description: > + Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + + + This setting only has an effect if you activated Dynamic Re-Ranking + for this index in the Algolia dashboard. default: true x-categories: - Filtering reRankingApplyFilter: $ref: '#/components/schemas/reRankingApplyFilter' searchParamsObject: + title: Search parameters as object allOf: - $ref: '#/components/schemas/baseSearchParams' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -1221,8 +1916,7 @@ components: - bought-together objectID: type: string - description: Unique object identifier. - example: product-1 + description: Unique record identifier. baseRecommendationsQuery: type: object additionalProperties: false @@ -1286,11 +1980,11 @@ components: deprecated: true nbHits: type: integer - description: Number of hits the search query matched. + description: Number of results (hits). example: 20 nbPages: type: integer - description: Number of pages of results for the current query. + description: Number of pages of results. example: 1 processingTimeMS: type: integer @@ -1329,7 +2023,10 @@ components: example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 - description: Lets you store custom data in your indices. + description: | + An object with custom data. + + You can store up to 32 kB as custom data. default: {} x-categories: - Advanced @@ -1361,7 +2058,7 @@ components: pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$ automaticRadius: type: string - description: Automatically-computed radius. + description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: type: object title: exhaustive @@ -1425,10 +2122,12 @@ components: title: facets type: object additionalProperties: + x-additionalPropertiesName: facet type: object additionalProperties: + x-additionalPropertiesName: facet count type: integer - description: Mapping of each facet name to the corresponding facet counts. + description: Facet counts. example: category: food: 1 @@ -1532,18 +2231,18 @@ components: example: a00dbc80a8d13c4565a442e7e2dca80a highlightedValue: type: string - description: Markup text with `facetQuery` matches highlighted. + description: Highlighted attribute value, including HTML tags. example: George Clooney matchLevel: type: string - description: Indicates how well the attribute matched the search query. + description: Whether the whole query string matches or only a part. enum: - none - partial - full highlightResultOption: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: false properties: value: @@ -1552,7 +2251,7 @@ components: $ref: '#/components/schemas/matchLevel' matchedWords: type: array - description: List of words from the query that matched the object. + description: List of matched words from the search query. example: - action items: @@ -1566,12 +2265,13 @@ components: - matchedWords highlightResultOptionMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResultOption' highlightResultOptionArray: type: array - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. items: $ref: '#/components/schemas/highlightResultOption' highlightResult: @@ -1581,14 +2281,13 @@ components: - $ref: '#/components/schemas/highlightResultOptionArray' highlightResultMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResult' snippetResultOption: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: false properties: value: @@ -1600,16 +2299,13 @@ components: - matchLevel snippetResultOptionMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResultOption' snippetResultOptionArray: type: array - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. items: $ref: '#/components/schemas/snippetResultOption' snippetResult: @@ -1619,10 +2315,9 @@ components: - $ref: '#/components/schemas/snippetResultOptionArray' snippetResultMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResult' matchedGeoLocation: type: object @@ -1654,24 +2349,29 @@ components: description: The score of the event. rankingInfo: type: object + description: Object with detailed information about the record's ranking. additionalProperties: false properties: filters: type: integer - description: This field is reserved for advanced usage. + minimum: 0 + description: Whether a filter matched the query. firstMatchedWord: type: integer + minimum: 0 description: >- - Position of the most important matched attribute in the attributes - to index list. + Position of the first matched word in the best matching attribute of + the record. geoDistance: type: integer + minimum: 0 description: >- Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). geoPrecision: type: integer + minimum: 1 description: Precision used when computing the geo distance, in meters. matchedGeoLocation: $ref: '#/components/schemas/matchedGeoLocation' @@ -1679,27 +2379,33 @@ components: $ref: '#/components/schemas/personalization' nbExactWords: type: integer + minimum: 0 description: Number of exactly matched words. nbTypos: type: integer + minimum: 0 description: Number of typos encountered when matching the record. promoted: type: boolean - description: Present and set to true if a Rule promoted the hit. + description: Whether the record was promoted by a rule. proximityDistance: type: integer + minimum: 0 description: >- - When the query contains more than one word, the sum of the distances - between matched words (in meters). + Number of words between multiple matches in the query plus 1. For + single word queries, `proximityDistance` is 0. userScore: type: integer - description: Custom ranking for the object, expressed as a single integer value. + description: >- + Overall ranking of the record, expressed as a single integer. This + attribute is internal. words: type: integer - description: Number of matched words, including prefixes and typos. + minimum: 1 + description: Number of matched words. promotedByReRanking: type: boolean - description: Wether the record are promoted by the re-ranking strategy. + description: Whether the record is re-ranked. required: - promoted - nbTypos @@ -1790,10 +2496,15 @@ components: 8601](https://wikipedia.org/wiki/ISO_8601) format. anchoring: type: string - description: >- - Whether the pattern parameter matches the beginning (`startsWith`) or - end (`endsWith`) of the query string, is an exact match (`is`), or a - partial match (`contains`). + description: | + Which part of the search query the pattern should match: + + - `startsWith`. The pattern must match the begginning of the query. + - `endsWith`. The pattern must match the end of the query. + - `is`. The pattern must match the query exactly. + - `contains`. The pattern must match anywhere in the query. + + Empty queries are only allowed as pattern with `anchoring: is`. enum: - is - startsWith @@ -1805,18 +2516,49 @@ components: properties: pattern: type: string - description: Query pattern syntax. - example: '{facet:brand}' + description: > + Query pattern that triggers the rule. + + + You can use either a literal string, or a special pattern + `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. + + The rule is triggered if the query matches the literal string or a + value of the specified facet. + + For example, with `pattern: {facet:genre}`, the rule is triggered + when users search for a genre, such as "comedy". + example: '{facet:genre}' anchoring: $ref: '#/components/schemas/anchoring' alternatives: type: boolean - description: Whether the pattern matches on plurals, synonyms, and typos. + description: Whether the pattern should match plurals, synonyms, and typos. default: false context: type: string - description: 'Rule context format: [A-Za-z0-9_-]+).' - example: trackedFilters + pattern: '[A-Za-z0-9_-]+' + description: > + An additional restriction that only triggers the rule, when the + search has the same value as `ruleContexts` parameter. + + For example, if `context: mobile`, the rule is only triggered when + the search request has a matching `ruleContexts: mobile`. + + A rule context must only contain alphanumeric characters. + example: mobile + filters: + type: string + description: > + Filters that trigger the rule. + + + You can add add filters using the syntax `facet:value` so that the + rule is triggered, when the specific filter is selected. + + You can use `filters` on its own or combine it with the `pattern` + parameter. + example: genre:comedy editType: description: Type of edit. type: string @@ -1834,57 +2576,79 @@ components: type: string insert: description: >- - Text that should be inserted in place of the removed text inside the - query string. + Text to be added in place of the deleted text inside the query + string. type: string consequenceQueryObject: type: object additionalProperties: false properties: remove: - description: Words to remove. + description: Words to remove from the search query. type: array items: type: string edits: - description: Edits to apply. + description: Changes to make to the search query. type: array items: $ref: '#/components/schemas/edit' consequenceQuery: - description: >- - When providing a string, it replaces the entire query string. When - providing an object, it describes incremental edits to be made to the - query string (but you can't do both). + description: > + Replace or edit the search query. + + + If `consequenceQuery` is a string, the entire search query is replaced + with that string. + + If `consequenceQuery` is an object, it describes incremental edits made + to the query. oneOf: - $ref: '#/components/schemas/consequenceQueryObject' - type: string automaticFacetFilter: type: object - description: Automatic facet Filter. + description: Filter or optional filter to be applied to the search. additionalProperties: false properties: facet: type: string - description: >- - Attribute to filter on. This must match a facet placeholder in the - Rule's pattern. + description: > + Facet name to be applied as filter. + + The name must match placeholders in the `pattern` parameter. + + For example, with `pattern: {facet:genre}`, `automaticFacetFilters` + must be `genre`. score: type: integer default: 1 - description: >- - Score for the filter. Typically used for optional or disjunctive - filters. + description: Filter scores to give different weights to individual filters. disjunctive: type: boolean default: false - description: Whether the filter is disjunctive (true) or conjunctive (false). + description: > + Whether the filter is disjunctive or conjunctive. + + + If true the filter has multiple matches, multiple occurences are + combined with the logical `OR` operation. + + If false, multiple occurences are combined with the logical `AND` + operation. required: - facet automaticFacetFilters: - description: >- - Names of facets to which automatic filtering must be applied; they must - match the facet name of a facet value placeholder in the query pattern. + description: > + Filter to be applied to the search. + + + You can use this to respond to search queries that match a facet value. + + For example, if users search for "comedy", which matches a facet value + of the "genre" facet, + + you can filter the results to show the top-ranked comedy movies. oneOf: - type: array items: @@ -1894,7 +2658,12 @@ components: type: string params: type: object - description: Additional search parameters. + description: > + Parameters to apply to this search. + + + You can use all search parameters, plus special `automaticFacetFilters`, + `automaticOptionalFacetFilters`, and `query`. additionalProperties: false properties: query: @@ -1913,38 +2682,39 @@ components: promotePosition: type: integer description: >- - The position to promote the records to. If you pass objectIDs, the - records are placed at this position as a group. For example, if you - pronmote four objectIDs to position 0, the records take the first four - positions. + Position in the search results where you want to show the promoted + records. example: 0 promoteObjectIDs: + title: objectIDs description: Records to promote. type: object additionalProperties: false properties: objectIDs: type: array - description: Unique identifiers of the records to promote. - example: - - 3f31c087763a2ceec359b318fc3edef3 - - 63c3c871e31a152d67df7720192fd752 + maxItems: 100 + description: | + Object IDs of the records you want to promote. + + The records are placed as a group at the `position`. + For example, if you want to promote four records to position `0`, + they will be the first four search results. items: - type: string + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: - position - objectIDs promoteObjectID: + title: objectID description: Record to promote. type: object additionalProperties: false properties: objectID: - type: string - example: 2b642cf64c587f50388eb1b8d047bf56 - description: Unique identifier of the record to promote. + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: @@ -1957,32 +2727,50 @@ components: consequence: type: object description: > - [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - of a rule. + Effect of the rule. + + + For more information, see + [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). additionalProperties: false properties: params: $ref: '#/components/schemas/consequenceParams' promote: type: array - description: Records to promote. + maxItems: 300 + description: > + Records you want to pin to a specific position in the search + results. + + + You can promote up to 300 records, either individually, or as groups + of up to 100 records each. items: $ref: '#/components/schemas/promote' filterPromotes: type: boolean default: false - description: >- - Only use in combination with the `promote` consequence. When `true`, - promoted results will be restricted to match the filters of the - current search. When `false`, the promoted results will show up - regardless of the filters. + description: > + Whether promoted records must match an active filter for the + consequence to be applied. + + + This ensures that user actions (filtering the search) are given a + higher precendence. + + For example, if you promote a record with the `color: red` + attribute, and the user filters the search for `color: blue`, + + the "red" record won't be shown. hide: type: array - description: Records to hide. By default, you can hide up to 50 records per rule. + maxItems: 50 + description: Records you want to hide from the search results. items: title: consequenceHide type: object - description: Unique identifier of the record to hide. + description: Object ID of the record to hide. additionalProperties: false properties: objectID: @@ -1990,10 +2778,12 @@ components: required: - objectID userData: - description: >- - Custom JSON object that will be appended to the userData array in - the response. This object isn't interpreted by the API. It's limited - to 1kB of minified JSON. + description: > + A JSON object with custom data that will be appended to the + `userData` array in the response. + + This object isn't interpreted by the API and is limited to 1 kB + of minified JSON. example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 @@ -2042,9 +2832,10 @@ components: description: > Unique identifier of a task. + A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the - `task` operation and this `taskID`. + [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. deletedAt: type: string example: '2023-06-27T14:42:38.831Z' @@ -2056,15 +2847,17 @@ components: enum: - published - notPublished - description: _published_ if the task has been processed, _notPublished_ otherwise. + description: >- + Task status, `published` if the task is completed, `notPublished` + otherwise. parameters_query: type: string - description: Full-text query. + description: Search query. default: '' parameters_page: type: integer minimum: 0 - description: Requested page (the first page is page 0). + description: Requested page of the API response. parameters_hitsPerPage: type: integer default: 20 diff --git a/specs/bundled/search.doc.yml b/specs/bundled/search.doc.yml index 2280cfe09b..b38ec6c1ec 100644 --- a/specs/bundled/search.doc.yml +++ b/specs/bundled/search.doc.yml @@ -1,19 +1,148 @@ openapi: 3.0.2 info: title: Search API - description: >- - Use the Search REST API to manage your data (indices and records), - implement search, and improve relevance (with Rules, synonyms, and language - dictionaries). + description: > + The Algolia Search API lets you search, configure, and mange your indices + and records. - Although Algolia provides a REST API, you should use the official open - source API [clients, libraries, and - tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) - instead. + # Client libraries - There's no [SLA](https://www.algolia.com/policies/sla/) if you use the REST - API directly. + + Use Algolia's API clients and libraries to reliably integrate Algolia's APIs + with your apps. + + The official API clients are covered by Algolia's [Service Level + Agreement](https://www.algolia.com/policies/sla/). + + + See: [Algolia's + ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) + + + # Base URLs + + + The base URLs for making requests to the Search API are: + + + - `https://{APPLICATION_ID}.algolia.net` + + - `https://{APPLICATION_ID}-dsn.algolia.net`. + If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra), + this ensures that requests are sent to servers closest to users. + + Both URLs provide high availability by distributing requests with load + balancing. + + + **All requests must use HTTPS.** + + + # Retry strategy + + + To guarantee a high availability, implement a retry strategy for all API + requests using the URLs of your servers as fallbacks: + + + - `https://{APPLICATION_ID}-1.algolianet.com` + + - `https://{APPLICATION_ID}-2.algolianet.com` + + - `https://{APPLICATION_ID}-3.algolianet.com` + + + These URLs use a different DNS provider than the primary URLs. + + You should randomize this list to ensure an even load across the three + servers. + + + All Algolia API clients implement this retry strategy. + + + # Authentication + + + To authenticate your API requests, add these headers: + + +
+ +
x-algolia-application-id
+ +
Your Algolia application ID.
+ +
x-algolia-api-key
+ +
+ + An API key with the necessary permissions to make the request. + + The required access control list (ACL) to make a request is listed in each + endpoint's reference. + +
+ +
+ + + You can find your application ID and API key in the [Algolia + dashboard](https://dashboard.algolia.com/account). + + + # Request format + + + Depending on the endpoint, request bodies are either JSON objects or arrays + of JSON objects, + + + # Parameters + + + Parameters are passed as query parameters for GET and DELETE requests, + + and in the request body for POST and PUT requests. + + + Query parameters must be + [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). + + Non-ASCII characters must be UTF-8 encoded. + + Plus characters (`+`) are interpreted as spaces. + + Arrays as query parameters must be one of: + + + - A comma-separated string: `attributesToRetrieve=title,description` + + - A URL-encoded JSON array: + `attributesToRetrieve=%5B%22title%22,%22description%22%D` + + + # Response status and errors + + + The Search API returns JSON responses. + + Since JSON doesn't guarantee any specific ordering, don't rely on the order + of attributes in the API response. + + + Successful responses return a `2xx` status. Client errors return a `4xx` + status. Server errors are indicated by a `5xx` status. + + Error responses have a `message` property with more information. + + + # Version + + + The current version of the Search API is version 1, as indicated by the + `/1/` in each endpoint's URL. version: 1.0.0 components: securitySchemes: @@ -44,15 +173,15 @@ components: IndexName: name: indexName in: path - description: Index on which to perform the request. + description: Name of the index on which to perform the operation. required: true schema: type: string - example: myIndexName + example: YourIndexName ObjectID: name: objectID in: path - description: Unique record (object) identifier. + description: Unique record identifier. required: true schema: type: string @@ -60,9 +189,7 @@ components: ForwardToReplicas: in: query name: forwardToReplicas - description: >- - Indicates whether changed index settings are forwarded to the replica - indices. + description: Whether changes are applied to replica indices. schema: type: boolean parameters_ObjectID: @@ -79,8 +206,8 @@ components: schema: type: boolean description: >- - Indicates whether to replace all synonyms in the index with the ones - sent with this request. + Whether to replace all synonyms in the index with the ones sent with + this request. KeyString: in: path name: key @@ -93,34 +220,29 @@ components: in: path name: objectID description: Unique identifier of a rule object. - example: a-rule-id required: true schema: - type: string + $ref: '#/components/schemas/ruleID' ClearExistingRules: in: query name: clearExistingRules required: false schema: type: boolean - description: >- - Indicates whether existing rules should be deleted before adding this - batch. + description: Whether existing rules should be deleted before adding this batch. DictionaryName: in: path name: dictionaryName - description: Dictionary to search in. + description: Dictionary type in which to search. required: true schema: $ref: '#/components/schemas/dictionaryType' Page: in: query name: page - description: > - Returns the requested page number. The page size is determined by the - `hitsPerPage` parameter. You can see the number of available pages in - the `nbPages` response attribute. When `page` is null, the API response - is not paginated. + description: | + Requested page of the API response. + If `null`, the API response is not paginated. schema: type: integer minimum: 0 @@ -129,13 +251,13 @@ components: HitsPerPage: in: query name: hitsPerPage - description: Maximum number of hits per page. + description: Number of hits per page. schema: type: integer default: 100 UserIDInHeader: name: X-Algolia-User-ID - description: userID to assign. + description: User ID to assign. in: header required: true schema: @@ -143,7 +265,7 @@ components: pattern: ^[a-zA-Z0-9 \-*.]+$ UserIDInPath: name: userID - description: userID to assign. + description: User ID to assign. in: path required: true schema: @@ -165,6 +287,7 @@ components: default: '' searchParamsString: type: object + title: Search parameters as query string additionalProperties: false x-discriminator-fields: - params @@ -173,7 +296,7 @@ components: $ref: '#/components/schemas/paramsAsString' query: type: string - description: Text to search for in an index. + description: Search query. default: '' x-categories: - Search @@ -186,13 +309,53 @@ components: filters: type: string description: > - [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) - the query with numeric, facet, or tag filters. + Filter the search so that only records with matching values are included + in the results. + + + These filters are supported: + + + - **Numeric filters.** ` `, where `` is one of + `<`, `<=`, `=`, `!=`, `>`, `>=`. + + - **Ranges.** `: TO ` where `` and `` + are the lower and upper limits of the range (inclusive). + + - **Facet filters.** `:` where `` is a facet + attribute (case-sensitive) and `` a facet value. + + - **Tag filters.** `_tags:` or just `` (case-sensitive). + + - **Boolean filters.** `: true | false`. + + + You can combine filters with `AND`, `OR`, and `NOT` operators with the + following restrictions: + + + - You can only combine filters of the same type with `OR`. + **Not supported:** `facet:value OR num > 3`. + - You can't use `NOT` with combinations of filters. + **Not supported:** `NOT(facet:value OR facet:value)` + - You can't combine conjunctions (`AND`) with `OR`. + **Not supported:** `facet:value OR (facet:value AND facet:value)` + + Use quotes around your filters, if the facet attribute name or facet + value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. + + If a facet attribute is an array, the filter matches if it matches at + least one element of the array. + + + For more information, see + [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). example: (category:Book OR category:Ebook) AND _tags:published default: '' x-categories: - Filtering searchFiltersArrayString: + title: search filter array type: array items: type: string @@ -202,14 +365,35 @@ components: - type: string listOfSearchFilters: type: array + title: search filters items: $ref: '#/components/schemas/mixedSearchFilters' facetFilters: description: > - [Filter hits by facet - value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + Filter the search by facet values, so that only records with the same + facet values are retrieved. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. + + - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 + AND filter3`. + + - `facet:-value` is interpreted as `NOT facet:value`. + + + While it's best to avoid attributes that start with a `-`, you can still + filter them by escaping with a backslash: + + `facet:\-value`. example: - - category:Book + - + - category:Book + - category:-Movie - author:John Doe oneOf: - $ref: '#/components/schemas/listOfSearchFilters' @@ -218,13 +402,24 @@ components: - Filtering optionalFilters: description: > - Create filters to boost or demote records. + Filters to promote or demote records in the search results. + + + Optional filters work like facet filters, but they don't exclude records + from the search results. + + Records that match the optional filter rank before records that don't + match. + + If you're using a negative filter `facet:-value`, matching records rank + after records that don't match. + + - Optional filters don't work on virtual replicas. - Records that match the filter are ranked higher for positive and lower - for negative optional filters. In contrast to regular filters, records - that don't match the optional filter are still included in the results, - only their ranking is affected. + - Optional filters are applied _after_ sort-by attributes. + + - Optional filters don't work with numeric attributes. example: - category:Book - author:John Doe @@ -235,8 +430,20 @@ components: - Filtering numericFilters: description: > - [Filter on numeric - attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + Filter by numeric facets. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, + `>=`. Comparsions are precise up to 3 decimals. + + You can also provide ranges: `facet: TO `. The range + includes the lower and upper boundaries. + + The same combination rules apply as for `facetFilters`. example: - - inStock = 1 @@ -249,8 +456,19 @@ components: - Filtering tagFilters: description: > - [Filter hits by - tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + Filter the search by values of the special `_tags` attribute. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + Different from regular facets, `_tags` can only be used for filtering + (including or excluding records). + + You won't get a facet count. + + The same combination and escaping rules apply as for `facetFilters`. example: - - Book @@ -263,64 +481,104 @@ components: - Filtering page: type: integer - description: Page to retrieve (the first page is `0`, not `1`). + description: Page of search results to retrieve. default: 0 + minimum: 0 x-categories: - Pagination aroundLatLng: type: string - description: >- - Search for entries [around a central - location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - enabling a geographical search within a circular area. + description: > + Coordinates for the center of a circle, expressed as a comma-separated + string of latitude and longitude. + + + Only records included within circle around this central location are + included in the results. + + The radius of the circle is determined by the `aroundRadius` and + `minimumAroundRadius` settings. + + This parameter is ignored if you also specify `insidePolygon` or + `insideBoundingBox`. example: 40.71,-74.01 default: '' x-categories: - Geo-Search aroundLatLngViaIP: type: boolean - description: >- - Search for entries around a location. The location is automatically - computed from the requester's IP address. + description: Whether to obtain the coordinates from the request's IP address. default: false x-categories: - Geo-Search aroundRadiusAll: + title: all type: string + description: >- + Return all records with a valid `_geoloc` attribute. Don't filter by + distance. enum: - all aroundRadius: description: > - [Maximum - radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - for a geographical search (in meters). + Maximum radius for a search around a central location. + + + This parameter works in combination with the `aroundLatLng` and + `aroundLatLngViaIP` parameters. + + By default, the search radius is determined automatically from the + density of hits around the central location. + + The search radius is small if there are many hits close to the central + coordinates. oneOf: - type: integer minimum: 1 + description: Maximum search radius around a central location in meters. - $ref: '#/components/schemas/aroundRadiusAll' x-categories: - Geo-Search aroundPrecisionFromValue: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + title: range objects type: array items: type: object + description: >- + Range object with lower and upper values in meters to define custom + ranges. properties: from: type: integer + description: >- + Lower boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. + example: 20 value: type: integer + description: >- + Upper boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. aroundPrecision: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + description: > + Precision of a coordinate-based search in meters to group results with + similar distances. + + + The Geo ranking criterion considers all matches within the same range of + distances to be equal. oneOf: - type: integer default: 10 + description: > + Distance in meters to group results by similar distances. + + + For example, if you set `aroundPrecision` to 100, records wihin 100 + meters to the central coordinate are considered to have the same + distance, + + as are records between 100 and 199 meters. - $ref: '#/components/schemas/aroundPrecisionFromValue' x-categories: - Geo-Search @@ -329,12 +587,23 @@ components: items: type: array items: + minItems: 4 + maxItems: 4 type: number format: double - description: >- - Search inside a [rectangular - area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates for a rectangular area in which to search. + + + Each bounding box is defined by the two opposite points of its diagonal, + and expressed as latitude and longitude pair: + + `[p1 lat, p1 long, p2 lat, p2 long]`. + + Provide multiple bounding boxes as nested arrays. + + For more information, see [rectangular + area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). example: - - 47.3165 @@ -353,12 +622,23 @@ components: items: type: array items: + minItems: 6 + maxItems: 20000 type: number format: double - description: >- - Search inside a - [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates of a polygon in which to search. + + + Polygons are defined by 3 to 10,000 points. Each point is represented by + its latitude and longitude. + + Provide multiple polygons as nested arrays. + + For more information, see [filtering inside + polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + + This parameter is ignored, if you also specify `insideBoundingBox`. example: - - 47.3165 @@ -378,11 +658,15 @@ components: - Geo-Search userToken: type: string - description: >- - Associates a [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) - with the current search. - example: '123456' + description: > + Unique pseudonymous or anonymous user identifier. + + + This helps with analytics and click and conversion events. + + For more information, see [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + example: test-user-123 x-categories: - Personalization baseSearchParamsWithoutQuery: @@ -391,8 +675,29 @@ components: properties: similarQuery: type: string - description: Overrides the query parameter and performs a more generic search. + description: > + Keywords to be used instead of the search query to conduct a more + broader search. + + + Using the `similarQuery` parameter changes other settings: + + + - `queryType` is set to `prefixNone`. + + - `removeStopWords` is set to true. + + - `words` is set as the first ranking criterion. + + - All remaining words are treated as `optionalWords`. + + + Since the `similarQuery` is supposed to do a broad search, they + usually return many results. + + Combine it with `filters` to narrow down the list of results. default: '' + example: comedy drama crime Macy Buscemi x-categories: - Search filters: @@ -408,12 +713,15 @@ components: sumOrFiltersScores: type: boolean description: > - Determines how to calculate [filter - scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + Whether to sum all filter scores. + - If `false`, maximum score is kept. + If true, all filter scores are summed. - If `true`, score is summed. + Otherwise, the maximum filter score is kept. + + For more information, see [filter + scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). default: false x-categories: - Filtering @@ -424,9 +732,7 @@ components: example: - title - author - description: >- - Restricts a query to only look at a subset of your [searchable - attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + description: Restricts a search to a subset of your searchable attributes. default: [] x-categories: - Filtering @@ -434,21 +740,35 @@ components: type: array items: type: string - description: >- - Returns - [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - their facet values, and the number of matching facet values. + description: > + Facets for which to retrieve facet values that match the search + criteria and the number of matching facet values. + + + To retrieve all facets, use the wildcard character `*`. + + For more information, see + [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). default: [] + example: + - '*' x-categories: - Faceting facetingAfterDistinct: type: boolean description: > - Forces faceting to be applied after - [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - (with the distinct feature). Alternatively, the `afterDistinct` - [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - of `attributesForFaceting` allows for more granular control. + Whether faceting should be applied after deduplication with + `distinct`. + + + This leads to accurate facet counts when using faceting in + combination with `distinct`. + + It's usually better to use `afterDistinct` modifiers in the + `attributesForFaceting` setting, + + as `facetingAfterDistinct` only computes correct facet counts if all + records have the same facet values for the `attributeForDistinct`. default: false x-categories: - Faceting @@ -456,28 +776,12 @@ components: $ref: '#/components/schemas/page' offset: type: integer - description: > - Specifies the offset of the first hit to return. - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Position of the first hit to retrieve. x-categories: - Pagination length: type: integer - description: > - Sets the number of hits to retrieve (for use with `offset`). - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 x-categories: @@ -493,7 +797,7 @@ components: minimumAroundRadius: type: integer description: >- - Minimum radius (in meters) used for a geographical search when + Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. minimum: 1 x-categories: @@ -506,13 +810,19 @@ components: type: array items: type: string - description: >- - Changes the default values of parameters that work best for a - natural language query, such as `ignorePlurals`, `removeStopWords`, - `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These - parameters work well together when the query consists of fuller - natural language strings instead of keywords, for example when - processing voice search queries. + description: > + ISO language codes that adjust settings that are useful for + processing natural language queries (as opposed to keyword + searches): + + + - Sets `removeStopWords` and `ignorePlurals` to the list of provided + languages. + + - Sets `removeWordsIfNoResults` to `allOptional`. + + - Adds a `natural_language` attribute to `ruleContexts` and + `analyticsTags`. default: [] x-categories: - Languages @@ -520,19 +830,32 @@ components: type: array items: type: string - description: >- - Assigns [rule + description: > + Assigns a rule context to the search query. + + + [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - to search queries. + are strings that you can use to trigger matching rules. default: [] + example: + - mobile x-categories: - Rules personalizationImpact: type: integer - description: >- - Defines how much [Personalization affects - results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + description: > + Impact that Personalization should have on this search. + + + The higher this value is, the more Personalization determines the + ranking compared to other factors. + + For more information, see [Understanding Personalization + impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). default: 100 + minimum: 0 + maximum: 100 x-categories: - Personalization userToken: @@ -540,43 +863,32 @@ components: getRankingInfo: type: boolean description: >- - Incidates whether the search response includes [detailed ranking - information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + Whether the search response should include detailed ranking + information. default: false x-categories: - Advanced - explain: - type: array - items: - type: string - description: >- - Enriches the API's response with information about how the query was - processed. - default: [] - x-categories: - - Advanced synonyms: type: boolean - description: >- - Whether to take into account an index's synonyms for a particular - search. + description: Whether to take into account an index's synonyms for this search. default: true x-categories: - Advanced clickAnalytics: type: boolean - description: >- - Indicates whether a query ID parameter is included in the search - response. This is required for [tracking click and conversion - events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + description: > + Whether to include a `queryID` attribute in the response. + + + The query ID is a unique identifier for a search query and is + required for tracking [click and conversion + events](https://www.algolia.com/guides/sending-events/getting-started/). default: false x-categories: - Analytics analytics: type: boolean - description: >- - Indicates whether this query will be included in - [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + description: Whether this search will be included in Analytics. default: true x-categories: - Analytics @@ -593,14 +905,14 @@ components: percentileComputation: type: boolean description: >- - Whether to include or exclude a query from the processing-time - percentile computation. + Whether to include this search when calculating processing-time + percentiles. default: true x-categories: - Advanced enableABTest: type: boolean - description: Incidates whether this search will be considered in A/B testing. + description: Whether to enable A/B testing for this search. default: true x-categories: - Advanced @@ -618,37 +930,39 @@ components: - Pagination typoToleranceEnum: type: string + title: typo tolerance + description: | + - `min`. Return matches with the lowest number of typos. + For example, if you have matches without typos, only include those. + But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). + - `strict`. Return matches with the two lowest numbers of typos. + With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. enum: - min - strict typoTolerance: - description: >- - Controls whether [typo + description: > + Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + + + If typo tolerance is true, `min`, or `strict`, [word splitting and + concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + is also active. oneOf: - type: boolean default: true + description: >- + Whether typo tolerance is active. If true, matches with typos are + included in the search results and rank after exact matches. - $ref: '#/components/schemas/typoToleranceEnum' x-categories: - Typos ignorePlurals: - description: > - Treats singular, plurals, and other forms of declensions as matching - terms. - - `ignorePlurals` is used in conjunction with the `queryLanguages` - setting. - - _list_: language ISO codes for which ignoring plurals should be enabled. - This list will override any values that you may have set in - `queryLanguages`. _true_: enables the ignore plurals feature, where - singulars and plurals are considered equivalent ("foot" = "feet"). The - languages supported here are either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the ignore plurals feature, so that singulars and plurals aren't - considered to be the same ("foot" will not find "feet"). + description: | + Treat singular, plurals, and other forms of declensions as equivalent. + You should only use this feature for the languages used in your index. example: - ca - es @@ -656,26 +970,32 @@ components: - type: array items: type: string + description: | + ISO code for languages for which this feature should be active. + This overrides languages you set with `queryLanguages`. - type: boolean + description: > + If true, `ignorePlurals` is active for all languages included in + `queryLanguages`, or for all supported languages, if `queryLanguges` + is empty. + + If false, singulars, plurals, and other declensions won't be + considered equivalent. default: false x-categories: - Languages removeStopWords: description: > - Removes stop (common) words from the query before executing it. + Removes stop words from the search query. - `removeStopWords` is used in conjunction with the `queryLanguages` - setting. - _list_: language ISO codes for which stop words should be enabled. This - list will override any values that you may have set in `queryLanguages`. - _true_: enables the stop words feature, ensuring that stop words are - removed from consideration in a search. The languages supported here are - either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the stop words feature, allowing stop words to be taken into account - in a search. + Stop words are common words like articles, conjunctions, prepositions, + or pronouns that have little or no meaning on their own. + + In English, "the", "a", or "and" are stop words. + + + You should only use this feature for the languages used in your index. example: - ca - es @@ -683,8 +1003,17 @@ components: - type: array items: type: string + description: >- + ISO code for languages for which stop words should be removed. + This overrides languages you set in `queryLanguges`. - type: boolean default: false + description: > + If true, stop words are removed for all languages you included in + `queryLanguages`, or for all supported languages, if + `queryLanguages` is empty. + + If false, stop words are not removed. x-categories: - Languages queryType: @@ -693,9 +1022,23 @@ components: - prefixLast - prefixAll - prefixNone - description: >- - Determines how query words are [interpreted as - prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + description: > + Determines if and how query words are interpreted as prefixes. + + + By default, only the last query word is treated as prefix + (`prefixLast`). + + To turn off prefix search, use `prefixNone`. + + Avoid `prefixAll`, which treats all query words as prefixes. + + This might lead to counterintuitive results and makes your search + slower. + + + For more information, see [Prefix + searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). default: prefixLast x-categories: - Query strategy @@ -707,10 +1050,39 @@ components: - firstWords - allOptional example: firstWords - description: >- - Strategy to [remove - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - from the query when it doesn't match any hits. + description: > + Strategy for removing words from the query when it doesn't return any + results. + + This helps to avoid returning empty search results. + + +
+ +
none
+ +
No words are removed when a query doesn't return results.
+ +
lastWords
+ +
Treat the last (then second to last, then third to last) word as + optional, until there are results or at most 5 words have been + removed.
+ +
firstWords
+ +
Treat the first (then second, then third) word as optional, until + there are results or at most 5 words have been removed.
+ +
allOptional
+ +
Treat all words as optional.
+ +
+ + + For more information, see [Remove words to improve + results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). default: none x-categories: - Query strategy @@ -719,21 +1091,26 @@ components: enum: - neuralSearch - keywordSearch - description: Search mode the index will use to query for results. + description: > + Search mode the index will use to query for results. + + + This setting only applies to indices, for which Algolia enabled + NeuralSearch for you. default: keywordSearch x-categories: - Query strategy semanticSearch: type: object - description: > - Settings for the semantic search part of NeuralSearch. Only used when - `mode` is _neuralSearch_. + description: | + Settings for the semantic search part of NeuralSearch. + Only used when `mode` is `neuralSearch`. properties: eventSources: - description: >- - Indices from which to collect click and conversion events. If null, - the current index and replica group will be used as the event - source. + description: | + Indices from which to collect click and conversion events. + + If null, the current index and all its replicas are used. nullable: true type: array items: @@ -744,10 +1121,51 @@ components: - attribute - none - word - description: >- + description: > Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - is computed when the query contains only one word. + is computed when the search query has only one word. + + +
+ +
attribute
+ +
+ + The Exact ranking criterion is 1 if the query word and attribute value + are the same. + + For example, a search for "road" will match the value "road", but not + "road trip". + +
+ +
none
+ +
+ + The Exact ranking criterion is ignored on single-word searches. + +
+ +
word
+ +
+ + The Exact ranking criterion is 1 if the query word is found in the + attribute value. + + The query word must have at least 3 characters and must not be a stop + word. + +
+ +
+ + + If `exactOnSingleWordQuery` is `word`, only exact matches will be + highlighted, partial and prefix matches won't. default: attribute x-categories: - Query strategy @@ -767,13 +1185,41 @@ components: x-categories: - Query strategy distinct: - description: >- - Enables [deduplication or grouping of results (Algolia's _distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + description: > + Determines how many records of a group are included in the search + results. + + + Records with the same value for the `attributeForDistinct` attribute are + considered a group. + + The `distinct` setting controls how many members of the group are + returned. + + This is useful for [deduplication and + grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + + + The `distinct` setting is ignored if `attributeForDistinct` is not set. example: 1 oneOf: - type: boolean + description: >- + Whether deduplication is turned on. If true, only one member of a + group is shown in the search results. - type: integer + description: > + Number of members of a group of records to include in the search + results. + + + - Don't use `distinct > 1` for records that might be [promoted by + rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/). + The number of hits won't be correct and faceting won't work as expected. + - With `distinct > 1`, the `hitsPerPage` parameter controls the + number of returned groups. + For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned. + Likewise, the `nbHits` response attribute contains the number of returned groups. minimum: 0 maximum: 4 default: 0 @@ -782,31 +1228,56 @@ components: maxFacetHits: type: integer description: >- - Maximum number of facet hits to return when [searching for facet + Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). maximum: 100 default: 10 x-categories: - Advanced order: - description: Pinned order of facet lists. + description: > + Explicit order of facets or facet values. + + + This setting lets you always show specific facets or facet values at the + top of the list. type: array items: type: string facets: - description: Ordering of facets (widgets). + description: Order of facet names. type: object additionalProperties: false properties: order: $ref: '#/components/schemas/order' sortRemainingBy: - description: | - How to display the remaining items: + description: > + Order of facet values that aren't explicitly positioned with the `order` + setting. - - `count`: facet count (descending). - - `alpha`: alphabetical (ascending). - - `hidden`: show only pinned values. + +
+ +
count
+ +
+ + Order remaining facet values by decreasing count. + + The count is the number of matching records containing this facet value. + +
+ +
alpha
+ +
Sort facet values alphabetically.
+ +
hidden
+ +
Don't show facet values that aren't explicitly positioned.
+ +
. type: string enum: - count @@ -821,12 +1292,13 @@ components: sortRemainingBy: $ref: '#/components/schemas/sortRemainingBy' values: - description: Ordering of facet values within an individual facet. + description: Order of facet values. One object for each facet. type: object additionalProperties: + x-additionalPropertiesName: facet $ref: '#/components/schemas/value' facetOrdering: - description: Defines the ordering of facets (widgets). + description: Order of facet names and facet values in your UI. type: object additionalProperties: false properties: @@ -835,12 +1307,14 @@ components: values: $ref: '#/components/schemas/values' renderingContent: - description: >- - Extra content for the search UI, for example, to control the [ordering - and display of - facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - You can set a default value and dynamically override it with - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + description: > + Extra data that can be used in the search UI. + + + You can use this to control aspects of your search UI, such as, the + order of facet names and values + + without changing your frontend code. type: object additionalProperties: false properties: @@ -849,11 +1323,11 @@ components: x-categories: - Advanced reRankingApplyFilter: - description: >- - When [Dynamic - Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) - is enabled, only records that match these filters will be affected by - Dynamic Re-Ranking. + description: > + Restrict [Dynamic + Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) + to records that match these filters. + nullable: true oneOf: - $ref: '#/components/schemas/listOfSearchFilters' - type: string @@ -864,26 +1338,6 @@ components: type: object additionalProperties: false properties: - attributesForFaceting: - type: array - items: - type: string - example: - - author - - filterOnly(isbn) - - searchable(edition) - - afterDistinct(category) - - afterDistinct(searchable(publisher)) - description: > - Attributes used for - [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) - and the - [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - that can be applied: `filterOnly`, `searchable`, and - `afterDistinct`. - default: [] - x-categories: - - Faceting attributesToRetrieve: type: array items: @@ -892,10 +1346,22 @@ components: - author - title - content - description: >- - Attributes to include in the API response. To reduce the size of - your response, you can retrieve only some of the attributes. By - default, the response includes all attributes. + description: > + Attributes to include in the API response. + + + To reduce the size of your response, you can retrieve only some of + the attributes. + + + - `*` retrieves all attributes, except attributes included in the + `customRanking` and `unretrievableAttributes` settings. + + - To retrieve all attributes except a specific one, prefix the + attribute with a dash and combine it with the `*`: `["*", + "-ATTRIBUTE"]`. + + - The `objectID` attribute is always included. default: - '*' x-categories: @@ -904,9 +1370,46 @@ components: type: array items: type: string - description: >- - Determines the order in which Algolia [returns your - results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + description: > + Determines the order in which Algolia returns your results. + + + By default, each entry corresponds to a [ranking + criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + + The tie-breaking algorithm sequentially applies each criterion in + the order they're specified. + + If you configure a replica index for [sorting by an + attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + + you put the sorting attribute at the top of the list. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + Before you modify the default setting, + + you should test your changes in the dashboard, + + and by [A/B + testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). default: - typo - geo @@ -926,19 +1429,59 @@ components: - desc(popularity) - asc(price) description: > - Specifies the [Custom ranking - criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). - Use the `asc` and `desc` modifiers to specify the ranking order: - ascending or descending. + Attributes to use as [custom + ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). + + + The custom ranking attributes decide which items are shown first if + the other ranking criteria are equal. + + + Records with missing values for your selected custom ranking + attributes are always sorted last. + + Boolean attributes are sorted based on their alphabetical order. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + If you use two or more custom ranking attributes, [reduce the + precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + of your first attributes, + + or the other attributes will never be applied. default: [] x-categories: - Ranking relevancyStrictness: type: integer example: 90 - description: >- + description: > Relevancy threshold below which less relevant results aren't included in the results. + + + You can only set `relevancyStrictness` on [virtual replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + + Use this setting to strike a balance between the relevance and + number of returned results. default: 100 x-categories: - Ranking @@ -949,11 +1492,28 @@ components: example: - author - title + - conten - content - description: >- - Attributes to highlight. Strings that match the search query in the - attributes are highlighted by surrounding them with HTML tags - (`highlightPreTag` and `highlightPostTag`). + description: > + Attributes to highlight. + + + By default, all searchable attributes are highlighted. + + Use `*` to highlight all attributes or use an empty array `[]` to + turn off highlighting. + + + With highlighting, strings that match the search query are + surrounded by HTML tags defined by `highlightPreTag` and + `highlightPostTag`. + + You can use this to visually highlight matching parts of a search + query in your UI. + + + For more information, see [Highlighting and + snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). x-categories: - Highlighting and Snippeting attributesToSnippet: @@ -964,26 +1524,36 @@ components: - content:80 - description description: > - Attributes to _snippet_. 'Snippeting' is shortening the attribute to - a certain number of words. If not specified, the attribute is - shortened to the 10 words around the matching string but you can - specify the number. For example: `body:20`. + Attributes for which to enable snippets. + + + Snippets provide additional context to matched words. + + If you enable snippets, they include 10 words, including the matched + word. + + The matched word will also be wrapped by HTML tags for highlighting. + + You can adjust the number of words with the following notation: + `ATTRIBUTE:NUMBER`, + + where `NUMBER` is the number of words to be extracted. default: [] x-categories: - Highlighting and Snippeting highlightPreTag: type: string description: >- - HTML string to insert before the highlighted parts in all highlight - and snippet results. + HTML tag to insert before the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting highlightPostTag: type: string description: >- - HTML string to insert after the highlighted parts in all highlight - and snippet results. + HTML tag to insert after the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting @@ -995,9 +1565,11 @@ components: - Highlighting and Snippeting restrictHighlightAndSnippetArrays: type: boolean - description: >- - Restrict highlighting and snippeting to items that matched the - query. + description: > + Whether to restrict highlighting and snippeting to items that at + least partially matched the search query. + + By default, all items are highlighted and snippeted. default: false x-categories: - Highlighting and Snippeting @@ -1006,7 +1578,7 @@ components: minWordSizefor1Typo: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 4 @@ -1015,7 +1587,7 @@ components: minWordSizefor2Typos: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 8 @@ -1025,9 +1597,11 @@ components: $ref: '#/components/schemas/typoTolerance' allowTyposOnNumericTokens: type: boolean - description: >- - Whether to allow typos on numbers ("numeric tokens") in the query - string. + description: | + Whether to allow typos on numbers in the search query. + + Turn off this setting to reduce the number of irrelevant matches + when searching in large sets of similar numbers. default: true x-categories: - Typos @@ -1037,9 +1611,23 @@ components: type: string example: - sku - description: >- + description: > Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + + Returning only exact matches can help when: + + + - [Searching in hyphenated + attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + + - Reducing the number of matches when you have too many. + This can happen with attributes that are long blocks of text, such as product descriptions. + + Consider alternatives such as `disableTypoToleranceOnWords` or + adding synonyms if your attributes have intentional unusual + spellings that might look like typos. default: [] x-categories: - Typos @@ -1050,9 +1638,12 @@ components: keepDiacriticsOnCharacters: type: string example: øé - description: >- - Characters that the engine shouldn't automatically - [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: | + Characters for which diacritics should be preserved. + + By default, Algolia removes diacritics from letters. + For example, `é` becomes `e`. If this causes issues in your search, + you can specify characters that should keep their diacritics. default: '' x-categories: - Languages @@ -1062,39 +1653,64 @@ components: type: string example: - es - description: >- - Sets your user's search language. This adjusts language-specific - settings and features such as `ignorePlurals`, `removeStopWords`, - and + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for language-specific settings such as plurals, stop words, and + word-detection dictionaries. + + + This setting sets a default list of languages used by the + `removeStopWords` and `ignorePlurals` settings. + + This setting also sets a dictionary for word detection in the + logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - word detection. + languages. + + To support this, you must place the CJK language **first**. + + + + **You should always specify a query language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages decompoundQuery: type: boolean description: > - [Splits compound - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - into their component word parts in the query. + Whether to split compound words into their building blocks. + + + For more information, see [Word + segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + + Word segmentation is supported for these languages: German, Dutch, + Finnish, Swedish, and Norwegian. default: true x-categories: - Languages enableRules: type: boolean - description: >- - Incidates whether - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) - are enabled. + description: Whether to enable rules. default: true x-categories: - Rules enablePersonalization: type: boolean - description: >- - Incidates whether - [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - is enabled. + description: Whether to enable Personalization. default: false x-categories: - Personalization @@ -1108,9 +1724,13 @@ components: $ref: '#/components/schemas/semanticSearch' advancedSyntax: type: boolean - description: >- - Enables the [advanced query - syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + description: > + Whether to support phrase matching and excluding words from search + queries. + + + Use the `advancedSyntaxFeatures` parameter to control which feature + is supported. default: false x-categories: - Query strategy @@ -1121,10 +1741,43 @@ components: example: - blue - iphone case - description: >- - Words which should be considered - [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - when found in a query. + description: > + Words that should be considered optional when found in the query. + + + By default, records must match all words in the search query to be + included in the search results. + + Adding optional words can help to increase the number of search + results by running an additional search query that doesn't include + the optional words. + + For example, if the search query is "action video" and "video" is an + optional word, + + the search engine runs two queries. One for "action video" and one + for "action". + + Records that match all words are ranked higher. + + + For a search query with 4 or more words **and** all its words are + optional, + + the number of matched words required for a record to be included in + the search results increases for every 1,000 records: + + + - If `optionalWords` has less than 10 words, the required number of + matched words increases by 1: + results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. + - If `optionalWords` has 10 or more words, the number of required + matched words increases by the number of optional words dividied by + 5 (rounded down). + For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. + + For more information, see [Optional + words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). default: [] x-categories: - Query strategy @@ -1134,9 +1787,22 @@ components: type: string example: - description - description: >- - Attributes for which you want to [turn off the exact ranking + description: > + Searchable attributes for which you want to [turn off the Exact + ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + + + This can be useful for attributes with long values, where the + likelyhood of an exact match is high, + + such as product descriptions. + + Turning off the Exact ranking criterion for these attributes favors + exact matching on other attributes. + + This reduces the impact of individual attributes with a lot of + content on ranking. default: [] x-categories: - Query strategy @@ -1146,10 +1812,42 @@ components: type: array items: $ref: '#/components/schemas/alternativesAsExact' - description: >- - Alternatives that should be considered an exact match by [the exact - ranking - criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + description: > + Alternatives of query words that should be considered as exact + matches by the Exact ranking criterion. + + +
+ +
ignorePlurals
+ +
+ + + Plurals and similar declensions added by the `ignorePlurals` setting + are considered exact matches. + + +
+ +
singleWordSynonym
+ +
+ + Single-word synonyms, such as "NY/NYC" are considered exact matches. + +
+ +
multiWordsSynonym
+ +
+ + Multi-word synonyms, such as "NY/New York" are considered exact + matches. + +
+ +
. default: - ignorePlurals - singleWordSynonym @@ -1159,9 +1857,42 @@ components: type: array items: $ref: '#/components/schemas/advancedSyntaxFeatures' - description: >- - Allows you to specify which advanced syntax features are active when - `advancedSyntax` is enabled. + description: > + Advanced search syntax features you want to support. + + +
+ +
exactPhrase
+ +
+ + + Phrases in quotes must match exactly. + + For example, `sparkly blue "iPhone case"` only returns records with + the exact string "iPhone case". + + +
+ +
excludeWords
+ +
+ + + Query words prefixed with a `-` must not occur in a record. + + For example, `search -engine` matches records that contain "search" + but not "engine". + + +
+ +
+ + + This setting only has an effect if `advancedSyntax` is true. default: - exactPhrase - excludeWords @@ -1171,9 +1902,27 @@ components: $ref: '#/components/schemas/distinct' replaceSynonymsInHighlight: type: boolean - description: >- - Whether to highlight and snippet the original word that matches the - synonym or the synonym itself. + description: > + Whether to replace a highlighted word with the matched synonym. + + + By default, the original words are highlighted even if a synonym + matches. + + For example, with `home` as a synonym for `house` and a search for + `home`, + + records matching either "home" or "house" are included in the search + results, + + and either "home" or "house" are highlighted. + + + With `replaceSynonymsInHighlight` set to `true`, a search for `home` + still matches the same records, + + but all occurences of "house" are replaced by "home" in the + highlighted response. default: false x-categories: - Highlighting and Snippeting @@ -1181,9 +1930,18 @@ components: type: integer minimum: 1 maximum: 7 - description: >- - Precision of the [proximity ranking - criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + description: > + Minimum proximity score for two matching words. + + + This adjusts the [Proximity ranking + criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + + by equally scoring matches that are farther apart. + + + For example, if `minProximity` is 2, neighboring matches and matches + with one word between them would have the same score. default: 1 x-categories: - Advanced @@ -1191,10 +1949,28 @@ components: type: array items: type: string - description: >- - Attributes to include in the API response for search and browse - queries. - default: [] + description: > + Properties to include in the API response of `search` and `browse` + requests. + + + By default, all response properties are included. + + To reduce the response size, you can select, which attributes should + be included. + + + You can't exclude these properties: + + `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, + + `abTestVariantID`, `parsedQuery`, or any property triggered by the + `getRankingInfo` parameter. + + + Don't exclude properties that you might need in your search UI. + default: + - '*' x-categories: - Advanced maxFacetHits: @@ -1203,21 +1979,58 @@ components: type: integer description: Maximum number of facet values to return for each facet. default: 100 + maximum: 1000 x-categories: - Faceting sortFacetValuesBy: type: string - description: Controls how facet values are fetched. + description: > + Order in which to retrieve facet values. + + +
+ +
count
+ +
+ + Facet values are retrieved by decreasing count. + + The count is the number of matching records containing this facet + value. + +
+ +
alpha
+ +
Retrieve facet values alphabetically.
+ +
+ + + This setting doesn't influence how facet values are displayed in + your UI (see `renderingContent`). + + For more information, see [facet value + display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). default: count x-categories: - Faceting attributeCriteriaComputedByMinProximity: type: boolean - description: >- - When the [Attribute criterion is ranked above - Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - in your ranking formula, Proximity is used to select which - searchable attribute is matched in the Attribute ranking stage. + description: > + Whether the best matching attribute should be determined by minimum + proximity. + + + This setting only affects ranking if the Attribute ranking criterion + comes before Proximity in the `ranking` setting. + + If true, the best matching attribute is selected based on the + minimum proximity of multiple matches. + + Otherwise, the best matching attribute is determined by the order in + the `searchableAttributes` setting. default: false x-categories: - Advanced @@ -1225,15 +2038,20 @@ components: $ref: '#/components/schemas/renderingContent' enableReRanking: type: boolean - description: >- - Indicates whether this search will use [Dynamic + description: > + Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + + + This setting only has an effect if you activated Dynamic Re-Ranking + for this index in the Algolia dashboard. default: true x-categories: - Filtering reRankingApplyFilter: $ref: '#/components/schemas/reRankingApplyFilter' searchParamsObject: + title: Search parameters as object allOf: - $ref: '#/components/schemas/baseSearchParams' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -1247,11 +2065,11 @@ components: deprecated: true nbHits: type: integer - description: Number of hits the search query matched. + description: Number of results (hits). example: 20 nbPages: type: integer - description: Number of pages of results for the current query. + description: Number of pages of results. example: 1 processingTimeMS: type: integer @@ -1290,7 +2108,10 @@ components: example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 - description: Lets you store custom data in your indices. + description: | + An object with custom data. + + You can store up to 32 kB as custom data. default: {} x-categories: - Advanced @@ -1322,7 +2143,7 @@ components: pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$ automaticRadius: type: string - description: Automatically-computed radius. + description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: type: object title: exhaustive @@ -1386,10 +2207,12 @@ components: title: facets type: object additionalProperties: + x-additionalPropertiesName: facet type: object additionalProperties: + x-additionalPropertiesName: facet count type: integer - description: Mapping of each facet name to the corresponding facet counts. + description: Facet counts. example: category: food: 1 @@ -1493,22 +2316,21 @@ components: example: a00dbc80a8d13c4565a442e7e2dca80a objectID: type: string - description: Unique object identifier. - example: product-1 + description: Unique record identifier. highlightedValue: type: string - description: Markup text with `facetQuery` matches highlighted. + description: Highlighted attribute value, including HTML tags. example: George Clooney matchLevel: type: string - description: Indicates how well the attribute matched the search query. + description: Whether the whole query string matches or only a part. enum: - none - partial - full highlightResultOption: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: false properties: value: @@ -1517,7 +2339,7 @@ components: $ref: '#/components/schemas/matchLevel' matchedWords: type: array - description: List of words from the query that matched the object. + description: List of matched words from the search query. example: - action items: @@ -1531,12 +2353,13 @@ components: - matchedWords highlightResultOptionMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResultOption' highlightResultOptionArray: type: array - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. items: $ref: '#/components/schemas/highlightResultOption' highlightResult: @@ -1546,14 +2369,13 @@ components: - $ref: '#/components/schemas/highlightResultOptionArray' highlightResultMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResult' snippetResultOption: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: false properties: value: @@ -1565,16 +2387,13 @@ components: - matchLevel snippetResultOptionMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResultOption' snippetResultOptionArray: type: array - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. items: $ref: '#/components/schemas/snippetResultOption' snippetResult: @@ -1584,10 +2403,9 @@ components: - $ref: '#/components/schemas/snippetResultOptionArray' snippetResultMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResult' matchedGeoLocation: type: object @@ -1619,24 +2437,29 @@ components: description: The score of the event. rankingInfo: type: object + description: Object with detailed information about the record's ranking. additionalProperties: false properties: filters: type: integer - description: This field is reserved for advanced usage. + minimum: 0 + description: Whether a filter matched the query. firstMatchedWord: type: integer + minimum: 0 description: >- - Position of the most important matched attribute in the attributes - to index list. + Position of the first matched word in the best matching attribute of + the record. geoDistance: type: integer + minimum: 0 description: >- Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). geoPrecision: type: integer + minimum: 1 description: Precision used when computing the geo distance, in meters. matchedGeoLocation: $ref: '#/components/schemas/matchedGeoLocation' @@ -1644,27 +2467,33 @@ components: $ref: '#/components/schemas/personalization' nbExactWords: type: integer + minimum: 0 description: Number of exactly matched words. nbTypos: type: integer + minimum: 0 description: Number of typos encountered when matching the record. promoted: type: boolean - description: Present and set to true if a Rule promoted the hit. + description: Whether the record was promoted by a rule. proximityDistance: type: integer + minimum: 0 description: >- - When the query contains more than one word, the sum of the distances - between matched words (in meters). + Number of words between multiple matches in the query plus 1. For + single word queries, `proximityDistance` is 0. userScore: type: integer - description: Custom ranking for the object, expressed as a single integer value. + description: >- + Overall ranking of the record, expressed as a single integer. This + attribute is internal. words: type: integer - description: Number of matched words, including prefixes and typos. + minimum: 1 + description: Number of matched words. promotedByReRanking: type: boolean - description: Wether the record are promoted by the re-ranking strategy. + description: Whether the record is re-ranked. required: - promoted - nbTypos @@ -1678,7 +2507,12 @@ components: type: integer hit: type: object - description: A single hit. + description: > + Search result. + + + A hit is a record from your index, augmented with special attributes for + highlighting, snippeting, and ranking. x-is-generic: true additionalProperties: true required: @@ -1700,6 +2534,12 @@ components: properties: hits: type: array + description: > + Search results (hits). + + + Hits are records from your index that match the search criteria, + augmented with additional attributes, such as, for highlighting. items: $ref: '#/components/schemas/hit' query: @@ -1720,14 +2560,16 @@ components: indexName: type: string example: products - description: Algolia index name. + description: Index name. searchTypeDefault: type: string enum: - default default: default description: > - - `default`: perform a search query - `facet` [searches for facet + - `default`: perform a search query + + - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). searchForHitsOptions: x-is-SearchForHitsOptions: true @@ -1754,7 +2596,9 @@ components: - facet default: facet description: > - - `default`: perform a search query - `facet` [searches for facet + - `default`: perform a search query + + - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). searchForFacetsOptions: type: object @@ -1791,9 +2635,13 @@ components: - none - stopIfEnoughMatches description: > - - `none`: executes all queries. - `stopIfEnoughMatches`: executes - queries one by one, stopping further query execution as soon as a query - matches at least the `hitsPerPage` number of results. + Strategy for multiple search queries: + + + - `none`. Run all queries. + + - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as + a query matches at least the `hitsPerPage` number of results. searchForFacetValuesResponse: type: object additionalProperties: false @@ -1805,6 +2653,7 @@ components: properties: facetHits: type: array + description: Matching facet values. items: type: object title: facetHits @@ -1822,10 +2671,8 @@ components: $ref: '#/components/schemas/highlightedValue' count: description: >- - Number of records containing this facet value. This takes into - account the extra search parameters specified in the query. - Like for a regular search query, the [counts may not be - exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + Number of records with this facet value. [The count may be + 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' @@ -1842,14 +2689,13 @@ components: cursor: type: string description: > - Cursor indicating the location to resume browsing from. Must match - the value returned by the previous call. + Cursor to get the next page of the response. + - Pass this value to the subsequent browse call to get the next page - of results. + The parameter must match the value returned in the response of a + previous request. - When the end of the index has been reached, `cursor` is absent from - the response. + The last page of the response does not return a `cursor` attribute. example: jMDY3M2MwM2QwMWUxMmQwYWI0ZTN browseParamsObject: allOf: @@ -1871,9 +2717,10 @@ components: description: > Unique identifier of a task. + A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the - `task` operation and this `taskID`. + [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. deletedAt: type: string example: '2023-06-27T14:42:38.831Z' @@ -1882,7 +2729,7 @@ components: format. attribute: type: string - description: Value of the attribute to be updated. + description: Value of the attribute to update. updatedAt: type: string example: '2023-07-04T12:49:15Z' @@ -1919,12 +2766,10 @@ components: - AddUnique - IncrementFrom - IncrementSet - description: Operation to apply to the attribute. + description: How to change the attribute. builtInOperation: type: object - description: >- - To update an attribute without pushing the entire record, you can use - these built-in operations. + description: Update to perform on the attribute. additionalProperties: false properties: _operation: @@ -1933,7 +2778,7 @@ components: type: string description: >- Value that corresponds to the operation, for example an `Increment` - or `Decrement` step, `Add` or `Remove` value. + or `Decrement` step, or an `Add` or `Remove` value. required: - _operation - value @@ -1951,7 +2796,7 @@ components: - deleteObject - delete - clear - description: Type of batch operation. + description: Type of indexing operation. objectIDs: type: array items: @@ -1959,11 +2804,70 @@ components: example: - record-1 - record-2 - description: Unique object (record) identifiers. + description: Unique record identifiers. baseIndexSettings: type: object + title: Index settings. additionalProperties: false properties: + attributesForFaceting: + type: array + items: + type: string + example: + - author + - filterOnly(isbn) + - searchable(edition) + - afterDistinct(category) + - afterDistinct(searchable(publisher)) + description: > + Attributes used for + [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + + + Facets are ways to categorize search results based on attributes. + + Facets can be used to let user filter search results. + + By default, no attribute is used for faceting. + + + **Modifiers** + + +
+ +
filterOnly("ATTRIBUTE")
+ +
Allows using this attribute as a filter, but doesn't evalue the + facet values.
+ +
searchable("ATTRIBUTE")
+ +
Allows searching for facet values.
+ +
afterDistinct("ATTRIBUTE")
+ +
+ + + Evaluates the facet count _after_ deduplication with `distinct`. + + This ensures accurate facet counts. + + You can apply this modifier to searchable facets: + `afterDistinct(searchable(ATTRIBUTE))`. + + +
+ +
+ + + Without modifiers, the attribute is used as a regular facet. + default: [] + x-categories: + - Faceting replicas: type: array items: @@ -1971,26 +2875,85 @@ components: example: - virtual(prod_products_price_asc) - dev_products_replica - description: >- - Creates - [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - which are copies of a primary index with the same records but - different settings. + description: > + Creates [replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + + + Replicas are copies of a primary index with the same records but + different settings, synonyms, or rules. + + If you want to offer a different ranking or sorting of your search + results, you'll use replica indices. + + All index operations on a primary index are automatically forwarded + to its replicas. + + To add a replica index, you must provide the complete set of + replicas to this parameter. + + If you omit a replica from this list, the replica turns into a + regular, standalone index that will no longer by synced with the + primary index. + + + **Modifier** + + +
+ +
virtual("REPLICA")
+ +
+ + + Create a virtual replica, + + Virtual replicas don't increase the number of records and are + optimized for [Relevant + sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + + +
+ +
+ + + Without modifier, a standard replica is created, which duplicates + your record count and is used for strict, or [exhaustive + sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). default: [] x-categories: - Ranking paginationLimitedTo: type: integer - example: 20 - description: Maximum number of hits accessible through pagination. + example: 100 + description: > + Maximum number of search results that can be obtained through + pagination. + + + Higher pagination limits might slow down your search. + + For pagination limits above 1,000, the sorting of results beyond the + 1,000th hit can't be guaranteed. default: 1000 + maximum: 20000 unretrievableAttributes: type: array items: type: string example: - - popularity - description: Attributes that can't be retrieved at query time. + - total_sales + description: > + Attributes that can't be retrieved at query time. + + + This can be useful if you want to use an attribute for ranking or to + [restrict + access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), + + but don't want to include it in the search results. default: [] x-categories: - Attributes @@ -2001,18 +2964,27 @@ components: example: - wheel - 1X2BCD - description: >- + description: > Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + This also turns off [word splitting and + concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + for the specified words. default: [] x-categories: - Typos attributesToTransliterate: - description: >- - Attributes in your index to which [Japanese - transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - applies. This will ensure that words indexed in Katakana or Kanji - can also be searched in Hiragana. + description: > + Attributes, for which you want to support [Japanese + transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + + + Transliteration supports searching in any of the Japanese writing + systems. + + To support transliteration, you must set the indexing language to + Japanese. type: array items: type: string @@ -2028,7 +3000,7 @@ components: example: - description description: >- - Attributes on which to split [camel + Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. default: [] x-categories: @@ -2038,10 +3010,27 @@ components: example: de: - name - description: >- - Attributes in your index to which [word + description: > + Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - (decompounding) applies. + (decompounding). + + + Compound words are formed by combining two or more individual words, + + and are particularly prevalent in Germanic languages—for example, + "firefighter". + + With decompounding, the individual components are indexed + separately. + + + You can specify different lists for different languages. + + Decompounding is supported for these languages: + + Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish + (`sv`), and Norwegian (`no`). default: {} x-categories: - Languages @@ -2051,12 +3040,26 @@ components: type: string example: - ja - description: >- - Set the languages of your index, for language-specific processing - steps such as - [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - and - [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for a language for language-specific processing steps, such as word + detection and dictionary settings. + + + **You should always specify an indexing language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages @@ -2067,7 +3070,7 @@ components: example: - sku description: >- - Attributes for which you want to turn off [prefix + Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). default: [] x-categories: @@ -2075,10 +3078,10 @@ components: allowCompressionOfIntegerArray: type: boolean description: > - Incidates whether the engine compresses arrays with exclusively - non-negative integers. + Whether arrays with exclusively non-negative integers should be + compressed for better performance. - When enabled, the compressed arrays may be reordered. + If true, the compressed arrays may be reordered. default: false x-categories: - Performance @@ -2086,11 +3089,43 @@ components: type: array items: type: string - description: >- + description: > Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + + + By default, all numeric attributes are available as numerical + filters. + + For faster indexing, reduce the number of numeric attributes. + + + If you want to turn off filtering for all numeric attributes, + specifiy an attribute that doesn't exist in your index, such as + `NO_NUMERIC_FILTERING`. + + + **Modifier** + + +
+ +
equalOnly("ATTRIBUTE")
+ +
+ + + Support only filtering based on equality comparisons `=` and `!=`. + + +
+ +
+ + + Without modifier, all numeric comparisons are supported. example: - - quantity + - equalOnly(quantity) - popularity default: [] x-categories: @@ -2098,11 +3133,19 @@ components: separatorsToIndex: type: string example: +# - description: >- - Controls which separators are added to an Algolia index as part of - [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). + description: > + Controls which separators are indexed. + + Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + + By default, separator characters aren't indexed. + + With `separatorsToIndex`, Algolia treats separator characters as + separate words. + + For example, a search for `C#` would report two matches. default: '' x-categories: - Typos @@ -2116,24 +3159,64 @@ components: - unordered(text) - emails.personal description: > - [Attributes used for - searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), - including determining [if matches at the beginning of a word are - important (ordered) or not - (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + Attributes used for searching. + + + By default, all attributes are searchable and the + [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + ranking criterion is turned off. + + With a non-empty list, Algolia only returns results with matches in + the selected attributes. + + In addition, the Attribute ranking criterion is turned on: matches + in attributes that are higher in the list of `searchableAttributes` + rank first. + + To make matches in two attributes rank equally, include them in a + comma-separated string, such as `"title,alternate_title"`. + + Attributes with the same priority are always unordered. + + + For more information, see [Searchable + attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + + + **Modifier** + + +
+ +
unordered("ATTRIBUTE")
+ +
+ + Ignore the position of a match within the attribute. + +
+ +
+ + + Without modifier, matches at the beginning of an attribute rank + higer than matches at the end. default: [] x-categories: - Attributes userData: $ref: '#/components/schemas/userData' customNormalization: - description: >- - A list of characters and their normalized replacements to override - Algolia's default + description: > + Characters and their normalized replacements. + + This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). type: object - example: | - {default: {'ä': 'ae', 'ĂĽ': 'ue'}} + example: + default: + ä: ae + ĂĽ: ue additionalProperties: type: object additionalProperties: @@ -2141,14 +3224,28 @@ components: x-categories: - Languages attributeForDistinct: - description: >- - Name of the deduplication attribute to be used with Algolia's - [_distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + description: > + Attribute that should be used to establish groups of results. + + + All records with the same value for this attribute are considered a + group. + + You can combine `attributeForDistinct` with the `distinct` search + parameter to control + + how many items per group are included in the search results. + + + If you want to use the same attribute also for faceting, use the + `afterDistinct` modifier of the `attributesForFaceting` setting. + + This applies faceting _after_ deduplication, which will result in + accurate facet counts. example: url type: string indexSettings: - description: Algolia index settings. + description: Index settings. allOf: - $ref: '#/components/schemas/baseIndexSettings' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -2227,7 +3324,7 @@ components: description: Unique identifier of a synonym object. synonymHits: type: array - description: Synonym objects. + description: Matching synonyms. items: $ref: '#/components/schemas/synonymHit' searchSynonymsResponse: @@ -2264,38 +3361,7 @@ components: - key - createdAt acl: - description: > - API key permissions: - - - `addObject`: required to add or update records, copy or move an index. - - `analytics`: required to access the Analytics API. - - `browse`: required to view records - - `deleteIndex`: required to delete indices. - - `deleteObject`: required to delete records. - - `editSettings`: required to change index settings. - - `inference`: required to access the Inference API. - - `listIndexes`: required to list indices. - - `logs`: required to access logs of search and indexing operations. - - `recommendation`: required to access the Personalization and Recommend - APIs. - - `search`: required to search records - - `seeUnretrievableAttributes`: required to retrieve - [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - for all operations that return records. - - `settings`: required to examine index settings. + description: Access control list permissions. type: string enum: - addObject @@ -2321,8 +3387,13 @@ components: acl: type: array description: > - [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) - associated with the key. + Permissions that determine the type of API requests this key can + make. + + The required ACL is listed in each endpoint's reference. + + For more information, see [access control + list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). example: - search - addObject @@ -2331,78 +3402,92 @@ components: $ref: '#/components/schemas/acl' description: type: string - description: Description of an API key for you and your team members. - example: Browse-restricted key + description: Description of an API key to help you identify this API key. + example: Used for indexing by the CLI default: '' indexes: type: array description: > - Restricts this API key to a list of indices or index patterns. If - the list is empty, all indices are allowed. + Index names or patterns that this API key can access. + + By default, an API key can access all indices in the same + application. + + + You can use leading and trailing wildcard characters (`*`): - Specify either an exact index name or a pattern with a leading or - trailing wildcard character (or both). For example: - - `dev_*` matches all indices starting with "dev_" - `*_dev` matches - all indices ending with "_dev" - `*_products_*` matches all indices - containing "_products_". + - `dev_*` matches all indices starting with "dev_". + + - `*_dev` matches all indices ending with "_dev". + + - `*_products_*` matches all indices containing "_products_". example: - dev_* - - prod_products + - prod_en_products default: [] items: type: string maxHitsPerQuery: type: integer - description: > - Maximum number of hits this API key can retrieve in one query. If - zero, no limit is enforced. - - > **Note**: Use this parameter to protect you from third-party - attempts to retrieve your entire content by massively querying the - index. + description: | + Maximum number of results this API key can retrieve in one query. + By default, there's no limit. default: 0 maxQueriesPerIPPerHour: type: integer description: > - Maximum number of API calls per hour allowed from a given IP address - or [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + Maximum number of API requests allowed per IP address or [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) + per hour. - Each time an API call is performed with this key, a check is - performed. If there were more than the specified number of calls - within the last hour, the API returns an error with the status code - `429` (Too Many Requests). + If this limit is reached, the API returns an error with status code + `429`. - > **Note**: Use this parameter to protect you from third-party - attempts to retrieve your entire content by massively querying the - index. + By default, there's no limit. default: 0 queryParameters: type: string description: > - Force some [query - parameters](https://www.algolia.com/doc/api-reference/api-parameters/) - to be applied for each query made with this API key. + Query parameters to add when making API requests with this API key. + + + To restrict this API key to specific IP addresses, add the + `restrictSources` parameter. + + You can only add a single source, but you can provide a range of IP + addresses. - It's a URL-encoded query string. - example: >- - typoTolerance%3Dstrict%26ignorePlurals%3Dfalse%26filters%3Drights%3Apublic + + Creating an API key fails if the request is made from an IP address + that's outside the restricted range. + example: typoTolerance=strict&restrictSources=192.168.1.0/24 default: '' referers: type: array description: > - Restrict this API key to specific - [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - If empty, all referrers are allowed. + Allowed HTTP referrers for this API key. + + + By default, all referrers are allowed. + + You can use leading and trailing wildcard characters (`*`): - For example: - - `https://algolia.com/*` matches all referrers starting with - "https://algolia.com/" - `*.algolia.com` matches all referrers - ending with ".algolia.com" - `*algolia.com*` allows everything in - the domain "algolia.com". + - `https://algolia.com/*` allows all referrers starting with + "https://algolia.com/" + + - `*.algolia.com` allows all referrers ending with ".algolia.com" + + - `*algolia.com*` allows all referrers in the domain "algolia.com". + + + Like all HTTP headers, referrers can be spoofed. Don't rely on them + to secure your data. + + For more information, see [HTTP referrer + restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). example: - '*algolia.com*' default: [] @@ -2410,18 +3495,9 @@ components: type: string validity: type: integer - description: > - Validity duration of a key (in seconds). The key will automatically - be removed after this time has expired. The default value of 0 never - expires. - - Short-lived API keys are useful to grant temporary access to your - data. For example, in mobile apps, you can't [control when users - update your - app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - So instead of encoding keys into your app as you would for a web - app, you should dynamically fetch them from your mobile app's - backend. + description: | + Duration (in seconds) after which the API key expires. + By default, API keys don't expire. example: 86400 default: 0 required: @@ -2434,7 +3510,7 @@ components: type: string example: '2023-07-04T12:49:15Z' description: >- - Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) + Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. addApiKeyResponse: type: object @@ -2447,12 +3523,21 @@ components: required: - key - createdAt + ruleID: + title: objectID + type: string + description: Unique identifier of a rule object. anchoring: type: string - description: >- - Whether the pattern parameter matches the beginning (`startsWith`) or - end (`endsWith`) of the query string, is an exact match (`is`), or a - partial match (`contains`). + description: | + Which part of the search query the pattern should match: + + - `startsWith`. The pattern must match the begginning of the query. + - `endsWith`. The pattern must match the end of the query. + - `is`. The pattern must match the query exactly. + - `contains`. The pattern must match anywhere in the query. + + Empty queries are only allowed as pattern with `anchoring: is`. enum: - is - startsWith @@ -2464,18 +3549,49 @@ components: properties: pattern: type: string - description: Query pattern syntax. - example: '{facet:brand}' + description: > + Query pattern that triggers the rule. + + + You can use either a literal string, or a special pattern + `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. + + The rule is triggered if the query matches the literal string or a + value of the specified facet. + + For example, with `pattern: {facet:genre}`, the rule is triggered + when users search for a genre, such as "comedy". + example: '{facet:genre}' anchoring: $ref: '#/components/schemas/anchoring' alternatives: type: boolean - description: Whether the pattern matches on plurals, synonyms, and typos. + description: Whether the pattern should match plurals, synonyms, and typos. default: false context: type: string - description: 'Rule context format: [A-Za-z0-9_-]+).' - example: trackedFilters + pattern: '[A-Za-z0-9_-]+' + description: > + An additional restriction that only triggers the rule, when the + search has the same value as `ruleContexts` parameter. + + For example, if `context: mobile`, the rule is only triggered when + the search request has a matching `ruleContexts: mobile`. + + A rule context must only contain alphanumeric characters. + example: mobile + filters: + type: string + description: > + Filters that trigger the rule. + + + You can add add filters using the syntax `facet:value` so that the + rule is triggered, when the specific filter is selected. + + You can use `filters` on its own or combine it with the `pattern` + parameter. + example: genre:comedy editType: description: Type of edit. type: string @@ -2493,57 +3609,79 @@ components: type: string insert: description: >- - Text that should be inserted in place of the removed text inside the - query string. + Text to be added in place of the deleted text inside the query + string. type: string consequenceQueryObject: type: object additionalProperties: false properties: remove: - description: Words to remove. + description: Words to remove from the search query. type: array items: type: string edits: - description: Edits to apply. + description: Changes to make to the search query. type: array items: $ref: '#/components/schemas/edit' consequenceQuery: - description: >- - When providing a string, it replaces the entire query string. When - providing an object, it describes incremental edits to be made to the - query string (but you can't do both). + description: > + Replace or edit the search query. + + + If `consequenceQuery` is a string, the entire search query is replaced + with that string. + + If `consequenceQuery` is an object, it describes incremental edits made + to the query. oneOf: - $ref: '#/components/schemas/consequenceQueryObject' - type: string automaticFacetFilter: type: object - description: Automatic facet Filter. + description: Filter or optional filter to be applied to the search. additionalProperties: false properties: facet: type: string - description: >- - Attribute to filter on. This must match a facet placeholder in the - Rule's pattern. + description: > + Facet name to be applied as filter. + + The name must match placeholders in the `pattern` parameter. + + For example, with `pattern: {facet:genre}`, `automaticFacetFilters` + must be `genre`. score: type: integer default: 1 - description: >- - Score for the filter. Typically used for optional or disjunctive - filters. + description: Filter scores to give different weights to individual filters. disjunctive: type: boolean default: false - description: Whether the filter is disjunctive (true) or conjunctive (false). + description: > + Whether the filter is disjunctive or conjunctive. + + + If true the filter has multiple matches, multiple occurences are + combined with the logical `OR` operation. + + If false, multiple occurences are combined with the logical `AND` + operation. required: - facet automaticFacetFilters: - description: >- - Names of facets to which automatic filtering must be applied; they must - match the facet name of a facet value placeholder in the query pattern. + description: > + Filter to be applied to the search. + + + You can use this to respond to search queries that match a facet value. + + For example, if users search for "comedy", which matches a facet value + of the "genre" facet, + + you can filter the results to show the top-ranked comedy movies. oneOf: - type: array items: @@ -2553,7 +3691,12 @@ components: type: string params: type: object - description: Additional search parameters. + description: > + Parameters to apply to this search. + + + You can use all search parameters, plus special `automaticFacetFilters`, + `automaticOptionalFacetFilters`, and `query`. additionalProperties: false properties: query: @@ -2572,38 +3715,39 @@ components: promotePosition: type: integer description: >- - The position to promote the records to. If you pass objectIDs, the - records are placed at this position as a group. For example, if you - pronmote four objectIDs to position 0, the records take the first four - positions. + Position in the search results where you want to show the promoted + records. example: 0 promoteObjectIDs: + title: objectIDs description: Records to promote. type: object additionalProperties: false properties: objectIDs: type: array - description: Unique identifiers of the records to promote. - example: - - 3f31c087763a2ceec359b318fc3edef3 - - 63c3c871e31a152d67df7720192fd752 + maxItems: 100 + description: | + Object IDs of the records you want to promote. + + The records are placed as a group at the `position`. + For example, if you want to promote four records to position `0`, + they will be the first four search results. items: - type: string + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: - position - objectIDs promoteObjectID: + title: objectID description: Record to promote. type: object additionalProperties: false properties: objectID: - type: string - example: 2b642cf64c587f50388eb1b8d047bf56 - description: Unique identifier of the record to promote. + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: @@ -2616,32 +3760,50 @@ components: consequence: type: object description: > - [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - of a rule. + Effect of the rule. + + + For more information, see + [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). additionalProperties: false properties: params: $ref: '#/components/schemas/consequenceParams' promote: type: array - description: Records to promote. + maxItems: 300 + description: > + Records you want to pin to a specific position in the search + results. + + + You can promote up to 300 records, either individually, or as groups + of up to 100 records each. items: $ref: '#/components/schemas/promote' filterPromotes: type: boolean default: false - description: >- - Only use in combination with the `promote` consequence. When `true`, - promoted results will be restricted to match the filters of the - current search. When `false`, the promoted results will show up - regardless of the filters. + description: > + Whether promoted records must match an active filter for the + consequence to be applied. + + + This ensures that user actions (filtering the search) are given a + higher precendence. + + For example, if you promote a record with the `color: red` + attribute, and the user filters the search for `color: blue`, + + the "red" record won't be shown. hide: type: array - description: Records to hide. By default, you can hide up to 50 records per rule. + maxItems: 50 + description: Records you want to hide from the search results. items: title: consequenceHide type: object - description: Unique identifier of the record to hide. + description: Object ID of the record to hide. additionalProperties: false properties: objectID: @@ -2649,10 +3811,12 @@ components: required: - objectID userData: - description: >- - Custom JSON object that will be appended to the userData array in - the response. This object isn't interpreted by the API. It's limited - to 1kB of minified JSON. + description: > + A JSON object with custom data that will be appended to the + `userData` array in the response. + + This object isn't interpreted by the API and is limited to 1 kB + of minified JSON. example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 @@ -2662,10 +3826,10 @@ components: properties: from: type: integer - description: Lower bound of the time range (Unix timestamp). + description: When the rule should start to be active, in Unix epoch time. until: type: integer - description: Upper bound of the time range (Unix timestamp). + description: When the rule should stop to be active, in Unix epoch time. required: - from - until @@ -2675,15 +3839,20 @@ components: additionalProperties: false properties: objectID: - type: string - description: Unique identifier for a rule object. - example: hide-12345 + $ref: '#/components/schemas/ruleID' conditions: type: array + minItems: 0 + maxItems: 25 description: > - [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) - required to activate a rule. You can use up to 25 conditions per - rule. + Conditions that trigger a rule. + + + Some consequences require specific conditions or don't require any + condition. + + For more information, see + [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). items: $ref: '#/components/schemas/condition' consequence: @@ -2691,20 +3860,16 @@ components: description: type: string description: >- - Description of the rule's purpose. This can be helpful for display - in the Algolia dashboard. + Description of the rule's purpose to help you distinguish between + different rules. example: Display a promotional banner enabled: type: boolean default: true - description: >- - Indicates whether to enable the rule. If it isn't enabled, it isn't - applied at query time. + description: Whether the rule is active. validity: type: array - description: >- - If you specify a validity period, the rule _only_ applies only - during that period. If specified, the array must not be empty. + description: Time periods when the rule is active. items: $ref: '#/components/schemas/timeRange' required: @@ -2714,7 +3879,7 @@ components: additionalProperties: false properties: objectID: - $ref: '#/components/schemas/objectID' + $ref: '#/components/schemas/ruleID' updatedAt: $ref: '#/components/schemas/updatedAt' taskID: @@ -2725,12 +3890,12 @@ components: - taskID parameters_query: type: string - description: Rule object query. + description: Search query for rules. default: '' parameters_page: type: integer minimum: 0 - description: Requested page (the first page is page 0). + description: Requested page of the API response. parameters_hitsPerPage: type: integer default: 20 @@ -2755,9 +3920,7 @@ components: - enabled - disabled default: enabled - description: >- - Indicates whether a dictionary entry is active (`enabled`) or inactive - (`disabled`). + description: Whether a dictionary entry is active. dictionaryEntry: type: object description: Dictionary entry. @@ -2768,55 +3931,33 @@ components: properties: objectID: type: string - description: Unique identifier for a dictionary object. - example: under + description: Unique identifier for the dictionary entry. + example: 828afd405e1f4fe950b6b98c2c43c032 language: type: string - description: > - [Supported language ISO - code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + description: >- + ISO code of a [supported + language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). example: de word: type: string - description: > - Dictionary entry word. Usage depends on the type of dictionary - entry. - - **`stopwordEntry`** - - The stop word you want to add or update. If the entry already exists - in Algolia's standard dictionary, you can override its behavior by - adding it to the custom dictionary and setting its `state` to - `disabled`. - - **`compoundEntry`** - - When `decomposition` is empty: adds `word` as a compound atom. For - example, atom “kino” decomposes the query “kopfkino” into "kopf" and - "kino". - - When `decomposition` isn't empty: creates a decomposition exception. - For example, when decomposition is set to the ["hund", "hutte"] - exception, "hundehutte" decomposes into “hund” and “hutte”, - discarding the linking "e". - example: down + description: >- + Matching dictionary word for `stopwords` and `compounds` + dictionaries. + example: the words: type: array - description: > - Compound dictionary [word - declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). - - If the entry already exists in Algolia's standard dictionary, you - can override its behavior by adding it to the custom dictionary and - setting its `state` to `disabled`. + description: Matching words in the `plurals` dictionary including declensions. example: - cheval - - chevaux + - cheveaux items: type: string decomposition: type: array - description: For compound entries, governs the behavior of the `word` parameter. + description: >- + Invividual components of a compound word in the `compounds` + dictionary. example: - kopf - schmerz @@ -2826,18 +3967,39 @@ components: state: $ref: '#/components/schemas/dictionaryEntryState' language: - description: > - [Supported language ISO - code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + description: >- + ISO code of a [supported + language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). example: en type: string + searchDictionaryEntriesResponse: + type: object + additionalProperties: false + properties: + hits: + type: array + description: Dictionary entries matching the search criteria. + items: + $ref: '#/components/schemas/dictionaryEntry' + page: + $ref: '#/components/schemas/parameters_page' + nbHits: + $ref: '#/components/schemas/nbHits' + nbPages: + $ref: '#/components/schemas/nbPages' + required: + - hits + - page + - nbHits + - nbPages standardEntry: description: Key-value pair of a language ISO code and a boolean value. - example: | - {'fr': false} + example: + fr: false type: object nullable: true additionalProperties: + x-additionalPropertiesName: language type: boolean standardEntries: description: > @@ -2856,15 +4018,12 @@ components: type: object additionalProperties: false nullable: true - description: Custom entries for a dictionary. + description: >- + Dictionary type. If `null`, this dictionary type isn't supported for the + language. properties: nbCustomEntries: - description: > - If `0`, the dictionary hasn't been customized and only contains - standard entries provided by Algolia. - - If `null`, that feature isn't available or isn't supported for that - language. + description: Number of custom dictionary entries. type: integer languages: type: object @@ -2884,7 +4043,7 @@ components: userID: type: string pattern: ^[a-zA-Z0-9 \-*.]+$ - description: userID of the user. + description: User ID. example: user1 userId: title: userID @@ -2953,14 +4112,16 @@ components: enum: - published - notPublished - description: _published_ if the task has been processed, _notPublished_ otherwise. + description: >- + Task status, `published` if the task is completed, `notPublished` + otherwise. operationType: type: string enum: - move - copy example: copy - description: Operation to perform (_move_ or _copy_). + description: Operation to perform on the index. scopeType: type: string enum: @@ -3068,47 +4229,62 @@ components: type: string description: > Filters that apply to every search made with the secured API key. - You can add extra filters at search time with the filters query - parameter. - For example, if you set the filter group:admin on your generated API - key, and you add groups:press OR groups:visitors with the filters - query parameter, your final search filter is equivalent to - groups:admin AND (groups:press OR groups:visitors). + Extra filters added at search time will be combined with `AND`. + + For example, if you set `group:admin` as fixed filter on your + generated API key, + + and add `groups:visitors` to the search query, the complete set of + filters will be `group:admin AND groups:visitors`. validUntil: type: integer format: int64 - description: Unix timestamp used to set the expiration date of the API key. + description: >- + Timestamp in [Unix epoch + time](https://en.wikipedia.org/wiki/Unix_time) when the API key + should expire. restrictIndices: type: array items: type: string - description: Index names that can be queried. + description: > + Index names or patterns that this API key can access. + + By default, an API key can access all indices in the same + application. + + + You can use leading and trailing wildcard characters (`*`): + + + - `dev_*` matches all indices starting with "dev_". + + - `*_dev` matches all indices ending with "_dev". + + - `*_products_*` matches all indices containing "_products_". restrictSources: type: string description: > - IPv4 network allowed to use the generated key. Use this to protect - against API key leaking and reuse. + IP network that are allowed to use this key. - You can only provide a single source, but you can specify a range of - IPs (for example, 192.168.1.0/24). + + You can only add a single source, but you can provide a range of IP + addresses. + + Use this to protect against API key leaking and reuse. + example: 192.168.1.0/24 userToken: type: string description: > - Unique user IP address. - - This can be useful when you want to impose a rate limit on specific - users. By default, rate limits are set based on the IP address. This - can become an issue when several users search from the same IP - address. To avoid this, you can set a unique userToken for each user - when generating their API key. This lets you restrict each user to a - maximum number of API calls per hour, even if they share their IP - with another user. Specifying the userToken in a secured API key is - also a good security practice as it ensures users don't change it. - Many features like Analytics, Personalization, and Dynamic - Re-ranking rely on the authenticity of user identifiers. Setting the - userToken at the API key level ensures that downstream services work - as expected and prevents abuse. + Pseudonymous user identifier to restrict usage of this API key to + specific users. + + + By default, rate limits are set based on IP addresses. This can be + an issue if many users search from the same IP address. + + To avoid this, add a user token to each generated API key. responses: BadRequest: description: Bad request or request arguments. @@ -3226,58 +4402,114 @@ security: apiKey: [] tags: - name: Advanced - description: Advanced operations. + description: Query your logs. - name: Api Keys - description: Manage your API keys. - - name: Clusters + x-displayName: API keys description: > - Multi-cluster operations. + Manage your API keys. + - Algolia no longer offers [multi-cluster - management](https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/). + API requests must be authenticated with an API key. - - If you want to partition your data per user, use facets and secured API - keys instead. - If you need more data, consider upgrading to a bigger - cluster to suit your needs. Contact [Algolia's support - team](https://support.algolia.com/hc/en-us/requests/new) for details. + API keys can have permissions (access control lists, ACL) and + restrictions. + externalDocs: + url: https://www.algolia.com/doc/guides/security/api-keys/ + description: | + Related guide: API keys. + - name: Clusters + description: | + Multi-cluster operations. + + Algolia no longer offers multi-cluster management. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/ + description: | + Related guide: Multi-cluster management. - name: Dictionaries - description: >- - Dictionary operations allow you to customize linguistic features such as - [stop - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - and [segmentation - (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/). + description: > + Manage your dictionaries. + + + Customize language-specific settings, such as stop words, plurals, or word + segmentation. + + + Dictionaries are application-wide. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/ + description: | + Related guide: Natural languages. - name: Indices - description: >- - Manage indices, including listing them, checking and updating settings, - deleting, copying, and renaming. + description: > + Manage your indices and index settings. + + + Indices are copies of your data that are stored on Algolia's servers. + + They're optimal data structures for fast search and are made up of records + and settings. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/ + description: | + Related guide: Manage your indices. - name: Records - description: Record operations. + description: > + Add, update, and delete records from your indices. + + + Records are individual items in your index. + + When they match a search query, they're returned as search results, in the + order determined by your ranking. + + Records are schemaless JSON objects. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/ + description: | + Related guide: Prepare your records. - name: Rules - description: Rules operations. - - name: Search - description: Search operations. - - name: Synonyms - description: Synonym operations. - - name: Vaults description: > - Vault operations. + Create, update, delete, and search for rules. - Algolia Vault allows you to restrict network-level access to your cluster - to a specific set of IP addresses: for non-authorized IP addresses, the - cluster is invisible. - You should authorize the IP addresses of team members who need to access - the Alglolia dashboard, as it's also affected by the restricted list you - set up. + Rules are _if-then_ statements that you can use to curate search results. - To access this feature, [Algolia - Vault](https://www.algolia.com/doc/guides/security/algolia-vault/) must be - enabled on your server. Contact [Algolia's support - team](https://support.algolia.com/hc/en-us/requests/new) for details. + Rules have _conditions_ which can trigger _consequences_. + + Consequences are changes to the search results, such as changing the order + of search results, or boosting a facet. + + This can be useful for tuning specific queries or for merchandising. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/ + description: | + Related guide: Rules. + - name: Search + description: Search one or more indices for matching records or facet values. + - name: Synonyms + description: | + Create, update, delete, and search for synonyms. - > **Note**: The maximum number of allowed sources is 1,000. + Synonyms are terms that the search engine should consider equal. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/ + description: | + Related guide: Synonyms. + - name: Vaults + description: >- + Algolia Vault lets you restrict access to your clusters to specific IP + addresses and provides disk-level encryption at rest. + externalDocs: + url: https://www.algolia.com/doc/guides/security/algolia-vault/ + description: | + Related guide: Algolia Vault. - name: _model_index_settings x-displayName: Index settings description: | @@ -4068,7 +5300,15 @@ paths: x-acl: - search summary: Search an index. - description: Return records that match the query. + description: > + Searches a single index and return matching search results (_hits_). + + + This method lets you retrieve up to 1,000 hits. + + If you need more, use the [`browse` + operation](#tag/Search/operation/browse) or increase the + `paginatedLimitedTo` index setting. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -4279,12 +5519,23 @@ paths: x-acl: - search summary: Search multiple indices. - description: Send multiple search queries to one or more indices. + description: > + Sends multiple search request to one or more indices. + + + This can be useful in these cases: + + + - Different indices for different purposes, such as, one index for + products, another one for marketing content. + + - Multiple searches to the same index—for example, with different + filters. requestBody: required: true description: >- - Query requests and strategies. Results will be received in the same - order as the queries. + Muli-search request body. Results are returned in the same order as + the requests. content: application/json: schema: @@ -4558,18 +5809,22 @@ paths: - search summary: Search for facet values. description: > - [Search for a facet's - values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - optionally restricting the returned values to those contained in records - matching other search criteria. - - > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are - ignored). By default, the engine returns a maximum of 10 values but you - can adjust this with `maxFacetHits`. + Searches for values of a specified facet attribute. + + + - By default, facet values are sorted by decreasing count. + You can adjust this with the `sortFacetValueBy` parameter. + - Searching for facet values doesn't work if you have **more than 65 + searchable facets and searchable attributes combined**. parameters: - $ref: '#/components/parameters/IndexName' - name: facetName - description: Facet name. + description: > + Facet attribute in which to search for values. + + + This attribute must be included in the `attributesForFaceting` index + setting with the `searchable()` modifier. in: path required: true schema: @@ -4790,15 +6045,27 @@ paths: operationId: browse x-acl: - browse - summary: Get all records from an index. + summary: Browse for records. description: > - Retrieve up to 1,000 records per call. + Retrieves records from an index, up to 1,000 per request. + + + While searching retrieves _hits_ (records augmented with attributes for + highlighting and ranking details), - Supports full-text search and filters. For better performance, it - doesn't support: + browsing _just_ returns matching records. - - The `distinct` query parameter - Sorting by typos, proximity, words, - or geographical distance. + This can be useful if you want to export your indices. + + + - The Analytics API doesn't collect data when using `browse`. + + - Records are ranked by attributes and custom ranking. + + - Deduplication (`distinct`) is turned off. + + - There's no ranking for: typo-tolerance, number of matched words, + proximity, geo distance. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -4997,22 +6264,35 @@ paths: x-acl: - addObject description: > - Add a record (object) to an index or replace it. + Adds a record to an index or replace it. + + + - If the record doesn't have an object ID, a new record with an + auto-generated object ID is added to your index. + + - If a record with the specified object ID exists, the existing record + is replaced. - If the record doesn't contain an `objectID`, Algolia automatically adds - it. + - If a record with the specified object ID doesn't exist, a new record + is added to your index. - If you use an existing `objectID`, the existing record is replaced with - the new one. + - If you add a record to an index that doesn't exist yet, a new index is + created. - To add multiple records to your index in a single API request, use the - [`batch` operation](#tag/Records/operation/batch). - summary: Add or update a record. + + To update _some_ attributes of a record, use the [`partial` + operation](#tag/Records/operation/partial). + + To add, update, or replace multiple records, use the [`batch` + operation](#tag/Records/operation/batch). + summary: Add or replace a record. parameters: - $ref: '#/components/parameters/IndexName' requestBody: required: true - description: The Algolia record. + description: >- + The record, a schemaless object with attributes that are useful in the + context of search and discovery. content: application/json: schema: @@ -5029,7 +6309,7 @@ paths: properties: createdAt: type: string - description: Date of creation (ISO-8601 format). + description: Timestamp when the record was added, in ISO 8601 format. example: '2023-06-29T15:15:40.747Z' taskID: $ref: '#/components/schemas/taskID' @@ -5255,8 +6535,27 @@ paths: operationId: deleteIndex x-acl: - deleteIndex - summary: Delete index. - description: Delete an existing index. + summary: Delete an index. + description: > + Deletes an index and all its settings. + + + - Deleting an index doesn't delete its analytics data. + + - If you try to delete a non-existing index, the operation is ignored + without warning. + + - If the index you want to delete has replica indices, the replicas + become independent indices. + + - If the index you want to delete is a replica index, you must first + unlink it from its primary index before you can delete it. + For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/delete-indices/ + description: | + Related guide: Delete indices. parameters: - $ref: '#/components/parameters/IndexName' responses: @@ -5445,9 +6744,12 @@ paths: operationId: getObject x-acl: - search - summary: Get a record. - description: >- - To get more than one record, use the [`objects` + summary: Retrieve a record. + description: > + Retrieves one record by its object ID. + + + To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). parameters: - $ref: '#/components/parameters/IndexName' @@ -5455,13 +6757,18 @@ paths: - name: attributesToRetrieve in: query description: > - Attributes to include with the records in the response. This is - useful to reduce the size of the API response. By default, all - retrievable attributes are returned. + Attributes to include with the records in the response. + + This is useful to reduce the size of the API response. + + By default, all retrievable attributes are returned. + - `objectID` is always retrieved, even when not specified. + `objectID` is always retrieved. + + + Attributes included in `unretrievableAttributes` - [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. schema: @@ -5476,7 +6783,7 @@ paths: schema: title: getObjectResponse type: object - description: Fetched object. + description: The requested record. additionalProperties: $ref: '#/components/schemas/attribute' '400': @@ -5698,24 +7005,27 @@ paths: operationId: addOrUpdateObject x-acl: - addObject - summary: Add or update a record (using objectID). + summary: Add or replace a record. description: > - If you use an existing `objectID`, the existing record will be replaced - with the new one. + If a record with the specified object ID exists, the existing record is + replaced. + Otherwise, a new record is added to the index. - To update only some attributes of an existing record, use the [`partial` - operation](#tag/Records/operation/partialUpdateObject) instead. + To update _some_ attributes of an existing record, use the [`partial` + operation](#tag/Records/operation/partialUpdateObject) instead. - To add multiple records to your index in a single API request, use the - [`batch` operation](#tag/Records/operation/batch). + To add, update, or replace multiple records, use the [`batch` + operation](#tag/Records/operation/batch). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectID' requestBody: required: true - description: Algolia record. + description: >- + The record, a schemaless object with attributes that are useful in the + context of search and discovery. content: application/json: schema: @@ -5949,9 +7259,15 @@ paths: x-acl: - deleteObject summary: Delete a record. - description: >- - To delete a set of records matching a query, use the [`deleteByQuery` - operation](#tag/Records/operation/deleteBy) instead. + description: > + Deletes a record by its object ID. + + + To delete more than one record, use the [`batch` + operation](#tag/Records/operation/batch). + + To delete records matching a query, use the [`deleteByQuery` + operation](#tag/Records/operation/deleteBy). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectID' @@ -6145,12 +7461,16 @@ paths: operationId: deleteBy x-acl: - deleteIndex - summary: Delete all records matching a query. + summary: Delete records matching a query. description: > - This operation doesn't support all the query options, only its filters - (numeric, facet, or tag) and geo queries. + This operation doesn't accept empty queries or filters. + + + It's more efficient to get a list of object IDs with the [`browse` + operation](#tag/Search/operation/browse), - It doesn't accept empty filters or queries. + and then delete the records using the [`batch` + operation](tag/Records/operation/batch). parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -6374,8 +7694,8 @@ paths: - deleteIndex summary: Delete all records from an index. description: >- - Delete the records but leave settings and index-specific API keys - untouched. + Deletes only the records from an index while keeping settings, synonyms, + and rules. parameters: - $ref: '#/components/parameters/IndexName' responses: @@ -6564,28 +7884,28 @@ paths: operationId: partialUpdateObject x-acl: - addObject - summary: Update record attributes. + summary: Add or update attributes. x-codegen-request-body-name: attributesToUpdate - description: > - Add new attributes or update current ones in an existing record. + description: | + Adds new attributes to a record, or update existing ones. - You can use any first-level attribute but not nested attributes. If you - specify a [nested - attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - the engine treats it as a replacement for its first-level ancestor. + - If a record with the specified object ID doesn't exist, + a new record is added to the index **if** `createIfNotExists` is true. + - If the index doesn't exist yet, this method creates a new index. + - You can use any first-level attribute but not nested attributes. + If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectID' - name: createIfNotExists - description: | - Indicates whether to create a new record if it doesn't exist yet. + description: Whether to create a new record if it doesn't exist. in: query schema: type: boolean default: true requestBody: required: true - description: Object with attributes to update. + description: Attributes with their values. content: application/json: schema: @@ -6871,14 +8191,19 @@ paths: tags: - Records operationId: batch - summary: Batch write operations on one index. + summary: Batch indexing operations on one index. description: > - To reduce the time spent on network round trips, you can perform several - write actions in a single API call. Actions are applied in the order - they are specified. + Adds, updates, or deletes records in one index with a single API + request. + - The supported `action`s are equivalent to the individual operations of - the same name. + Batching index updates reduces latency and increases data integrity. + + + - Actions are applied in the order they're specified. + + - Actions are equivalent to the individual API requests of the same + name. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -6912,6 +8237,21 @@ paths: - body required: - requests + examples: + batch: + summary: Batch indexing request. + value: + requests: + - action: addObject + body: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + - action: addObject + body: + name: Gayla geimer + company: Ortman McCain Co. + email: gayla@geimer.com responses: '200': description: OK @@ -7190,14 +8530,15 @@ paths: - Records operationId: multipleBatch description: > - To reduce the time spent on network round trips, you can perform several - write actions in a single request. It's a multi-index version of the - [`batch` operation](#tag/Records/operation/batch). Actions are applied - in the order they are specified. - - The supported actions are equivalent to the individual operations of the - same name. - summary: Batch write operations on multiple indices. + Adds, updates, or deletes records in multiple indices with a single API + request. + + + - Actions are applied in the order they are specified. + + - Actions are equivalent to the individual API requests of the same + name. + summary: Batch indexing operations on multiple indices. requestBody: required: true content: @@ -7220,12 +8561,6 @@ paths: body: type: object description: Operation arguments (varies with specified `action`). - example: > - {'requests':[{'action':'addObject','indexName':'contacts','body':{'name':'Betty - Jane McCamey','company':'Vita Foods - Inc.','email':'betty@mccamey.com'}},{'action':'addObject','indexName':'public_contacts','body':{'name':'Gayla - Geimer','company': "Ortman McCain - Co','email':'gayla@geimer.com'}}]} indexName: type: string description: Index to target for this operation. @@ -7236,6 +8571,23 @@ paths: - indexName required: - requests + examples: + batch: + summary: Batch indexing request to two indices. + value: + requests: + - action: addObject + indexName: contacts + body: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + - action: addObject + indexName: public_contacts + body: + name: Gayla Geimer + company: Ortman McCain Co. + email: gayla@geimer.com responses: '200': description: OK @@ -7248,7 +8600,7 @@ paths: properties: taskID: type: object - description: TaskIDs per index. + description: Task IDs. One for each index. additionalProperties: $ref: '#/components/schemas/taskID' objectIDs: @@ -7529,11 +8881,11 @@ paths: x-cacheable: true x-acl: - search - summary: Get multiple records. - description: > - Retrieve one or more records, potentially from different indices, in a - single API operation. Results will be received in the same order as the - requests. + summary: Retrieve records. + description: | + Retrieves one or more records, potentially from different indices. + + Records are returned in the same order as the requests. requestBody: required: true description: Request object. @@ -7548,7 +8900,7 @@ paths: requests: type: array items: - description: Record retrieval operation. + description: Request body for retrieving records. title: getObjectsRequest type: object additionalProperties: false @@ -7560,20 +8912,22 @@ paths: type: array items: type: string - description: >- - Attributes to retrieve. If not specified, all - retrievable attributes are returned. + description: > + Attributes to retrieve. + + If not specified, all retrievable attributes are + returned. example: - author - title - content objectID: type: string - description: Record's objectID. - example: 8b9b7619230b1950f653b962fb0dfd6b + description: Object ID for the record to retrieve. + example: product-1 indexName: type: string - description: Name of the index containing the required records. + description: Index from which to retrieve the records. example: books required: - requests @@ -7589,10 +8943,10 @@ paths: properties: results: type: array - description: Retrieved results. + description: Retrieved records. items: type: object - description: Fetched object. + description: Retrieved record. x-is-generic: true required: - results @@ -7873,10 +9227,8 @@ paths: operationId: getSettings x-acl: - search - description: >- - Return an object containing an index's [configuration - settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - summary: Get index settings. + description: Retrieves an object with non-null index settings. + summary: Retrieve index settings. parameters: - $ref: '#/components/parameters/IndexName' responses: @@ -8068,10 +9420,17 @@ paths: operationId: setSettings x-acl: - editSettings - description: >- - Update the specified [index - settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - Specifying null for a setting resets it to its default value. + description: > + Update the specified index settings. + + + Index settings that you don't specify are left unchanged. + + Specify `null` to reset a setting to its default value. + + + For best performance, update the index settings before you add new + records to your index. summary: Update index settings. parameters: - $ref: '#/components/parameters/IndexName' @@ -8299,11 +9658,11 @@ paths: operationId: getSynonym x-acl: - settings - summary: Get a synonym object. - description: >- - Get a syonym by its `objectID`. To find the object IDs for your - synonyms, use the [`search` - operation](#tag/Synonyms/operation/searchSynonyms). + summary: Retrieve a synonym. + description: | + Retrieves a syonym by its ID. + To find the object IDs for your synonyms, + use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/parameters_ObjectID' @@ -8499,16 +9858,12 @@ paths: operationId: saveSynonym x-acl: - editSettings - summary: Save a synonym. + summary: Create or replace a synonym. description: > - Add a - [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - to an index or replace it. - - If the synonym `objectID` doesn't exist, Algolia adds a new one. + If a synonym with the specified object ID doesn't exist, Algolia adds a + new one. - If you use an existing synonym `objectID`, the existing synonym is - replaced with the new one. + Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). @@ -8809,9 +10164,10 @@ paths: x-acl: - editSettings summary: Delete a synonym. - description: >- - Delete a synonym by its `objectID`. To find the object IDs of your - synonyms, use the [`search` + description: > + Deletes a synonym by its ID. + + To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). parameters: - $ref: '#/components/parameters/IndexName' @@ -9006,8 +10362,10 @@ paths: operationId: saveSynonyms x-acl: - editSettings - summary: Save a batch of synonyms. - description: Create or update multiple synonyms. + summary: Create or replace synonyms. + description: | + If a synonym with the `objectID` doesn't exist, Algolia adds a new one. + Otherwise, existing synonyms are replaced. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ForwardToReplicas' @@ -9387,7 +10745,7 @@ paths: x-acl: - editSettings summary: Delete all synonyms. - description: Delete all synonyms in the index. + description: Deletes all synonyms from the index. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ForwardToReplicas' @@ -9580,9 +10938,7 @@ paths: x-acl: - settings summary: Search for synonyms. - description: >- - Search for synonyms in your index. You can control and filter the search - with parameters. To get all synonyms, send an empty request body. + description: Searches for synonyms in your index. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -9802,7 +11158,7 @@ paths: - admin summary: List API keys. description: >- - List all API keys associated with your Algolia application, including + Lists all API keys associated with your Algolia application, including their permissions and restrictions. responses: '200': @@ -9985,11 +11341,8 @@ paths: operationId: addApiKey x-acl: - admin - summary: Add API key. - description: | - Add a new API key with specific permissions and restrictions. - The request must be authenticated with the admin API key. - The response returns an API key string. + summary: Create an API key. + description: Creates a new API key with specific permissions and restrictions. requestBody: required: true content: @@ -10258,13 +11611,16 @@ paths: tags: - Api Keys operationId: getApiKey - summary: Get API key permissions. + summary: Retrieve API key permissions. description: > - Get the permissions and restrictions of a specific API key. + Gets the permissions and restrictions of an API key. + When authenticating with the admin API key, you can request information - for any of your application's keys. When authenticating with other API - keys, you can only retrieve information for that key. + for any of your application's keys. + + When authenticating with other API keys, you can only retrieve + information for that key. parameters: - $ref: '#/components/parameters/KeyString' responses: @@ -10452,9 +11808,9 @@ paths: - admin summary: Update an API key. description: | - Replace the permissions of an existing API key. - Any unspecified parameter resets that permission to its default value. - The request must be authenticated with the admin API key. + Replaces the permissions of an existing API key. + + Any unspecified attribute resets that attribute to its default value. parameters: - $ref: '#/components/parameters/KeyString' requestBody: @@ -10738,10 +12094,8 @@ paths: operationId: deleteApiKey x-acl: - admin - summary: Delete API key. - description: | - Delete an existing API key. - The request must be authenticated with the admin API key. + summary: Delete an API key. + description: Deletes the API key. parameters: - $ref: '#/components/parameters/KeyString' responses: @@ -10935,10 +12289,18 @@ paths: operationId: restoreApiKey x-acl: - admin - summary: Restore API key. - description: | - Restore a deleted API key, along with its associated permissions. - The request must be authenticated with the admin API key. + summary: Restore an API key. + description: > + Restores a deleted API key. + + + Restoring resets the `validity` attribute to `0`. + + + Algolia stores up to 1,000 API keys per application. + + If you create more, the oldest API keys are deleted and can't be + restored. parameters: - $ref: '#/components/parameters/KeyString' responses: @@ -11125,10 +12487,12 @@ paths: operationId: getRule x-acl: - settings - summary: Get a rule. - description: >- - Get a rule by its `objectID`. To find the `objectID` for rules, use the - [`search` operation](#tag/Rules/operation/searchRules). + summary: Retrieve a rule. + description: > + Retrieves a rule by its ID. + + To find the object ID of rules, use the [`search` + operation](#tag/Rules/operation/searchRules). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectIDRule' @@ -11324,8 +12688,13 @@ paths: operationId: saveRule x-acl: - editSettings - summary: Create or update a rule. - description: >- + summary: Create or replace a rule. + description: > + If a rule with the specified object ID doesn't exist, it's created. + + Otherwise, the existing rule is replaced. + + To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). parameters: @@ -11615,9 +12984,10 @@ paths: x-acl: - editSettings summary: Delete a rule. - description: >- - Delete a rule by its `objectID`. To find the `objectID` for rules, use - the [`search` operation](#tag/Rules/operation/searchRules). + description: | + Deletes a rule by its ID. + To find the object ID for rules, + use the [`search` operation](#tag/Rules/operation/searchRules). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectIDRule' @@ -11811,8 +13181,15 @@ paths: operationId: saveRules x-acl: - editSettings - summary: Save a batch of rules. - description: Create or update multiple rules. + summary: Create or update rules. + description: > + Create or update multiple rules. + + + If a rule with the specified object ID doesn't exist, Algolia creates a + new one. + + Otherwise, existing rules are replaced. x-codegen-request-body-name: rules parameters: - $ref: '#/components/parameters/IndexName' @@ -11824,7 +13201,7 @@ paths: application/json: schema: type: array - description: Rules to add. + description: Rules to add or replace. items: $ref: '#/components/schemas/rule' responses: @@ -12190,7 +13567,7 @@ paths: x-acl: - editSettings summary: Delete all rules. - description: Delete all rules in the index. + description: Deletes all rules from the index. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ForwardToReplicas' @@ -12383,9 +13760,7 @@ paths: x-acl: - settings summary: Search for rules. - description: >- - Search for rules in your index. You can control the search with - parameters. To list all rules, send an empty request body. + description: Searches for rules in your index. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -12403,9 +13778,7 @@ paths: $ref: '#/components/schemas/anchoring' context: type: string - description: >- - Restricts responses to the specified [contextual - rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + description: Only return rules that match the context (exact match). example: mobile page: $ref: '#/components/schemas/parameters_page' @@ -12415,17 +13788,10 @@ paths: type: boolean nullable: true default: null - description: >- - Restricts responses to enabled rules. When not specified - (default), _all_ rules are retrieved. - requestOptions: - type: array - description: Request options to send with the API call. - example: | - {timeouts:{read:20}} - items: - type: object - description: Request option. + description: | + If `true`, return only enabled rules. + If `false`, return only inactive rules. + By default, _all_ rules are returned. responses: '200': description: OK @@ -12443,12 +13809,12 @@ paths: properties: hits: type: array - description: Fetched rules. + description: Rules that matched the search criteria. items: $ref: '#/components/schemas/rule' nbHits: type: integer - description: Number of fetched rules. + description: Number of rules that matched the search criteria. page: type: integer description: Current page. @@ -12667,8 +14033,10 @@ paths: operationId: batchDictionaryEntries x-acl: - editSettings - description: Add or remove a batch of dictionary entries. - summary: Batch dictionary entries. + description: >- + Adds or deletes multiple entries from your plurals, segmentation, or + stop word dictionaries. + summary: Add or delete dictionary entries. parameters: - $ref: '#/components/parameters/DictionaryName' requestBody: @@ -12677,8 +14045,7 @@ paths: application/json: schema: title: batchDictionaryEntriesParams - description: | - `batchDictionaryEntries` parameters. + description: Request body for updating dictionary entries. type: object required: - requests @@ -12688,11 +14055,11 @@ paths: type: boolean default: false description: >- - Incidates whether to replace all custom entries in the - dictionary with the ones sent with this request. + Whether to replace all custom entries in the dictionary with + the ones sent with this request. requests: type: array - description: Operations to batch. + description: List of additions and deletions to your dictionaries. items: title: batchDictionaryEntriesRequest type: object @@ -13059,15 +14426,7 @@ paths: x-cacheable: true x-acl: - settings - description: >- - Search for standard and - [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - entries in the [stop - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - or [segmentation - (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - dictionaries. + description: Searches for standard and custom dictionary entries. summary: Search dictionary entries. parameters: - $ref: '#/components/parameters/DictionaryName' @@ -13077,8 +14436,7 @@ paths: application/json: schema: title: searchDictionaryEntriesParams - description: | - `searchDictionaryEntries` parameters. + description: Search parameter. type: object required: - query @@ -13094,7 +14452,11 @@ paths: $ref: '#/components/schemas/language' responses: '200': - $ref: '#/components/responses/UpdatedAt' + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/searchDictionaryEntriesResponse' '400': $ref: '#/components/responses/BadRequest' '402': @@ -13115,8 +14477,8 @@ paths: // Call the API var response = await client.SearchDictionaryEntriesAsync( - Enum.Parse("Compounds"), - new SearchDictionaryEntriesParams { Query = "foo", } + Enum.Parse("Stopwords"), + new SearchDictionaryEntriesParams { Query = "about", } ); - lang: Dart source: > @@ -13129,9 +14491,9 @@ paths: // Call the API final response = await client.searchDictionaryEntries( - dictionaryName: DictionaryType.fromJson("compounds"), + dictionaryName: DictionaryType.fromJson("stopwords"), searchDictionaryEntriesParams: SearchDictionaryEntriesParams( - query: "foo", + query: "about", ), ); - lang: Go @@ -13150,8 +14512,8 @@ paths: resp, err := client.SearchDictionaryEntries(client.NewApiSearchDictionaryEntriesRequest( - search.DictionaryType("compounds"), - search.NewEmptySearchDictionaryEntriesParams().SetQuery("foo"), + search.DictionaryType("stopwords"), + search.NewEmptySearchDictionaryEntriesParams().SetQuery("about"), )) if err != nil { @@ -13173,8 +14535,8 @@ paths: // Call the API - client.searchDictionaryEntries(DictionaryType.fromValue("compounds"), - new SearchDictionaryEntriesParams().setQuery("foo")); + client.searchDictionaryEntries(DictionaryType.fromValue("stopwords"), + new SearchDictionaryEntriesParams().setQuery("about")); - lang: JavaScript source: | // Initialize the client @@ -13182,8 +14544,8 @@ paths: // Call the API const response = await client.searchDictionaryEntries({ - dictionaryName: 'compounds', - searchDictionaryEntriesParams: { query: 'foo' }, + dictionaryName: 'stopwords', + searchDictionaryEntriesParams: { query: 'about' }, }); // use typed response @@ -13199,9 +14561,9 @@ paths: // Call the API var response = client.searchDictionaryEntries( - dictionaryName = DictionaryType.entries.first { it.value == "compounds" }, + dictionaryName = DictionaryType.entries.first { it.value == "stopwords" }, searchDictionaryEntriesParams = SearchDictionaryEntriesParams( - query = "foo", + query = "about", ), ) @@ -13221,8 +14583,8 @@ paths: // Call the API $response = $client->searchDictionaryEntries( - 'compounds', - ['query' => 'foo', + 'stopwords', + ['query' => 'about', ], ); @@ -13237,9 +14599,9 @@ paths: # Call the API resp = await _client.search_dictionary_entries( - dictionary_name="compounds", + dictionary_name="stopwords", search_dictionary_entries_params={ - "query": "foo", + "query": "about", }, ) @@ -13255,8 +14617,8 @@ paths: # Call the API resp = client.search_dictionary_entries( - 'compounds', - SearchDictionaryEntriesParams.new(query: "foo") + 'stopwords', + SearchDictionaryEntriesParams.new(query: "about") ) # use the class directly @@ -13275,9 +14637,9 @@ paths: // Call the API val res = client.searchDictionaryEntries( - dictionaryName = DictionaryType.withName("compounds"), + dictionaryName = DictionaryType.withName("stopwords"), searchDictionaryEntriesParams = SearchDictionaryEntriesParams( - query = "foo" + query = "about" ) ) @@ -13296,9 +14658,9 @@ paths: // Call the API _ = try await client.searchDictionaryEntries( - dictionaryName: DictionaryType.compounds, + dictionaryName: DictionaryType.stopwords, searchDictionaryEntriesParams: SearchDictionaryEntriesParams( - query: "foo" + query: "about" ) ) /1/dictionaries/*/settings: @@ -13308,10 +14670,10 @@ paths: operationId: getDictionarySettings x-acl: - settings + summary: Retrieve dictionary settings. description: >- - Get the languages for which [stop words are turned - off](#tag/Dictionaries/operation/setDictionarySettings). - summary: Get stop word settings. + Retrieves the languages for which standard dictionary entries are turned + off. responses: '200': description: OK @@ -13490,8 +14852,10 @@ paths: operationId: setDictionarySettings x-acl: - editSettings - description: Set stop word settings for a specific language. - summary: Set stop word settings. + description: >- + Turns standard stop word dictionary entries on or off for a given + language. + summary: Update dictionary settings. requestBody: required: true content: @@ -13500,9 +14864,9 @@ paths: title: dictionarySettingsParams type: object additionalProperties: false - description: >- - Enable or turn off the built-in Algolia stop words for a - specific language. + description: > + Turn on or off the built-in Algolia stop words for a specific + language. required: - disableStandardEntries properties: @@ -13762,16 +15126,14 @@ paths: operationId: getDictionaryLanguages x-acl: - settings - description: >- - Lists Algolia's [supported - languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - and any customizations applied to each language's [stop - word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - and [segmentation - (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - features. + description: > + Lists supported languages with their supported dictionary types and + number of custom entries. summary: List available languages. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/ + description: Supported languages. responses: '200': description: OK @@ -13781,6 +15143,7 @@ paths: title: getDictionaryLanguagesResponse type: object additionalProperties: + x-additionalPropertiesName: language $ref: '#/components/schemas/languages' '400': $ref: '#/components/responses/BadRequest' @@ -13949,7 +15312,8 @@ paths: - admin summary: Assign or move a user ID. description: > - Assign or move a user ID to a cluster. + Assigns or moves a user ID to a cluster. + The time it takes to move a user is proportional to the amount of data linked to the user ID. @@ -14181,12 +15545,15 @@ paths: operationId: listUserIds x-acl: - admin - summary: List userIDs. + summary: List user IDs. description: > - List the userIDs assigned to a multi-cluster application. + Lists the userIDs assigned to a multi-cluster application. + - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + Since it can take a few seconds to get the data from the different + clusters, + + the response isn't real-time. parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/HitsPerPage' @@ -14372,10 +15739,11 @@ paths: operationId: batchAssignUserIds x-acl: - admin - summary: Batch assign userIDs. + summary: Assign multiple userIDs. description: | - Assign multiple user IDs to a cluster. - **You can't _move_ users with this operation.**. + Assigns multiple user IDs to a cluster. + + **You can't move users with this operation**. parameters: - $ref: '#/components/parameters/UserIDInHeader' requestBody: @@ -14646,13 +16014,16 @@ paths: operationId: getTopUserIds x-acl: - admin - summary: Get top userID. + summary: Get top user IDs. description: > Get the IDs of the 10 users with the highest number of records per cluster. - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + + Since it can take a few seconds to get the data from the different + clusters, + + the response isn't real-time. responses: '200': description: OK @@ -14672,6 +16043,7 @@ paths: items: type: object additionalProperties: + x-additionalPropertiesName: cluster type: array items: $ref: '#/components/schemas/userId' @@ -14842,12 +16214,15 @@ paths: operationId: getUserId x-acl: - admin - summary: Get userID. + summary: Retrieve user ID. description: > - Returns the userID data stored in the mapping. + Returns the user ID data stored in the mapping. + + + Since it can take a few seconds to get the data from the different + clusters, - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + the response isn't real-time. parameters: - $ref: '#/components/parameters/UserIDInPath' responses: @@ -15033,8 +16408,8 @@ paths: operationId: removeUserId x-acl: - admin - summary: Remove userID. - description: Remove a userID and its associated data from the multi-clusters. + summary: Delete user ID. + description: Deletes a user ID and its associated data from the clusters. parameters: - $ref: '#/components/parameters/UserIDInPath' responses: @@ -15229,7 +16604,7 @@ paths: x-acl: - admin summary: List clusters. - description: List the available clusters in a multi-cluster setup. + description: Lists the available clusters in a multi-cluster setup. responses: '200': description: OK @@ -15417,10 +16792,13 @@ paths: x-cacheable: true x-acl: - admin - summary: Search for a user ID. + summary: Search for user IDs. description: > - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + Since it can take a few seconds to get the data from the different + clusters, + + the response isn't real-time. + To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as @@ -15748,8 +17126,8 @@ paths: - in: query name: getClusters description: >- - Indicates whether to include the cluster's pending mapping state in - the response. + Whether to include the cluster's pending mapping state in the + response. schema: type: boolean responses: @@ -15764,8 +17142,8 @@ paths: properties: pending: description: >- - Indicates whether there are clusters undergoing migration, - creation, or deletion. + Whether there are clusters undergoing migration, creation, + or deletion. type: boolean clusters: description: > @@ -15951,8 +17329,8 @@ paths: operationId: getSources x-acl: - admin - description: Get all allowed sources (IP addresses). - summary: Get all allowed IP addresses. + summary: List allowed sources. + description: Retrieves all allowed IP addresses with access to your application. responses: '200': description: OK @@ -16124,8 +17502,8 @@ paths: operationId: replaceSources x-acl: - admin - description: Replace all allowed sources. - summary: Replace all sources. + summary: Replace allowed sources. + description: Replaces the list of allowed sources. requestBody: required: true description: Allowed sources. @@ -16375,7 +17753,7 @@ paths: operationId: appendSource x-acl: - admin - description: Add a source to the list of allowed sources. + description: Adds a source to the list of allowed sources. summary: Add a source. requestBody: required: true @@ -16593,8 +17971,8 @@ paths: operationId: deleteSource x-acl: - admin - description: Remove a source from the list of allowed sources. - summary: Remove a source. + description: Deletes a source from the list of allowed sources. + summary: Delete a source. parameters: - name: source in: path @@ -16798,23 +18176,21 @@ paths: The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. There's also a logging limit of - 1,000 API calls per server. - This request counts towards your [operations + - Logs are held for the last seven days. + + - Up to 1,000 API requests per server are logged. + + - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. - - > **Note**: To fetch the logs for a Distributed Search Network (DSN) - cluster, target the [DSN's - endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - summary: Return the latest log entries. + summary: Retrieve log entries. parameters: - name: offset in: query description: >- - First log entry to retrieve. Sorted by decreasing date with 0 being - the most recent. + First log entry to retrieve. The most recent entries are listed + first. schema: type: integer default: 0 @@ -16827,18 +18203,18 @@ paths: maximum: 1000 - name: indexName in: query - description: >- - Index for which log entries should be retrieved. When omitted, log - entries are retrieved for all indices. + description: | + Index for which to retrieve log entries. + By default, log entries are retrieved for all indices. example: products schema: type: string nullable: true - name: type in: query - description: >- - Type of log entries to retrieve. When omitted, all log entries are - retrieved. + description: | + Type of log entries to retrieve. + By default, all log entries are retrieved. schema: $ref: '#/components/schemas/logType' responses: @@ -16861,29 +18237,29 @@ paths: properties: timestamp: type: string - description: >- - Timestamp in [ISO - 8601](https://wikipedia.org/wiki/ISO_8601) format. + description: Timestamp of the API request in ISO 8601 format. example: '2023-03-08T12:34:56Z' method: type: string - description: HTTP method of the performed request. + description: HTTP method of the request. example: GET answer_code: type: string - description: HTTP response code. + description: HTTP status code of the response. example: '200' query_body: type: string - description: Request body. Truncated after 1,000 characters. + maxLength: 1000 + description: Request body. example: >- - \n{\n \"requests\": [\n {\n \"indexName\": + {\n \"requests\": [\n {\n \"indexName\": \"best_buy\",\n \"params\": \"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\"\n }\n ]\n}\n answer: type: string - description: Answer body. Truncated after 1,000 characters. + maxLength: 1000 + description: Response body. example: > 'n{\n \"results\": [\n {\n \"hits\": [\n {\n \"name\": \"Amazon - Fire TV Stick\",\n @@ -16908,21 +18284,22 @@ paths: \"9999119\"\n' url: type: string - description: Request URL. + format: uri + description: URL of the API endpoint. example: /1/indexes ip: type: string + format: ipv4 description: IP address of the client that performed the request. - example: 127.0.0.1 + example: 93.184.216.34 query_headers: type: string - description: Request headers (API key is obfuscated). + description: Request headers (API keys are obfuscated). example: >- User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5\nHost: - localhost.algolia.com:8080\nAccept: - */*\nContent-Type: application/json; - charset=utf-8\nX-Algolia-API-Key: + example.com\nAccept: */*\nContent-Type: + application/json; charset=utf-8\nX-Algolia-API-Key: 20f***************************\nX-Algolia-Application-Id: MyApplicationID\n sha1: @@ -16931,29 +18308,31 @@ paths: example: 26c53bd7e38ca71f4741b71994cd94a600b7ac68 nb_api_calls: type: string - description: Number of API calls. + description: Number of API requests. example: '1' processing_time_ms: type: string - description: >- - Processing time for the query. Doesn't include - network time. + description: | + Processing time for the query in milliseconds. + This doesn't include latency due to the network. example: '2' index: type: string description: Index targeted by the query. - example: best_buy + example: products query_params: type: string description: Query parameters sent with the request. example: query=georgia&attributesToRetrieve=name,city,country query_nb_hits: type: string - description: Number of hits returned for the query. + description: >- + Number of search results (hits) returned for the + query. example: '1' inner_queries: type: array - description: Performed queries for the given request. + description: Queries performed for the given request. items: type: object title: logQuery @@ -16961,15 +18340,15 @@ paths: index_name: type: string description: Index targeted by the query. - example: best_buy + example: products user_token: type: string - description: User identifier. + description: A user identifier. example: 93.189.166.128 query_id: type: string description: Unique query identifier. - example: '313453231' + example: 96f59a3145dd9bd8963dc223950507c8 required: - timestamp - method @@ -17147,10 +18526,21 @@ paths: operationId: getTask x-acl: - addObject - description: >- - Some operations, such as copying an index, will respond with a `taskID` - value. Use this value here to check the status of that task. - summary: Check a task's status. + description: > + Checks the status of a given task. + + + Indexing tasks are asynchronous. + + When you add, update, or delete records or indices, + + a task is created on a queue and completed depending on the load on the + server. + + + The indexing tasks' responses include a task ID that you can use to + check the status. + summary: Check task status. parameters: - $ref: '#/components/parameters/IndexName' - name: taskID @@ -17361,32 +18751,51 @@ paths: operationId: operationIndex x-acl: - addObject - summary: Copy, move, or rename an index. - description: >- - This `operation`, _copy_ or _move_, will copy or move a source index's - (`IndexName`) records, settings, synonyms, and rules to a `destination` - index. + summary: Copy or move an index. + description: > + Copies or moves (renames) an index within the same Algolia application. - If the destination index exists, it will be replaced, except for + + - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist, it will be created. + - If the destination index doesn't exist yet, it'll be created. + + + **Copy** + + + - Copying a source index that doesn't exist creates a new index with 0 + records and default settings. + + - The API keys of the source index are merged with the existing keys in + the destination index. + - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - The choice between moving or copying an index depends on your needs. - Choose: + - You can't copy to a destination index that already has replicas. + - Be aware of the [size + limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - - **Move** to rename an index. + - Related guide: [Copy + indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) - - **Copy** to create a new index with the same records and configuration - as an existing one. + **Move** - > **Note**: When considering copying or moving, be aware of the [rate - limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - on these processes and the [impact on your analytics - data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + + - Moving a source index that doesn't exist is ignored without returning + an error. + + - When moving an index, the analytics data keep their original name and + a new set of analytics data is started for the new name. + To access the original analytics in the dashboard, create an index with the original name. + - If the destination index has replicas, moving will overwrite the + existing index and copy the data to the replica indices. + + - Related guide: [Move + indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -17406,16 +18815,15 @@ paths: type: array items: $ref: '#/components/schemas/scopeType' - description: >- - **This only applies to the _copy_ operation.** + description: > + **Only for copying.** - If you omit `scope`, the copy command copies all records, - settings, synonyms, and rules. + If you specify a scope, only the selected scopes are copied. + Records and the other scopes are left unchanged. - - If you specify `scope`, only the specified scopes are - copied. + If you omit the `scope` parameter, everything is copied: + records, settings, synonyms, and rules. required: - operation - destination @@ -17680,7 +19088,12 @@ paths: x-acl: - listIndexes summary: List indices. - description: List indices in an Algolia application. + description: > + Lists all indices in the current Algolia application. + + + The request follows any index restrictions of the API key you use to + make the request. parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/HitsPerPage' diff --git a/specs/bundled/search.yml b/specs/bundled/search.yml index 09ae630251..73d4879a66 100644 --- a/specs/bundled/search.yml +++ b/specs/bundled/search.yml @@ -1,19 +1,148 @@ openapi: 3.0.2 info: title: Search API - description: >- - Use the Search REST API to manage your data (indices and records), - implement search, and improve relevance (with Rules, synonyms, and language - dictionaries). + description: > + The Algolia Search API lets you search, configure, and mange your indices + and records. - Although Algolia provides a REST API, you should use the official open - source API [clients, libraries, and - tools](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) - instead. + # Client libraries - There's no [SLA](https://www.algolia.com/policies/sla/) if you use the REST - API directly. + + Use Algolia's API clients and libraries to reliably integrate Algolia's APIs + with your apps. + + The official API clients are covered by Algolia's [Service Level + Agreement](https://www.algolia.com/policies/sla/). + + + See: [Algolia's + ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) + + + # Base URLs + + + The base URLs for making requests to the Search API are: + + + - `https://{APPLICATION_ID}.algolia.net` + + - `https://{APPLICATION_ID}-dsn.algolia.net`. + If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra), + this ensures that requests are sent to servers closest to users. + + Both URLs provide high availability by distributing requests with load + balancing. + + + **All requests must use HTTPS.** + + + # Retry strategy + + + To guarantee a high availability, implement a retry strategy for all API + requests using the URLs of your servers as fallbacks: + + + - `https://{APPLICATION_ID}-1.algolianet.com` + + - `https://{APPLICATION_ID}-2.algolianet.com` + + - `https://{APPLICATION_ID}-3.algolianet.com` + + + These URLs use a different DNS provider than the primary URLs. + + You should randomize this list to ensure an even load across the three + servers. + + + All Algolia API clients implement this retry strategy. + + + # Authentication + + + To authenticate your API requests, add these headers: + + +
+ +
x-algolia-application-id
+ +
Your Algolia application ID.
+ +
x-algolia-api-key
+ +
+ + An API key with the necessary permissions to make the request. + + The required access control list (ACL) to make a request is listed in each + endpoint's reference. + +
+ +
+ + + You can find your application ID and API key in the [Algolia + dashboard](https://dashboard.algolia.com/account). + + + # Request format + + + Depending on the endpoint, request bodies are either JSON objects or arrays + of JSON objects, + + + # Parameters + + + Parameters are passed as query parameters for GET and DELETE requests, + + and in the request body for POST and PUT requests. + + + Query parameters must be + [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). + + Non-ASCII characters must be UTF-8 encoded. + + Plus characters (`+`) are interpreted as spaces. + + Arrays as query parameters must be one of: + + + - A comma-separated string: `attributesToRetrieve=title,description` + + - A URL-encoded JSON array: + `attributesToRetrieve=%5B%22title%22,%22description%22%D` + + + # Response status and errors + + + The Search API returns JSON responses. + + Since JSON doesn't guarantee any specific ordering, don't rely on the order + of attributes in the API response. + + + Successful responses return a `2xx` status. Client errors return a `4xx` + status. Server errors are indicated by a `5xx` status. + + Error responses have a `message` property with more information. + + + # Version + + + The current version of the Search API is version 1, as indicated by the + `/1/` in each endpoint's URL. version: 1.0.0 components: securitySchemes: @@ -44,15 +173,15 @@ components: IndexName: name: indexName in: path - description: Index on which to perform the request. + description: Name of the index on which to perform the operation. required: true schema: type: string - example: myIndexName + example: YourIndexName ObjectID: name: objectID in: path - description: Unique record (object) identifier. + description: Unique record identifier. required: true schema: type: string @@ -60,9 +189,7 @@ components: ForwardToReplicas: in: query name: forwardToReplicas - description: >- - Indicates whether changed index settings are forwarded to the replica - indices. + description: Whether changes are applied to replica indices. schema: type: boolean parameters_ObjectID: @@ -79,8 +206,8 @@ components: schema: type: boolean description: >- - Indicates whether to replace all synonyms in the index with the ones - sent with this request. + Whether to replace all synonyms in the index with the ones sent with + this request. KeyString: in: path name: key @@ -93,34 +220,29 @@ components: in: path name: objectID description: Unique identifier of a rule object. - example: a-rule-id required: true schema: - type: string + $ref: '#/components/schemas/ruleID' ClearExistingRules: in: query name: clearExistingRules required: false schema: type: boolean - description: >- - Indicates whether existing rules should be deleted before adding this - batch. + description: Whether existing rules should be deleted before adding this batch. DictionaryName: in: path name: dictionaryName - description: Dictionary to search in. + description: Dictionary type in which to search. required: true schema: $ref: '#/components/schemas/dictionaryType' Page: in: query name: page - description: > - Returns the requested page number. The page size is determined by the - `hitsPerPage` parameter. You can see the number of available pages in - the `nbPages` response attribute. When `page` is null, the API response - is not paginated. + description: | + Requested page of the API response. + If `null`, the API response is not paginated. schema: type: integer minimum: 0 @@ -129,13 +251,13 @@ components: HitsPerPage: in: query name: hitsPerPage - description: Maximum number of hits per page. + description: Number of hits per page. schema: type: integer default: 100 UserIDInHeader: name: X-Algolia-User-ID - description: userID to assign. + description: User ID to assign. in: header required: true schema: @@ -143,7 +265,7 @@ components: pattern: ^[a-zA-Z0-9 \-*.]+$ UserIDInPath: name: userID - description: userID to assign. + description: User ID to assign. in: path required: true schema: @@ -165,6 +287,7 @@ components: default: '' searchParamsString: type: object + title: Search parameters as query string additionalProperties: false x-discriminator-fields: - params @@ -173,7 +296,7 @@ components: $ref: '#/components/schemas/paramsAsString' query: type: string - description: Text to search for in an index. + description: Search query. default: '' x-categories: - Search @@ -186,13 +309,53 @@ components: filters: type: string description: > - [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) - the query with numeric, facet, or tag filters. + Filter the search so that only records with matching values are included + in the results. + + + These filters are supported: + + + - **Numeric filters.** ` `, where `` is one of + `<`, `<=`, `=`, `!=`, `>`, `>=`. + + - **Ranges.** `: TO ` where `` and `` + are the lower and upper limits of the range (inclusive). + + - **Facet filters.** `:` where `` is a facet + attribute (case-sensitive) and `` a facet value. + + - **Tag filters.** `_tags:` or just `` (case-sensitive). + + - **Boolean filters.** `: true | false`. + + + You can combine filters with `AND`, `OR`, and `NOT` operators with the + following restrictions: + + + - You can only combine filters of the same type with `OR`. + **Not supported:** `facet:value OR num > 3`. + - You can't use `NOT` with combinations of filters. + **Not supported:** `NOT(facet:value OR facet:value)` + - You can't combine conjunctions (`AND`) with `OR`. + **Not supported:** `facet:value OR (facet:value AND facet:value)` + + Use quotes around your filters, if the facet attribute name or facet + value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. + + If a facet attribute is an array, the filter matches if it matches at + least one element of the array. + + + For more information, see + [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). example: (category:Book OR category:Ebook) AND _tags:published default: '' x-categories: - Filtering searchFiltersArrayString: + title: search filter array type: array items: type: string @@ -202,14 +365,35 @@ components: - type: string listOfSearchFilters: type: array + title: search filters items: $ref: '#/components/schemas/mixedSearchFilters' facetFilters: description: > - [Filter hits by facet - value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). + Filter the search by facet values, so that only records with the same + facet values are retrieved. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. + + - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 + AND filter3`. + + - `facet:-value` is interpreted as `NOT facet:value`. + + + While it's best to avoid attributes that start with a `-`, you can still + filter them by escaping with a backslash: + + `facet:\-value`. example: - - category:Book + - + - category:Book + - category:-Movie - author:John Doe oneOf: - $ref: '#/components/schemas/listOfSearchFilters' @@ -218,13 +402,24 @@ components: - Filtering optionalFilters: description: > - Create filters to boost or demote records. + Filters to promote or demote records in the search results. + + + Optional filters work like facet filters, but they don't exclude records + from the search results. + + Records that match the optional filter rank before records that don't + match. + + If you're using a negative filter `facet:-value`, matching records rank + after records that don't match. + + + - Optional filters don't work on virtual replicas. + - Optional filters are applied _after_ sort-by attributes. - Records that match the filter are ranked higher for positive and lower - for negative optional filters. In contrast to regular filters, records - that don't match the optional filter are still included in the results, - only their ranking is affected. + - Optional filters don't work with numeric attributes. example: - category:Book - author:John Doe @@ -235,8 +430,20 @@ components: - Filtering numericFilters: description: > - [Filter on numeric - attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). + Filter by numeric facets. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, + `>=`. Comparsions are precise up to 3 decimals. + + You can also provide ranges: `facet: TO `. The range + includes the lower and upper boundaries. + + The same combination rules apply as for `facetFilters`. example: - - inStock = 1 @@ -249,8 +456,19 @@ components: - Filtering tagFilters: description: > - [Filter hits by - tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). + Filter the search by values of the special `_tags` attribute. + + + **Prefer using the `filters` parameter, which supports all filter types + and combinations with boolean operators.** + + + Different from regular facets, `_tags` can only be used for filtering + (including or excluding records). + + You won't get a facet count. + + The same combination and escaping rules apply as for `facetFilters`. example: - - Book @@ -263,64 +481,104 @@ components: - Filtering page: type: integer - description: Page to retrieve (the first page is `0`, not `1`). + description: Page of search results to retrieve. default: 0 + minimum: 0 x-categories: - Pagination aroundLatLng: type: string - description: >- - Search for entries [around a central - location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - enabling a geographical search within a circular area. + description: > + Coordinates for the center of a circle, expressed as a comma-separated + string of latitude and longitude. + + + Only records included within circle around this central location are + included in the results. + + The radius of the circle is determined by the `aroundRadius` and + `minimumAroundRadius` settings. + + This parameter is ignored if you also specify `insidePolygon` or + `insideBoundingBox`. example: 40.71,-74.01 default: '' x-categories: - Geo-Search aroundLatLngViaIP: type: boolean - description: >- - Search for entries around a location. The location is automatically - computed from the requester's IP address. + description: Whether to obtain the coordinates from the request's IP address. default: false x-categories: - Geo-Search aroundRadiusAll: + title: all type: string + description: >- + Return all records with a valid `_geoloc` attribute. Don't filter by + distance. enum: - all aroundRadius: description: > - [Maximum - radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - for a geographical search (in meters). + Maximum radius for a search around a central location. + + + This parameter works in combination with the `aroundLatLng` and + `aroundLatLngViaIP` parameters. + + By default, the search radius is determined automatically from the + density of hits around the central location. + + The search radius is small if there are many hits close to the central + coordinates. oneOf: - type: integer minimum: 1 + description: Maximum search radius around a central location in meters. - $ref: '#/components/schemas/aroundRadiusAll' x-categories: - Geo-Search aroundPrecisionFromValue: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + title: range objects type: array items: type: object + description: >- + Range object with lower and upper values in meters to define custom + ranges. properties: from: type: integer + description: >- + Lower boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. + example: 20 value: type: integer + description: >- + Upper boundary of a range in meters. The Geo ranking criterion + considers all records within the range to be equal. aroundPrecision: - description: >- - Precision of a geographical search (in meters), to [group results that - are more or less the same distance from a central - point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). + description: > + Precision of a coordinate-based search in meters to group results with + similar distances. + + + The Geo ranking criterion considers all matches within the same range of + distances to be equal. oneOf: - type: integer default: 10 + description: > + Distance in meters to group results by similar distances. + + + For example, if you set `aroundPrecision` to 100, records wihin 100 + meters to the central coordinate are considered to have the same + distance, + + as are records between 100 and 199 meters. - $ref: '#/components/schemas/aroundPrecisionFromValue' x-categories: - Geo-Search @@ -329,12 +587,23 @@ components: items: type: array items: + minItems: 4 + maxItems: 4 type: number format: double - description: >- - Search inside a [rectangular - area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates for a rectangular area in which to search. + + + Each bounding box is defined by the two opposite points of its diagonal, + and expressed as latitude and longitude pair: + + `[p1 lat, p1 long, p2 lat, p2 long]`. + + Provide multiple bounding boxes as nested arrays. + + For more information, see [rectangular + area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). example: - - 47.3165 @@ -353,12 +622,23 @@ components: items: type: array items: + minItems: 6 + maxItems: 20000 type: number format: double - description: >- - Search inside a - [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - (in geographical coordinates). + description: > + Coordinates of a polygon in which to search. + + + Polygons are defined by 3 to 10,000 points. Each point is represented by + its latitude and longitude. + + Provide multiple polygons as nested arrays. + + For more information, see [filtering inside + polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). + + This parameter is ignored, if you also specify `insideBoundingBox`. example: - - 47.3165 @@ -378,11 +658,15 @@ components: - Geo-Search userToken: type: string - description: >- - Associates a [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) - with the current search. - example: '123456' + description: > + Unique pseudonymous or anonymous user identifier. + + + This helps with analytics and click and conversion events. + + For more information, see [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + example: test-user-123 x-categories: - Personalization baseSearchParamsWithoutQuery: @@ -391,8 +675,29 @@ components: properties: similarQuery: type: string - description: Overrides the query parameter and performs a more generic search. + description: > + Keywords to be used instead of the search query to conduct a more + broader search. + + + Using the `similarQuery` parameter changes other settings: + + + - `queryType` is set to `prefixNone`. + + - `removeStopWords` is set to true. + + - `words` is set as the first ranking criterion. + + - All remaining words are treated as `optionalWords`. + + + Since the `similarQuery` is supposed to do a broad search, they + usually return many results. + + Combine it with `filters` to narrow down the list of results. default: '' + example: comedy drama crime Macy Buscemi x-categories: - Search filters: @@ -408,12 +713,15 @@ components: sumOrFiltersScores: type: boolean description: > - Determines how to calculate [filter - scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). + Whether to sum all filter scores. - If `false`, maximum score is kept. - If `true`, score is summed. + If true, all filter scores are summed. + + Otherwise, the maximum filter score is kept. + + For more information, see [filter + scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). default: false x-categories: - Filtering @@ -424,9 +732,7 @@ components: example: - title - author - description: >- - Restricts a query to only look at a subset of your [searchable - attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). + description: Restricts a search to a subset of your searchable attributes. default: [] x-categories: - Filtering @@ -434,21 +740,35 @@ components: type: array items: type: string - description: >- - Returns - [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - their facet values, and the number of matching facet values. + description: > + Facets for which to retrieve facet values that match the search + criteria and the number of matching facet values. + + + To retrieve all facets, use the wildcard character `*`. + + For more information, see + [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). default: [] + example: + - '*' x-categories: - Faceting facetingAfterDistinct: type: boolean description: > - Forces faceting to be applied after - [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - (with the distinct feature). Alternatively, the `afterDistinct` - [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - of `attributesForFaceting` allows for more granular control. + Whether faceting should be applied after deduplication with + `distinct`. + + + This leads to accurate facet counts when using faceting in + combination with `distinct`. + + It's usually better to use `afterDistinct` modifiers in the + `attributesForFaceting` setting, + + as `facetingAfterDistinct` only computes correct facet counts if all + records have the same facet values for the `attributeForDistinct`. default: false x-categories: - Faceting @@ -456,28 +776,12 @@ components: $ref: '#/components/schemas/page' offset: type: integer - description: > - Specifies the offset of the first hit to return. - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Position of the first hit to retrieve. x-categories: - Pagination length: type: integer - description: > - Sets the number of hits to retrieve (for use with `offset`). - - > **Note**: Using `page` and `hitsPerPage` is the recommended method - for [paging - results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - However, you can use `offset` and `length` to implement [an - alternative approach to - paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). + description: Number of hits to retrieve (used in combination with `offset`). minimum: 1 maximum: 1000 x-categories: @@ -493,7 +797,7 @@ components: minimumAroundRadius: type: integer description: >- - Minimum radius (in meters) used for a geographical search when + Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. minimum: 1 x-categories: @@ -506,13 +810,19 @@ components: type: array items: type: string - description: >- - Changes the default values of parameters that work best for a - natural language query, such as `ignorePlurals`, `removeStopWords`, - `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These - parameters work well together when the query consists of fuller - natural language strings instead of keywords, for example when - processing voice search queries. + description: > + ISO language codes that adjust settings that are useful for + processing natural language queries (as opposed to keyword + searches): + + + - Sets `removeStopWords` and `ignorePlurals` to the list of provided + languages. + + - Sets `removeWordsIfNoResults` to `allOptional`. + + - Adds a `natural_language` attribute to `ruleContexts` and + `analyticsTags`. default: [] x-categories: - Languages @@ -520,19 +830,32 @@ components: type: array items: type: string - description: >- - Assigns [rule + description: > + Assigns a rule context to the search query. + + + [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - to search queries. + are strings that you can use to trigger matching rules. default: [] + example: + - mobile x-categories: - Rules personalizationImpact: type: integer - description: >- - Defines how much [Personalization affects - results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). + description: > + Impact that Personalization should have on this search. + + + The higher this value is, the more Personalization determines the + ranking compared to other factors. + + For more information, see [Understanding Personalization + impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). default: 100 + minimum: 0 + maximum: 100 x-categories: - Personalization userToken: @@ -540,43 +863,32 @@ components: getRankingInfo: type: boolean description: >- - Incidates whether the search response includes [detailed ranking - information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). + Whether the search response should include detailed ranking + information. default: false x-categories: - Advanced - explain: - type: array - items: - type: string - description: >- - Enriches the API's response with information about how the query was - processed. - default: [] - x-categories: - - Advanced synonyms: type: boolean - description: >- - Whether to take into account an index's synonyms for a particular - search. + description: Whether to take into account an index's synonyms for this search. default: true x-categories: - Advanced clickAnalytics: type: boolean - description: >- - Indicates whether a query ID parameter is included in the search - response. This is required for [tracking click and conversion - events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). + description: > + Whether to include a `queryID` attribute in the response. + + + The query ID is a unique identifier for a search query and is + required for tracking [click and conversion + events](https://www.algolia.com/guides/sending-events/getting-started/). default: false x-categories: - Analytics analytics: type: boolean - description: >- - Indicates whether this query will be included in - [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). + description: Whether this search will be included in Analytics. default: true x-categories: - Analytics @@ -593,14 +905,14 @@ components: percentileComputation: type: boolean description: >- - Whether to include or exclude a query from the processing-time - percentile computation. + Whether to include this search when calculating processing-time + percentiles. default: true x-categories: - Advanced enableABTest: type: boolean - description: Incidates whether this search will be considered in A/B testing. + description: Whether to enable A/B testing for this search. default: true x-categories: - Advanced @@ -618,37 +930,39 @@ components: - Pagination typoToleranceEnum: type: string + title: typo tolerance + description: | + - `min`. Return matches with the lowest number of typos. + For example, if you have matches without typos, only include those. + But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). + - `strict`. Return matches with the two lowest numbers of typos. + With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. enum: - min - strict typoTolerance: - description: >- - Controls whether [typo + description: > + Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. + + + If typo tolerance is true, `min`, or `strict`, [word splitting and + concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + is also active. oneOf: - type: boolean default: true + description: >- + Whether typo tolerance is active. If true, matches with typos are + included in the search results and rank after exact matches. - $ref: '#/components/schemas/typoToleranceEnum' x-categories: - Typos ignorePlurals: - description: > - Treats singular, plurals, and other forms of declensions as matching - terms. - - `ignorePlurals` is used in conjunction with the `queryLanguages` - setting. - - _list_: language ISO codes for which ignoring plurals should be enabled. - This list will override any values that you may have set in - `queryLanguages`. _true_: enables the ignore plurals feature, where - singulars and plurals are considered equivalent ("foot" = "feet"). The - languages supported here are either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the ignore plurals feature, so that singulars and plurals aren't - considered to be the same ("foot" will not find "feet"). + description: | + Treat singular, plurals, and other forms of declensions as equivalent. + You should only use this feature for the languages used in your index. example: - ca - es @@ -656,26 +970,32 @@ components: - type: array items: type: string + description: | + ISO code for languages for which this feature should be active. + This overrides languages you set with `queryLanguages`. - type: boolean + description: > + If true, `ignorePlurals` is active for all languages included in + `queryLanguages`, or for all supported languages, if `queryLanguges` + is empty. + + If false, singulars, plurals, and other declensions won't be + considered equivalent. default: false x-categories: - Languages removeStopWords: description: > - Removes stop (common) words from the query before executing it. + Removes stop words from the search query. - `removeStopWords` is used in conjunction with the `queryLanguages` - setting. - _list_: language ISO codes for which stop words should be enabled. This - list will override any values that you may have set in `queryLanguages`. - _true_: enables the stop words feature, ensuring that stop words are - removed from consideration in a search. The languages supported here are - either [every - language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - (this is the default) or those set by `queryLanguages`. _false_: turns - off the stop words feature, allowing stop words to be taken into account - in a search. + Stop words are common words like articles, conjunctions, prepositions, + or pronouns that have little or no meaning on their own. + + In English, "the", "a", or "and" are stop words. + + + You should only use this feature for the languages used in your index. example: - ca - es @@ -683,8 +1003,17 @@ components: - type: array items: type: string + description: >- + ISO code for languages for which stop words should be removed. + This overrides languages you set in `queryLanguges`. - type: boolean default: false + description: > + If true, stop words are removed for all languages you included in + `queryLanguages`, or for all supported languages, if + `queryLanguages` is empty. + + If false, stop words are not removed. x-categories: - Languages queryType: @@ -693,9 +1022,23 @@ components: - prefixLast - prefixAll - prefixNone - description: >- - Determines how query words are [interpreted as - prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). + description: > + Determines if and how query words are interpreted as prefixes. + + + By default, only the last query word is treated as prefix + (`prefixLast`). + + To turn off prefix search, use `prefixNone`. + + Avoid `prefixAll`, which treats all query words as prefixes. + + This might lead to counterintuitive results and makes your search + slower. + + + For more information, see [Prefix + searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). default: prefixLast x-categories: - Query strategy @@ -707,10 +1050,39 @@ components: - firstWords - allOptional example: firstWords - description: >- - Strategy to [remove - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - from the query when it doesn't match any hits. + description: > + Strategy for removing words from the query when it doesn't return any + results. + + This helps to avoid returning empty search results. + + +
+ +
none
+ +
No words are removed when a query doesn't return results.
+ +
lastWords
+ +
Treat the last (then second to last, then third to last) word as + optional, until there are results or at most 5 words have been + removed.
+ +
firstWords
+ +
Treat the first (then second, then third) word as optional, until + there are results or at most 5 words have been removed.
+ +
allOptional
+ +
Treat all words as optional.
+ +
+ + + For more information, see [Remove words to improve + results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). default: none x-categories: - Query strategy @@ -719,21 +1091,26 @@ components: enum: - neuralSearch - keywordSearch - description: Search mode the index will use to query for results. + description: > + Search mode the index will use to query for results. + + + This setting only applies to indices, for which Algolia enabled + NeuralSearch for you. default: keywordSearch x-categories: - Query strategy semanticSearch: type: object - description: > - Settings for the semantic search part of NeuralSearch. Only used when - `mode` is _neuralSearch_. + description: | + Settings for the semantic search part of NeuralSearch. + Only used when `mode` is `neuralSearch`. properties: eventSources: - description: >- - Indices from which to collect click and conversion events. If null, - the current index and replica group will be used as the event - source. + description: | + Indices from which to collect click and conversion events. + + If null, the current index and all its replicas are used. nullable: true type: array items: @@ -744,10 +1121,51 @@ components: - attribute - none - word - description: >- + description: > Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - is computed when the query contains only one word. + is computed when the search query has only one word. + + +
+ +
attribute
+ +
+ + The Exact ranking criterion is 1 if the query word and attribute value + are the same. + + For example, a search for "road" will match the value "road", but not + "road trip". + +
+ +
none
+ +
+ + The Exact ranking criterion is ignored on single-word searches. + +
+ +
word
+ +
+ + The Exact ranking criterion is 1 if the query word is found in the + attribute value. + + The query word must have at least 3 characters and must not be a stop + word. + +
+ +
+ + + If `exactOnSingleWordQuery` is `word`, only exact matches will be + highlighted, partial and prefix matches won't. default: attribute x-categories: - Query strategy @@ -767,13 +1185,41 @@ components: x-categories: - Query strategy distinct: - description: >- - Enables [deduplication or grouping of results (Algolia's _distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). + description: > + Determines how many records of a group are included in the search + results. + + + Records with the same value for the `attributeForDistinct` attribute are + considered a group. + + The `distinct` setting controls how many members of the group are + returned. + + This is useful for [deduplication and + grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + + + The `distinct` setting is ignored if `attributeForDistinct` is not set. example: 1 oneOf: - type: boolean + description: >- + Whether deduplication is turned on. If true, only one member of a + group is shown in the search results. - type: integer + description: > + Number of members of a group of records to include in the search + results. + + + - Don't use `distinct > 1` for records that might be [promoted by + rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/). + The number of hits won't be correct and faceting won't work as expected. + - With `distinct > 1`, the `hitsPerPage` parameter controls the + number of returned groups. + For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned. + Likewise, the `nbHits` response attribute contains the number of returned groups. minimum: 0 maximum: 4 default: 0 @@ -782,31 +1228,56 @@ components: maxFacetHits: type: integer description: >- - Maximum number of facet hits to return when [searching for facet + Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). maximum: 100 default: 10 x-categories: - Advanced order: - description: Pinned order of facet lists. + description: > + Explicit order of facets or facet values. + + + This setting lets you always show specific facets or facet values at the + top of the list. type: array items: type: string facets: - description: Ordering of facets (widgets). + description: Order of facet names. type: object additionalProperties: false properties: order: $ref: '#/components/schemas/order' sortRemainingBy: - description: | - How to display the remaining items: + description: > + Order of facet values that aren't explicitly positioned with the `order` + setting. + + +
+ +
count
- - `count`: facet count (descending). - - `alpha`: alphabetical (ascending). - - `hidden`: show only pinned values. +
+ + Order remaining facet values by decreasing count. + + The count is the number of matching records containing this facet value. + +
+ +
alpha
+ +
Sort facet values alphabetically.
+ +
hidden
+ +
Don't show facet values that aren't explicitly positioned.
+ +
. type: string enum: - count @@ -821,12 +1292,13 @@ components: sortRemainingBy: $ref: '#/components/schemas/sortRemainingBy' values: - description: Ordering of facet values within an individual facet. + description: Order of facet values. One object for each facet. type: object additionalProperties: + x-additionalPropertiesName: facet $ref: '#/components/schemas/value' facetOrdering: - description: Defines the ordering of facets (widgets). + description: Order of facet names and facet values in your UI. type: object additionalProperties: false properties: @@ -835,12 +1307,14 @@ components: values: $ref: '#/components/schemas/values' renderingContent: - description: >- - Extra content for the search UI, for example, to control the [ordering - and display of - facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - You can set a default value and dynamically override it with - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). + description: > + Extra data that can be used in the search UI. + + + You can use this to control aspects of your search UI, such as, the + order of facet names and values + + without changing your frontend code. type: object additionalProperties: false properties: @@ -849,11 +1323,11 @@ components: x-categories: - Advanced reRankingApplyFilter: - description: >- - When [Dynamic - Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) - is enabled, only records that match these filters will be affected by - Dynamic Re-Ranking. + description: > + Restrict [Dynamic + Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) + to records that match these filters. + nullable: true oneOf: - $ref: '#/components/schemas/listOfSearchFilters' - type: string @@ -864,26 +1338,6 @@ components: type: object additionalProperties: false properties: - attributesForFaceting: - type: array - items: - type: string - example: - - author - - filterOnly(isbn) - - searchable(edition) - - afterDistinct(category) - - afterDistinct(searchable(publisher)) - description: > - Attributes used for - [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) - and the - [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - that can be applied: `filterOnly`, `searchable`, and - `afterDistinct`. - default: [] - x-categories: - - Faceting attributesToRetrieve: type: array items: @@ -892,10 +1346,22 @@ components: - author - title - content - description: >- - Attributes to include in the API response. To reduce the size of - your response, you can retrieve only some of the attributes. By - default, the response includes all attributes. + description: > + Attributes to include in the API response. + + + To reduce the size of your response, you can retrieve only some of + the attributes. + + + - `*` retrieves all attributes, except attributes included in the + `customRanking` and `unretrievableAttributes` settings. + + - To retrieve all attributes except a specific one, prefix the + attribute with a dash and combine it with the `*`: `["*", + "-ATTRIBUTE"]`. + + - The `objectID` attribute is always included. default: - '*' x-categories: @@ -904,9 +1370,46 @@ components: type: array items: type: string - description: >- - Determines the order in which Algolia [returns your - results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + description: > + Determines the order in which Algolia returns your results. + + + By default, each entry corresponds to a [ranking + criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). + + The tie-breaking algorithm sequentially applies each criterion in + the order they're specified. + + If you configure a replica index for [sorting by an + attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), + + you put the sorting attribute at the top of the list. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + Before you modify the default setting, + + you should test your changes in the dashboard, + + and by [A/B + testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). default: - typo - geo @@ -926,19 +1429,59 @@ components: - desc(popularity) - asc(price) description: > - Specifies the [Custom ranking - criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). - Use the `asc` and `desc` modifiers to specify the ranking order: - ascending or descending. + Attributes to use as [custom + ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). + + + The custom ranking attributes decide which items are shown first if + the other ranking criteria are equal. + + + Records with missing values for your selected custom ranking + attributes are always sorted last. + + Boolean attributes are sorted based on their alphabetical order. + + + **Modifiers** + + +
+ +
asc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in ascending + order.
+ +
desc("ATTRIBUTE")
+ +
Sort the index by the values of an attribute, in descending + order.
+ +
+ + + If you use two or more custom ranking attributes, [reduce the + precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) + of your first attributes, + + or the other attributes will never be applied. default: [] x-categories: - Ranking relevancyStrictness: type: integer example: 90 - description: >- + description: > Relevancy threshold below which less relevant results aren't included in the results. + + + You can only set `relevancyStrictness` on [virtual replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). + + Use this setting to strike a balance between the relevance and + number of returned results. default: 100 x-categories: - Ranking @@ -949,11 +1492,28 @@ components: example: - author - title + - conten - content - description: >- - Attributes to highlight. Strings that match the search query in the - attributes are highlighted by surrounding them with HTML tags - (`highlightPreTag` and `highlightPostTag`). + description: > + Attributes to highlight. + + + By default, all searchable attributes are highlighted. + + Use `*` to highlight all attributes or use an empty array `[]` to + turn off highlighting. + + + With highlighting, strings that match the search query are + surrounded by HTML tags defined by `highlightPreTag` and + `highlightPostTag`. + + You can use this to visually highlight matching parts of a search + query in your UI. + + + For more information, see [Highlighting and + snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/). x-categories: - Highlighting and Snippeting attributesToSnippet: @@ -964,26 +1524,36 @@ components: - content:80 - description description: > - Attributes to _snippet_. 'Snippeting' is shortening the attribute to - a certain number of words. If not specified, the attribute is - shortened to the 10 words around the matching string but you can - specify the number. For example: `body:20`. + Attributes for which to enable snippets. + + + Snippets provide additional context to matched words. + + If you enable snippets, they include 10 words, including the matched + word. + + The matched word will also be wrapped by HTML tags for highlighting. + + You can adjust the number of words with the following notation: + `ATTRIBUTE:NUMBER`, + + where `NUMBER` is the number of words to be extracted. default: [] x-categories: - Highlighting and Snippeting highlightPreTag: type: string description: >- - HTML string to insert before the highlighted parts in all highlight - and snippet results. + HTML tag to insert before the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting highlightPostTag: type: string description: >- - HTML string to insert after the highlighted parts in all highlight - and snippet results. + HTML tag to insert after the highlighted parts in all highlighted + results and snippets. default: x-categories: - Highlighting and Snippeting @@ -995,9 +1565,11 @@ components: - Highlighting and Snippeting restrictHighlightAndSnippetArrays: type: boolean - description: >- - Restrict highlighting and snippeting to items that matched the - query. + description: > + Whether to restrict highlighting and snippeting to items that at + least partially matched the search query. + + By default, all items are highlighted and snippeted. default: false x-categories: - Highlighting and Snippeting @@ -1006,7 +1578,7 @@ components: minWordSizefor1Typo: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 4 @@ -1015,7 +1587,7 @@ components: minWordSizefor2Typos: type: integer description: >- - Minimum number of characters a word in the query string must contain + Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). default: 8 @@ -1025,9 +1597,11 @@ components: $ref: '#/components/schemas/typoTolerance' allowTyposOnNumericTokens: type: boolean - description: >- - Whether to allow typos on numbers ("numeric tokens") in the query - string. + description: | + Whether to allow typos on numbers in the search query. + + Turn off this setting to reduce the number of irrelevant matches + when searching in large sets of similar numbers. default: true x-categories: - Typos @@ -1037,9 +1611,23 @@ components: type: string example: - sku - description: >- + description: > Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + + Returning only exact matches can help when: + + + - [Searching in hyphenated + attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). + + - Reducing the number of matches when you have too many. + This can happen with attributes that are long blocks of text, such as product descriptions. + + Consider alternatives such as `disableTypoToleranceOnWords` or + adding synonyms if your attributes have intentional unusual + spellings that might look like typos. default: [] x-categories: - Typos @@ -1050,9 +1638,12 @@ components: keepDiacriticsOnCharacters: type: string example: øé - description: >- - Characters that the engine shouldn't automatically - [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: | + Characters for which diacritics should be preserved. + + By default, Algolia removes diacritics from letters. + For example, `é` becomes `e`. If this causes issues in your search, + you can specify characters that should keep their diacritics. default: '' x-categories: - Languages @@ -1062,39 +1653,64 @@ components: type: string example: - es - description: >- - Sets your user's search language. This adjusts language-specific - settings and features such as `ignorePlurals`, `removeStopWords`, - and + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for language-specific settings such as plurals, stop words, and + word-detection dictionaries. + + + This setting sets a default list of languages used by the + `removeStopWords` and `ignorePlurals` settings. + + This setting also sets a dictionary for word detection in the + logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - word detection. + languages. + + To support this, you must place the CJK language **first**. + + + + **You should always specify a query language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages decompoundQuery: type: boolean description: > - [Splits compound - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - into their component word parts in the query. + Whether to split compound words into their building blocks. + + + For more information, see [Word + segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). + + Word segmentation is supported for these languages: German, Dutch, + Finnish, Swedish, and Norwegian. default: true x-categories: - Languages enableRules: type: boolean - description: >- - Incidates whether - [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) - are enabled. + description: Whether to enable rules. default: true x-categories: - Rules enablePersonalization: type: boolean - description: >- - Incidates whether - [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - is enabled. + description: Whether to enable Personalization. default: false x-categories: - Personalization @@ -1108,9 +1724,13 @@ components: $ref: '#/components/schemas/semanticSearch' advancedSyntax: type: boolean - description: >- - Enables the [advanced query - syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). + description: > + Whether to support phrase matching and excluding words from search + queries. + + + Use the `advancedSyntaxFeatures` parameter to control which feature + is supported. default: false x-categories: - Query strategy @@ -1121,10 +1741,43 @@ components: example: - blue - iphone case - description: >- - Words which should be considered - [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - when found in a query. + description: > + Words that should be considered optional when found in the query. + + + By default, records must match all words in the search query to be + included in the search results. + + Adding optional words can help to increase the number of search + results by running an additional search query that doesn't include + the optional words. + + For example, if the search query is "action video" and "video" is an + optional word, + + the search engine runs two queries. One for "action video" and one + for "action". + + Records that match all words are ranked higher. + + + For a search query with 4 or more words **and** all its words are + optional, + + the number of matched words required for a record to be included in + the search results increases for every 1,000 records: + + + - If `optionalWords` has less than 10 words, the required number of + matched words increases by 1: + results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. + - If `optionalWords` has 10 or more words, the number of required + matched words increases by the number of optional words dividied by + 5 (rounded down). + For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. + + For more information, see [Optional + words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). default: [] x-categories: - Query strategy @@ -1134,9 +1787,22 @@ components: type: string example: - description - description: >- - Attributes for which you want to [turn off the exact ranking + description: > + Searchable attributes for which you want to [turn off the Exact + ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + + + This can be useful for attributes with long values, where the + likelyhood of an exact match is high, + + such as product descriptions. + + Turning off the Exact ranking criterion for these attributes favors + exact matching on other attributes. + + This reduces the impact of individual attributes with a lot of + content on ranking. default: [] x-categories: - Query strategy @@ -1146,10 +1812,42 @@ components: type: array items: $ref: '#/components/schemas/alternativesAsExact' - description: >- - Alternatives that should be considered an exact match by [the exact - ranking - criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). + description: > + Alternatives of query words that should be considered as exact + matches by the Exact ranking criterion. + + +
+ +
ignorePlurals
+ +
+ + + Plurals and similar declensions added by the `ignorePlurals` setting + are considered exact matches. + + +
+ +
singleWordSynonym
+ +
+ + Single-word synonyms, such as "NY/NYC" are considered exact matches. + +
+ +
multiWordsSynonym
+ +
+ + Multi-word synonyms, such as "NY/New York" are considered exact + matches. + +
+ +
. default: - ignorePlurals - singleWordSynonym @@ -1159,9 +1857,42 @@ components: type: array items: $ref: '#/components/schemas/advancedSyntaxFeatures' - description: >- - Allows you to specify which advanced syntax features are active when - `advancedSyntax` is enabled. + description: > + Advanced search syntax features you want to support. + + +
+ +
exactPhrase
+ +
+ + + Phrases in quotes must match exactly. + + For example, `sparkly blue "iPhone case"` only returns records with + the exact string "iPhone case". + + +
+ +
excludeWords
+ +
+ + + Query words prefixed with a `-` must not occur in a record. + + For example, `search -engine` matches records that contain "search" + but not "engine". + + +
+ +
+ + + This setting only has an effect if `advancedSyntax` is true. default: - exactPhrase - excludeWords @@ -1171,9 +1902,27 @@ components: $ref: '#/components/schemas/distinct' replaceSynonymsInHighlight: type: boolean - description: >- - Whether to highlight and snippet the original word that matches the - synonym or the synonym itself. + description: > + Whether to replace a highlighted word with the matched synonym. + + + By default, the original words are highlighted even if a synonym + matches. + + For example, with `home` as a synonym for `house` and a search for + `home`, + + records matching either "home" or "house" are included in the search + results, + + and either "home" or "house" are highlighted. + + + With `replaceSynonymsInHighlight` set to `true`, a search for `home` + still matches the same records, + + but all occurences of "house" are replaced by "home" in the + highlighted response. default: false x-categories: - Highlighting and Snippeting @@ -1181,9 +1930,18 @@ components: type: integer minimum: 1 maximum: 7 - description: >- - Precision of the [proximity ranking - criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). + description: > + Minimum proximity score for two matching words. + + + This adjusts the [Proximity ranking + criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) + + by equally scoring matches that are farther apart. + + + For example, if `minProximity` is 2, neighboring matches and matches + with one word between them would have the same score. default: 1 x-categories: - Advanced @@ -1191,10 +1949,28 @@ components: type: array items: type: string - description: >- - Attributes to include in the API response for search and browse - queries. - default: [] + description: > + Properties to include in the API response of `search` and `browse` + requests. + + + By default, all response properties are included. + + To reduce the response size, you can select, which attributes should + be included. + + + You can't exclude these properties: + + `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, + + `abTestVariantID`, `parsedQuery`, or any property triggered by the + `getRankingInfo` parameter. + + + Don't exclude properties that you might need in your search UI. + default: + - '*' x-categories: - Advanced maxFacetHits: @@ -1203,21 +1979,58 @@ components: type: integer description: Maximum number of facet values to return for each facet. default: 100 + maximum: 1000 x-categories: - Faceting sortFacetValuesBy: type: string - description: Controls how facet values are fetched. + description: > + Order in which to retrieve facet values. + + +
+ +
count
+ +
+ + Facet values are retrieved by decreasing count. + + The count is the number of matching records containing this facet + value. + +
+ +
alpha
+ +
Retrieve facet values alphabetically.
+ +
+ + + This setting doesn't influence how facet values are displayed in + your UI (see `renderingContent`). + + For more information, see [facet value + display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). default: count x-categories: - Faceting attributeCriteriaComputedByMinProximity: type: boolean - description: >- - When the [Attribute criterion is ranked above - Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - in your ranking formula, Proximity is used to select which - searchable attribute is matched in the Attribute ranking stage. + description: > + Whether the best matching attribute should be determined by minimum + proximity. + + + This setting only affects ranking if the Attribute ranking criterion + comes before Proximity in the `ranking` setting. + + If true, the best matching attribute is selected based on the + minimum proximity of multiple matches. + + Otherwise, the best matching attribute is determined by the order in + the `searchableAttributes` setting. default: false x-categories: - Advanced @@ -1225,15 +2038,20 @@ components: $ref: '#/components/schemas/renderingContent' enableReRanking: type: boolean - description: >- - Indicates whether this search will use [Dynamic + description: > + Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + + + This setting only has an effect if you activated Dynamic Re-Ranking + for this index in the Algolia dashboard. default: true x-categories: - Filtering reRankingApplyFilter: $ref: '#/components/schemas/reRankingApplyFilter' searchParamsObject: + title: Search parameters as object allOf: - $ref: '#/components/schemas/baseSearchParams' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -1247,11 +2065,11 @@ components: deprecated: true nbHits: type: integer - description: Number of hits the search query matched. + description: Number of results (hits). example: 20 nbPages: type: integer - description: Number of pages of results for the current query. + description: Number of pages of results. example: 1 processingTimeMS: type: integer @@ -1290,7 +2108,10 @@ components: example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 - description: Lets you store custom data in your indices. + description: | + An object with custom data. + + You can store up to 32 kB as custom data. default: {} x-categories: - Advanced @@ -1322,7 +2143,7 @@ components: pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$ automaticRadius: type: string - description: Automatically-computed radius. + description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: type: object title: exhaustive @@ -1386,10 +2207,12 @@ components: title: facets type: object additionalProperties: + x-additionalPropertiesName: facet type: object additionalProperties: + x-additionalPropertiesName: facet count type: integer - description: Mapping of each facet name to the corresponding facet counts. + description: Facet counts. example: category: food: 1 @@ -1493,22 +2316,21 @@ components: example: a00dbc80a8d13c4565a442e7e2dca80a objectID: type: string - description: Unique object identifier. - example: product-1 + description: Unique record identifier. highlightedValue: type: string - description: Markup text with `facetQuery` matches highlighted. + description: Highlighted attribute value, including HTML tags. example: George Clooney matchLevel: type: string - description: Indicates how well the attribute matched the search query. + description: Whether the whole query string matches or only a part. enum: - none - partial - full highlightResultOption: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: false properties: value: @@ -1517,7 +2339,7 @@ components: $ref: '#/components/schemas/matchLevel' matchedWords: type: array - description: List of words from the query that matched the object. + description: List of matched words from the search query. example: - action items: @@ -1531,12 +2353,13 @@ components: - matchedWords highlightResultOptionMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResultOption' highlightResultOptionArray: type: array - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. items: $ref: '#/components/schemas/highlightResultOption' highlightResult: @@ -1546,14 +2369,13 @@ components: - $ref: '#/components/schemas/highlightResultOptionArray' highlightResultMap: type: object - description: Show highlighted section and words matched on a query. + description: Surround words that match the query with HTML tags for highlighting. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/highlightResult' snippetResultOption: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: false properties: value: @@ -1565,16 +2387,13 @@ components: - matchLevel snippetResultOptionMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResultOption' snippetResultOptionArray: type: array - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. items: $ref: '#/components/schemas/snippetResultOption' snippetResult: @@ -1584,10 +2403,9 @@ components: - $ref: '#/components/schemas/snippetResultOptionArray' snippetResultMap: type: object - description: >- - Snippeted attributes show parts of the matched attributes. Only returned - when attributesToSnippet is non-empty. + description: Snippets that show the context around a matching search query. additionalProperties: + x-additionalPropertiesName: attribute $ref: '#/components/schemas/snippetResult' matchedGeoLocation: type: object @@ -1619,24 +2437,29 @@ components: description: The score of the event. rankingInfo: type: object + description: Object with detailed information about the record's ranking. additionalProperties: false properties: filters: type: integer - description: This field is reserved for advanced usage. + minimum: 0 + description: Whether a filter matched the query. firstMatchedWord: type: integer + minimum: 0 description: >- - Position of the most important matched attribute in the attributes - to index list. + Position of the first matched word in the best matching attribute of + the record. geoDistance: type: integer + minimum: 0 description: >- Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). geoPrecision: type: integer + minimum: 1 description: Precision used when computing the geo distance, in meters. matchedGeoLocation: $ref: '#/components/schemas/matchedGeoLocation' @@ -1644,27 +2467,33 @@ components: $ref: '#/components/schemas/personalization' nbExactWords: type: integer + minimum: 0 description: Number of exactly matched words. nbTypos: type: integer + minimum: 0 description: Number of typos encountered when matching the record. promoted: type: boolean - description: Present and set to true if a Rule promoted the hit. + description: Whether the record was promoted by a rule. proximityDistance: type: integer + minimum: 0 description: >- - When the query contains more than one word, the sum of the distances - between matched words (in meters). + Number of words between multiple matches in the query plus 1. For + single word queries, `proximityDistance` is 0. userScore: type: integer - description: Custom ranking for the object, expressed as a single integer value. + description: >- + Overall ranking of the record, expressed as a single integer. This + attribute is internal. words: type: integer - description: Number of matched words, including prefixes and typos. + minimum: 1 + description: Number of matched words. promotedByReRanking: type: boolean - description: Wether the record are promoted by the re-ranking strategy. + description: Whether the record is re-ranked. required: - promoted - nbTypos @@ -1678,7 +2507,12 @@ components: type: integer hit: type: object - description: A single hit. + description: > + Search result. + + + A hit is a record from your index, augmented with special attributes for + highlighting, snippeting, and ranking. x-is-generic: true additionalProperties: true required: @@ -1700,6 +2534,12 @@ components: properties: hits: type: array + description: > + Search results (hits). + + + Hits are records from your index that match the search criteria, + augmented with additional attributes, such as, for highlighting. items: $ref: '#/components/schemas/hit' query: @@ -1720,14 +2560,16 @@ components: indexName: type: string example: products - description: Algolia index name. + description: Index name. searchTypeDefault: type: string enum: - default default: default description: > - - `default`: perform a search query - `facet` [searches for facet + - `default`: perform a search query + + - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). searchForHitsOptions: x-is-SearchForHitsOptions: true @@ -1754,7 +2596,9 @@ components: - facet default: facet description: > - - `default`: perform a search query - `facet` [searches for facet + - `default`: perform a search query + + - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). searchForFacetsOptions: type: object @@ -1791,9 +2635,13 @@ components: - none - stopIfEnoughMatches description: > - - `none`: executes all queries. - `stopIfEnoughMatches`: executes - queries one by one, stopping further query execution as soon as a query - matches at least the `hitsPerPage` number of results. + Strategy for multiple search queries: + + + - `none`. Run all queries. + + - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as + a query matches at least the `hitsPerPage` number of results. searchForFacetValuesResponse: type: object additionalProperties: false @@ -1805,6 +2653,7 @@ components: properties: facetHits: type: array + description: Matching facet values. items: type: object title: facetHits @@ -1822,10 +2671,8 @@ components: $ref: '#/components/schemas/highlightedValue' count: description: >- - Number of records containing this facet value. This takes into - account the extra search parameters specified in the query. - Like for a regular search query, the [counts may not be - exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). + Number of records with this facet value. [The count may be + 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' @@ -1842,14 +2689,13 @@ components: cursor: type: string description: > - Cursor indicating the location to resume browsing from. Must match - the value returned by the previous call. + Cursor to get the next page of the response. + - Pass this value to the subsequent browse call to get the next page - of results. + The parameter must match the value returned in the response of a + previous request. - When the end of the index has been reached, `cursor` is absent from - the response. + The last page of the response does not return a `cursor` attribute. example: jMDY3M2MwM2QwMWUxMmQwYWI0ZTN browseParamsObject: allOf: @@ -1871,9 +2717,10 @@ components: description: > Unique identifier of a task. + A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the - `task` operation and this `taskID`. + [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. deletedAt: type: string example: '2023-06-27T14:42:38.831Z' @@ -1882,7 +2729,7 @@ components: format. attribute: type: string - description: Value of the attribute to be updated. + description: Value of the attribute to update. updatedAt: type: string example: '2023-07-04T12:49:15Z' @@ -1919,12 +2766,10 @@ components: - AddUnique - IncrementFrom - IncrementSet - description: Operation to apply to the attribute. + description: How to change the attribute. builtInOperation: type: object - description: >- - To update an attribute without pushing the entire record, you can use - these built-in operations. + description: Update to perform on the attribute. additionalProperties: false properties: _operation: @@ -1933,7 +2778,7 @@ components: type: string description: >- Value that corresponds to the operation, for example an `Increment` - or `Decrement` step, `Add` or `Remove` value. + or `Decrement` step, or an `Add` or `Remove` value. required: - _operation - value @@ -1951,7 +2796,7 @@ components: - deleteObject - delete - clear - description: Type of batch operation. + description: Type of indexing operation. objectIDs: type: array items: @@ -1959,11 +2804,70 @@ components: example: - record-1 - record-2 - description: Unique object (record) identifiers. + description: Unique record identifiers. baseIndexSettings: type: object + title: Index settings. additionalProperties: false properties: + attributesForFaceting: + type: array + items: + type: string + example: + - author + - filterOnly(isbn) + - searchable(edition) + - afterDistinct(category) + - afterDistinct(searchable(publisher)) + description: > + Attributes used for + [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + + + Facets are ways to categorize search results based on attributes. + + Facets can be used to let user filter search results. + + By default, no attribute is used for faceting. + + + **Modifiers** + + +
+ +
filterOnly("ATTRIBUTE")
+ +
Allows using this attribute as a filter, but doesn't evalue the + facet values.
+ +
searchable("ATTRIBUTE")
+ +
Allows searching for facet values.
+ +
afterDistinct("ATTRIBUTE")
+ +
+ + + Evaluates the facet count _after_ deduplication with `distinct`. + + This ensures accurate facet counts. + + You can apply this modifier to searchable facets: + `afterDistinct(searchable(ATTRIBUTE))`. + + +
+ +
+ + + Without modifiers, the attribute is used as a regular facet. + default: [] + x-categories: + - Faceting replicas: type: array items: @@ -1971,26 +2875,85 @@ components: example: - virtual(prod_products_price_asc) - dev_products_replica - description: >- - Creates - [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - which are copies of a primary index with the same records but - different settings. + description: > + Creates [replica + indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + + + Replicas are copies of a primary index with the same records but + different settings, synonyms, or rules. + + If you want to offer a different ranking or sorting of your search + results, you'll use replica indices. + + All index operations on a primary index are automatically forwarded + to its replicas. + + To add a replica index, you must provide the complete set of + replicas to this parameter. + + If you omit a replica from this list, the replica turns into a + regular, standalone index that will no longer by synced with the + primary index. + + + **Modifier** + + +
+ +
virtual("REPLICA")
+ +
+ + + Create a virtual replica, + + Virtual replicas don't increase the number of records and are + optimized for [Relevant + sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). + + +
+ +
+ + + Without modifier, a standard replica is created, which duplicates + your record count and is used for strict, or [exhaustive + sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/). default: [] x-categories: - Ranking paginationLimitedTo: type: integer - example: 20 - description: Maximum number of hits accessible through pagination. + example: 100 + description: > + Maximum number of search results that can be obtained through + pagination. + + + Higher pagination limits might slow down your search. + + For pagination limits above 1,000, the sorting of results beyond the + 1,000th hit can't be guaranteed. default: 1000 + maximum: 20000 unretrievableAttributes: type: array items: type: string example: - - popularity - description: Attributes that can't be retrieved at query time. + - total_sales + description: > + Attributes that can't be retrieved at query time. + + + This can be useful if you want to use an attribute for ranking or to + [restrict + access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), + + but don't want to include it in the search results. default: [] x-categories: - Attributes @@ -2001,18 +2964,27 @@ components: example: - wheel - 1X2BCD - description: >- + description: > Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). + + This also turns off [word splitting and + concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) + for the specified words. default: [] x-categories: - Typos attributesToTransliterate: - description: >- - Attributes in your index to which [Japanese - transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - applies. This will ensure that words indexed in Katakana or Kanji - can also be searched in Hiragana. + description: > + Attributes, for which you want to support [Japanese + transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). + + + Transliteration supports searching in any of the Japanese writing + systems. + + To support transliteration, you must set the indexing language to + Japanese. type: array items: type: string @@ -2028,7 +3000,7 @@ components: example: - description description: >- - Attributes on which to split [camel + Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. default: [] x-categories: @@ -2038,10 +3010,27 @@ components: example: de: - name - description: >- - Attributes in your index to which [word + description: > + Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - (decompounding) applies. + (decompounding). + + + Compound words are formed by combining two or more individual words, + + and are particularly prevalent in Germanic languages—for example, + "firefighter". + + With decompounding, the individual components are indexed + separately. + + + You can specify different lists for different languages. + + Decompounding is supported for these languages: + + Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish + (`sv`), and Norwegian (`no`). default: {} x-categories: - Languages @@ -2051,12 +3040,26 @@ components: type: string example: - ja - description: >- - Set the languages of your index, for language-specific processing - steps such as - [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - and - [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). + description: > + [ISO + code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + for a language for language-specific processing steps, such as word + detection and dictionary settings. + + + **You should always specify an indexing language.** + + If you don't specify an indexing language, the search engine uses + all [supported + languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), + + or the languages you specified with the `ignorePlurals` or + `removeStopWords` parameters. + + This can lead to unexpected search results. + + For more information, see [Language-specific + configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). default: [] x-categories: - Languages @@ -2067,7 +3070,7 @@ components: example: - sku description: >- - Attributes for which you want to turn off [prefix + Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). default: [] x-categories: @@ -2075,10 +3078,10 @@ components: allowCompressionOfIntegerArray: type: boolean description: > - Incidates whether the engine compresses arrays with exclusively - non-negative integers. + Whether arrays with exclusively non-negative integers should be + compressed for better performance. - When enabled, the compressed arrays may be reordered. + If true, the compressed arrays may be reordered. default: false x-categories: - Performance @@ -2086,11 +3089,43 @@ components: type: array items: type: string - description: >- + description: > Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). + + + By default, all numeric attributes are available as numerical + filters. + + For faster indexing, reduce the number of numeric attributes. + + + If you want to turn off filtering for all numeric attributes, + specifiy an attribute that doesn't exist in your index, such as + `NO_NUMERIC_FILTERING`. + + + **Modifier** + + +
+ +
equalOnly("ATTRIBUTE")
+ +
+ + + Support only filtering based on equality comparisons `=` and `!=`. + + +
+ +
+ + + Without modifier, all numeric comparisons are supported. example: - - quantity + - equalOnly(quantity) - popularity default: [] x-categories: @@ -2098,11 +3133,19 @@ components: separatorsToIndex: type: string example: +# - description: >- - Controls which separators are added to an Algolia index as part of - [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). + description: > + Controls which separators are indexed. + + Separators are all non-letter characters except spaces and currency characters, such as $€£¥. + + By default, separator characters aren't indexed. + + With `separatorsToIndex`, Algolia treats separator characters as + separate words. + + For example, a search for `C#` would report two matches. default: '' x-categories: - Typos @@ -2116,24 +3159,64 @@ components: - unordered(text) - emails.personal description: > - [Attributes used for - searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), - including determining [if matches at the beginning of a word are - important (ordered) or not - (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). + Attributes used for searching. + + + By default, all attributes are searchable and the + [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) + ranking criterion is turned off. + + With a non-empty list, Algolia only returns results with matches in + the selected attributes. + + In addition, the Attribute ranking criterion is turned on: matches + in attributes that are higher in the list of `searchableAttributes` + rank first. + + To make matches in two attributes rank equally, include them in a + comma-separated string, such as `"title,alternate_title"`. + + Attributes with the same priority are always unordered. + + + For more information, see [Searchable + attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). + + + **Modifier** + + +
+ +
unordered("ATTRIBUTE")
+ +
+ + Ignore the position of a match within the attribute. + +
+ +
+ + + Without modifier, matches at the beginning of an attribute rank + higer than matches at the end. default: [] x-categories: - Attributes userData: $ref: '#/components/schemas/userData' customNormalization: - description: >- - A list of characters and their normalized replacements to override - Algolia's default + description: > + Characters and their normalized replacements. + + This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). type: object - example: | - {default: {'ä': 'ae', 'ĂĽ': 'ue'}} + example: + default: + ä: ae + ĂĽ: ue additionalProperties: type: object additionalProperties: @@ -2141,14 +3224,28 @@ components: x-categories: - Languages attributeForDistinct: - description: >- - Name of the deduplication attribute to be used with Algolia's - [_distinct_ - feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). + description: > + Attribute that should be used to establish groups of results. + + + All records with the same value for this attribute are considered a + group. + + You can combine `attributeForDistinct` with the `distinct` search + parameter to control + + how many items per group are included in the search results. + + + If you want to use the same attribute also for faceting, use the + `afterDistinct` modifier of the `attributesForFaceting` setting. + + This applies faceting _after_ deduplication, which will result in + accurate facet counts. example: url type: string indexSettings: - description: Algolia index settings. + description: Index settings. allOf: - $ref: '#/components/schemas/baseIndexSettings' - $ref: '#/components/schemas/indexSettingsAsSearchParams' @@ -2227,7 +3324,7 @@ components: description: Unique identifier of a synonym object. synonymHits: type: array - description: Synonym objects. + description: Matching synonyms. items: $ref: '#/components/schemas/synonymHit' searchSynonymsResponse: @@ -2264,38 +3361,7 @@ components: - key - createdAt acl: - description: > - API key permissions: - - - `addObject`: required to add or update records, copy or move an index. - - `analytics`: required to access the Analytics API. - - `browse`: required to view records - - `deleteIndex`: required to delete indices. - - `deleteObject`: required to delete records. - - `editSettings`: required to change index settings. - - `inference`: required to access the Inference API. - - `listIndexes`: required to list indices. - - `logs`: required to access logs of search and indexing operations. - - `recommendation`: required to access the Personalization and Recommend - APIs. - - `search`: required to search records - - `seeUnretrievableAttributes`: required to retrieve - [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - for all operations that return records. - - `settings`: required to examine index settings. + description: Access control list permissions. type: string enum: - addObject @@ -2321,8 +3387,13 @@ components: acl: type: array description: > - [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) - associated with the key. + Permissions that determine the type of API requests this key can + make. + + The required ACL is listed in each endpoint's reference. + + For more information, see [access control + list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). example: - search - addObject @@ -2331,78 +3402,92 @@ components: $ref: '#/components/schemas/acl' description: type: string - description: Description of an API key for you and your team members. - example: Browse-restricted key + description: Description of an API key to help you identify this API key. + example: Used for indexing by the CLI default: '' indexes: type: array description: > - Restricts this API key to a list of indices or index patterns. If - the list is empty, all indices are allowed. + Index names or patterns that this API key can access. + + By default, an API key can access all indices in the same + application. + + + You can use leading and trailing wildcard characters (`*`): - Specify either an exact index name or a pattern with a leading or - trailing wildcard character (or both). For example: - - `dev_*` matches all indices starting with "dev_" - `*_dev` matches - all indices ending with "_dev" - `*_products_*` matches all indices - containing "_products_". + - `dev_*` matches all indices starting with "dev_". + + - `*_dev` matches all indices ending with "_dev". + + - `*_products_*` matches all indices containing "_products_". example: - dev_* - - prod_products + - prod_en_products default: [] items: type: string maxHitsPerQuery: type: integer - description: > - Maximum number of hits this API key can retrieve in one query. If - zero, no limit is enforced. - - > **Note**: Use this parameter to protect you from third-party - attempts to retrieve your entire content by massively querying the - index. + description: | + Maximum number of results this API key can retrieve in one query. + By default, there's no limit. default: 0 maxQueriesPerIPPerHour: type: integer description: > - Maximum number of API calls per hour allowed from a given IP address - or [user - token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). + Maximum number of API requests allowed per IP address or [user + token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) + per hour. - Each time an API call is performed with this key, a check is - performed. If there were more than the specified number of calls - within the last hour, the API returns an error with the status code - `429` (Too Many Requests). + If this limit is reached, the API returns an error with status code + `429`. - > **Note**: Use this parameter to protect you from third-party - attempts to retrieve your entire content by massively querying the - index. + By default, there's no limit. default: 0 queryParameters: type: string description: > - Force some [query - parameters](https://www.algolia.com/doc/api-reference/api-parameters/) - to be applied for each query made with this API key. + Query parameters to add when making API requests with this API key. + + + To restrict this API key to specific IP addresses, add the + `restrictSources` parameter. + + You can only add a single source, but you can provide a range of IP + addresses. - It's a URL-encoded query string. - example: >- - typoTolerance%3Dstrict%26ignorePlurals%3Dfalse%26filters%3Drights%3Apublic + + Creating an API key fails if the request is made from an IP address + that's outside the restricted range. + example: typoTolerance=strict&restrictSources=192.168.1.0/24 default: '' referers: type: array description: > - Restrict this API key to specific - [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - If empty, all referrers are allowed. + Allowed HTTP referrers for this API key. + + + By default, all referrers are allowed. + + You can use leading and trailing wildcard characters (`*`): + + + - `https://algolia.com/*` allows all referrers starting with + "https://algolia.com/" + + - `*.algolia.com` allows all referrers ending with ".algolia.com" + + - `*algolia.com*` allows all referrers in the domain "algolia.com". - For example: - - `https://algolia.com/*` matches all referrers starting with - "https://algolia.com/" - `*.algolia.com` matches all referrers - ending with ".algolia.com" - `*algolia.com*` allows everything in - the domain "algolia.com". + Like all HTTP headers, referrers can be spoofed. Don't rely on them + to secure your data. + + For more information, see [HTTP referrer + restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions). example: - '*algolia.com*' default: [] @@ -2410,18 +3495,9 @@ components: type: string validity: type: integer - description: > - Validity duration of a key (in seconds). The key will automatically - be removed after this time has expired. The default value of 0 never - expires. - - Short-lived API keys are useful to grant temporary access to your - data. For example, in mobile apps, you can't [control when users - update your - app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - So instead of encoding keys into your app as you would for a web - app, you should dynamically fetch them from your mobile app's - backend. + description: | + Duration (in seconds) after which the API key expires. + By default, API keys don't expire. example: 86400 default: 0 required: @@ -2434,7 +3510,7 @@ components: type: string example: '2023-07-04T12:49:15Z' description: >- - Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) + Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. addApiKeyResponse: type: object @@ -2447,12 +3523,21 @@ components: required: - key - createdAt + ruleID: + title: objectID + type: string + description: Unique identifier of a rule object. anchoring: type: string - description: >- - Whether the pattern parameter matches the beginning (`startsWith`) or - end (`endsWith`) of the query string, is an exact match (`is`), or a - partial match (`contains`). + description: | + Which part of the search query the pattern should match: + + - `startsWith`. The pattern must match the begginning of the query. + - `endsWith`. The pattern must match the end of the query. + - `is`. The pattern must match the query exactly. + - `contains`. The pattern must match anywhere in the query. + + Empty queries are only allowed as pattern with `anchoring: is`. enum: - is - startsWith @@ -2464,18 +3549,49 @@ components: properties: pattern: type: string - description: Query pattern syntax. - example: '{facet:brand}' + description: > + Query pattern that triggers the rule. + + + You can use either a literal string, or a special pattern + `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. + + The rule is triggered if the query matches the literal string or a + value of the specified facet. + + For example, with `pattern: {facet:genre}`, the rule is triggered + when users search for a genre, such as "comedy". + example: '{facet:genre}' anchoring: $ref: '#/components/schemas/anchoring' alternatives: type: boolean - description: Whether the pattern matches on plurals, synonyms, and typos. + description: Whether the pattern should match plurals, synonyms, and typos. default: false context: type: string - description: 'Rule context format: [A-Za-z0-9_-]+).' - example: trackedFilters + pattern: '[A-Za-z0-9_-]+' + description: > + An additional restriction that only triggers the rule, when the + search has the same value as `ruleContexts` parameter. + + For example, if `context: mobile`, the rule is only triggered when + the search request has a matching `ruleContexts: mobile`. + + A rule context must only contain alphanumeric characters. + example: mobile + filters: + type: string + description: > + Filters that trigger the rule. + + + You can add add filters using the syntax `facet:value` so that the + rule is triggered, when the specific filter is selected. + + You can use `filters` on its own or combine it with the `pattern` + parameter. + example: genre:comedy editType: description: Type of edit. type: string @@ -2493,57 +3609,79 @@ components: type: string insert: description: >- - Text that should be inserted in place of the removed text inside the - query string. + Text to be added in place of the deleted text inside the query + string. type: string consequenceQueryObject: type: object additionalProperties: false properties: remove: - description: Words to remove. + description: Words to remove from the search query. type: array items: type: string edits: - description: Edits to apply. + description: Changes to make to the search query. type: array items: $ref: '#/components/schemas/edit' consequenceQuery: - description: >- - When providing a string, it replaces the entire query string. When - providing an object, it describes incremental edits to be made to the - query string (but you can't do both). + description: > + Replace or edit the search query. + + + If `consequenceQuery` is a string, the entire search query is replaced + with that string. + + If `consequenceQuery` is an object, it describes incremental edits made + to the query. oneOf: - $ref: '#/components/schemas/consequenceQueryObject' - type: string automaticFacetFilter: type: object - description: Automatic facet Filter. + description: Filter or optional filter to be applied to the search. additionalProperties: false properties: facet: type: string - description: >- - Attribute to filter on. This must match a facet placeholder in the - Rule's pattern. + description: > + Facet name to be applied as filter. + + The name must match placeholders in the `pattern` parameter. + + For example, with `pattern: {facet:genre}`, `automaticFacetFilters` + must be `genre`. score: type: integer default: 1 - description: >- - Score for the filter. Typically used for optional or disjunctive - filters. + description: Filter scores to give different weights to individual filters. disjunctive: type: boolean default: false - description: Whether the filter is disjunctive (true) or conjunctive (false). + description: > + Whether the filter is disjunctive or conjunctive. + + + If true the filter has multiple matches, multiple occurences are + combined with the logical `OR` operation. + + If false, multiple occurences are combined with the logical `AND` + operation. required: - facet automaticFacetFilters: - description: >- - Names of facets to which automatic filtering must be applied; they must - match the facet name of a facet value placeholder in the query pattern. + description: > + Filter to be applied to the search. + + + You can use this to respond to search queries that match a facet value. + + For example, if users search for "comedy", which matches a facet value + of the "genre" facet, + + you can filter the results to show the top-ranked comedy movies. oneOf: - type: array items: @@ -2553,7 +3691,12 @@ components: type: string params: type: object - description: Additional search parameters. + description: > + Parameters to apply to this search. + + + You can use all search parameters, plus special `automaticFacetFilters`, + `automaticOptionalFacetFilters`, and `query`. additionalProperties: false properties: query: @@ -2572,38 +3715,39 @@ components: promotePosition: type: integer description: >- - The position to promote the records to. If you pass objectIDs, the - records are placed at this position as a group. For example, if you - pronmote four objectIDs to position 0, the records take the first four - positions. + Position in the search results where you want to show the promoted + records. example: 0 promoteObjectIDs: + title: objectIDs description: Records to promote. type: object additionalProperties: false properties: objectIDs: type: array - description: Unique identifiers of the records to promote. - example: - - 3f31c087763a2ceec359b318fc3edef3 - - 63c3c871e31a152d67df7720192fd752 + maxItems: 100 + description: | + Object IDs of the records you want to promote. + + The records are placed as a group at the `position`. + For example, if you want to promote four records to position `0`, + they will be the first four search results. items: - type: string + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: - position - objectIDs promoteObjectID: + title: objectID description: Record to promote. type: object additionalProperties: false properties: objectID: - type: string - example: 2b642cf64c587f50388eb1b8d047bf56 - description: Unique identifier of the record to promote. + $ref: '#/components/schemas/objectID' position: $ref: '#/components/schemas/promotePosition' required: @@ -2616,32 +3760,50 @@ components: consequence: type: object description: > - [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - of a rule. + Effect of the rule. + + + For more information, see + [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences). additionalProperties: false properties: params: $ref: '#/components/schemas/consequenceParams' promote: type: array - description: Records to promote. + maxItems: 300 + description: > + Records you want to pin to a specific position in the search + results. + + + You can promote up to 300 records, either individually, or as groups + of up to 100 records each. items: $ref: '#/components/schemas/promote' filterPromotes: type: boolean default: false - description: >- - Only use in combination with the `promote` consequence. When `true`, - promoted results will be restricted to match the filters of the - current search. When `false`, the promoted results will show up - regardless of the filters. + description: > + Whether promoted records must match an active filter for the + consequence to be applied. + + + This ensures that user actions (filtering the search) are given a + higher precendence. + + For example, if you promote a record with the `color: red` + attribute, and the user filters the search for `color: blue`, + + the "red" record won't be shown. hide: type: array - description: Records to hide. By default, you can hide up to 50 records per rule. + maxItems: 50 + description: Records you want to hide from the search results. items: title: consequenceHide type: object - description: Unique identifier of the record to hide. + description: Object ID of the record to hide. additionalProperties: false properties: objectID: @@ -2649,10 +3811,12 @@ components: required: - objectID userData: - description: >- - Custom JSON object that will be appended to the userData array in - the response. This object isn't interpreted by the API. It's limited - to 1kB of minified JSON. + description: > + A JSON object with custom data that will be appended to the + `userData` array in the response. + + This object isn't interpreted by the API and is limited to 1 kB + of minified JSON. example: settingID: f2a7b51e3503acc6a39b3784ffb84300 pluginVersion: 1.6.0 @@ -2662,10 +3826,10 @@ components: properties: from: type: integer - description: Lower bound of the time range (Unix timestamp). + description: When the rule should start to be active, in Unix epoch time. until: type: integer - description: Upper bound of the time range (Unix timestamp). + description: When the rule should stop to be active, in Unix epoch time. required: - from - until @@ -2675,15 +3839,20 @@ components: additionalProperties: false properties: objectID: - type: string - description: Unique identifier for a rule object. - example: hide-12345 + $ref: '#/components/schemas/ruleID' conditions: type: array + minItems: 0 + maxItems: 25 description: > - [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) - required to activate a rule. You can use up to 25 conditions per - rule. + Conditions that trigger a rule. + + + Some consequences require specific conditions or don't require any + condition. + + For more information, see + [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions). items: $ref: '#/components/schemas/condition' consequence: @@ -2691,20 +3860,16 @@ components: description: type: string description: >- - Description of the rule's purpose. This can be helpful for display - in the Algolia dashboard. + Description of the rule's purpose to help you distinguish between + different rules. example: Display a promotional banner enabled: type: boolean default: true - description: >- - Indicates whether to enable the rule. If it isn't enabled, it isn't - applied at query time. + description: Whether the rule is active. validity: type: array - description: >- - If you specify a validity period, the rule _only_ applies only - during that period. If specified, the array must not be empty. + description: Time periods when the rule is active. items: $ref: '#/components/schemas/timeRange' required: @@ -2714,7 +3879,7 @@ components: additionalProperties: false properties: objectID: - $ref: '#/components/schemas/objectID' + $ref: '#/components/schemas/ruleID' updatedAt: $ref: '#/components/schemas/updatedAt' taskID: @@ -2725,12 +3890,12 @@ components: - taskID parameters_query: type: string - description: Rule object query. + description: Search query for rules. default: '' parameters_page: type: integer minimum: 0 - description: Requested page (the first page is page 0). + description: Requested page of the API response. parameters_hitsPerPage: type: integer default: 20 @@ -2755,9 +3920,7 @@ components: - enabled - disabled default: enabled - description: >- - Indicates whether a dictionary entry is active (`enabled`) or inactive - (`disabled`). + description: Whether a dictionary entry is active. dictionaryEntry: type: object description: Dictionary entry. @@ -2768,55 +3931,33 @@ components: properties: objectID: type: string - description: Unique identifier for a dictionary object. - example: under + description: Unique identifier for the dictionary entry. + example: 828afd405e1f4fe950b6b98c2c43c032 language: type: string - description: > - [Supported language ISO - code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + description: >- + ISO code of a [supported + language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). example: de word: type: string - description: > - Dictionary entry word. Usage depends on the type of dictionary - entry. - - **`stopwordEntry`** - - The stop word you want to add or update. If the entry already exists - in Algolia's standard dictionary, you can override its behavior by - adding it to the custom dictionary and setting its `state` to - `disabled`. - - **`compoundEntry`** - - When `decomposition` is empty: adds `word` as a compound atom. For - example, atom “kino” decomposes the query “kopfkino” into "kopf" and - "kino". - - When `decomposition` isn't empty: creates a decomposition exception. - For example, when decomposition is set to the ["hund", "hutte"] - exception, "hundehutte" decomposes into “hund” and “hutte”, - discarding the linking "e". - example: down + description: >- + Matching dictionary word for `stopwords` and `compounds` + dictionaries. + example: the words: type: array - description: > - Compound dictionary [word - declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). - - If the entry already exists in Algolia's standard dictionary, you - can override its behavior by adding it to the custom dictionary and - setting its `state` to `disabled`. + description: Matching words in the `plurals` dictionary including declensions. example: - cheval - - chevaux + - cheveaux items: type: string decomposition: type: array - description: For compound entries, governs the behavior of the `word` parameter. + description: >- + Invividual components of a compound word in the `compounds` + dictionary. example: - kopf - schmerz @@ -2826,18 +3967,39 @@ components: state: $ref: '#/components/schemas/dictionaryEntryState' language: - description: > - [Supported language ISO - code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). + description: >- + ISO code of a [supported + language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). example: en type: string + searchDictionaryEntriesResponse: + type: object + additionalProperties: false + properties: + hits: + type: array + description: Dictionary entries matching the search criteria. + items: + $ref: '#/components/schemas/dictionaryEntry' + page: + $ref: '#/components/schemas/parameters_page' + nbHits: + $ref: '#/components/schemas/nbHits' + nbPages: + $ref: '#/components/schemas/nbPages' + required: + - hits + - page + - nbHits + - nbPages standardEntry: description: Key-value pair of a language ISO code and a boolean value. - example: | - {'fr': false} + example: + fr: false type: object nullable: true additionalProperties: + x-additionalPropertiesName: language type: boolean standardEntries: description: > @@ -2856,15 +4018,12 @@ components: type: object additionalProperties: false nullable: true - description: Custom entries for a dictionary. + description: >- + Dictionary type. If `null`, this dictionary type isn't supported for the + language. properties: nbCustomEntries: - description: > - If `0`, the dictionary hasn't been customized and only contains - standard entries provided by Algolia. - - If `null`, that feature isn't available or isn't supported for that - language. + description: Number of custom dictionary entries. type: integer languages: type: object @@ -2884,7 +4043,7 @@ components: userID: type: string pattern: ^[a-zA-Z0-9 \-*.]+$ - description: userID of the user. + description: User ID. example: user1 userId: title: userID @@ -2953,14 +4112,16 @@ components: enum: - published - notPublished - description: _published_ if the task has been processed, _notPublished_ otherwise. + description: >- + Task status, `published` if the task is completed, `notPublished` + otherwise. operationType: type: string enum: - move - copy example: copy - description: Operation to perform (_move_ or _copy_). + description: Operation to perform on the index. scopeType: type: string enum: @@ -3068,47 +4229,62 @@ components: type: string description: > Filters that apply to every search made with the secured API key. - You can add extra filters at search time with the filters query - parameter. - For example, if you set the filter group:admin on your generated API - key, and you add groups:press OR groups:visitors with the filters - query parameter, your final search filter is equivalent to - groups:admin AND (groups:press OR groups:visitors). + Extra filters added at search time will be combined with `AND`. + + For example, if you set `group:admin` as fixed filter on your + generated API key, + + and add `groups:visitors` to the search query, the complete set of + filters will be `group:admin AND groups:visitors`. validUntil: type: integer format: int64 - description: Unix timestamp used to set the expiration date of the API key. + description: >- + Timestamp in [Unix epoch + time](https://en.wikipedia.org/wiki/Unix_time) when the API key + should expire. restrictIndices: type: array items: type: string - description: Index names that can be queried. + description: > + Index names or patterns that this API key can access. + + By default, an API key can access all indices in the same + application. + + + You can use leading and trailing wildcard characters (`*`): + + + - `dev_*` matches all indices starting with "dev_". + + - `*_dev` matches all indices ending with "_dev". + + - `*_products_*` matches all indices containing "_products_". restrictSources: type: string description: > - IPv4 network allowed to use the generated key. Use this to protect - against API key leaking and reuse. + IP network that are allowed to use this key. - You can only provide a single source, but you can specify a range of - IPs (for example, 192.168.1.0/24). + + You can only add a single source, but you can provide a range of IP + addresses. + + Use this to protect against API key leaking and reuse. + example: 192.168.1.0/24 userToken: type: string description: > - Unique user IP address. - - This can be useful when you want to impose a rate limit on specific - users. By default, rate limits are set based on the IP address. This - can become an issue when several users search from the same IP - address. To avoid this, you can set a unique userToken for each user - when generating their API key. This lets you restrict each user to a - maximum number of API calls per hour, even if they share their IP - with another user. Specifying the userToken in a secured API key is - also a good security practice as it ensures users don't change it. - Many features like Analytics, Personalization, and Dynamic - Re-ranking rely on the authenticity of user identifiers. Setting the - userToken at the API key level ensures that downstream services work - as expected and prevents abuse. + Pseudonymous user identifier to restrict usage of this API key to + specific users. + + + By default, rate limits are set based on IP addresses. This can be + an issue if many users search from the same IP address. + + To avoid this, add a user token to each generated API key. responses: BadRequest: description: Bad request or request arguments. @@ -3226,58 +4402,114 @@ security: apiKey: [] tags: - name: Advanced - description: Advanced operations. + description: Query your logs. - name: Api Keys - description: Manage your API keys. - - name: Clusters + x-displayName: API keys description: > - Multi-cluster operations. + Manage your API keys. + - Algolia no longer offers [multi-cluster - management](https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/). + API requests must be authenticated with an API key. + + API keys can have permissions (access control lists, ACL) and + restrictions. + externalDocs: + url: https://www.algolia.com/doc/guides/security/api-keys/ + description: | + Related guide: API keys. + - name: Clusters + description: | + Multi-cluster operations. - - If you want to partition your data per user, use facets and secured API - keys instead. - If you need more data, consider upgrading to a bigger - cluster to suit your needs. Contact [Algolia's support - team](https://support.algolia.com/hc/en-us/requests/new) for details. + Algolia no longer offers multi-cluster management. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/ + description: | + Related guide: Multi-cluster management. - name: Dictionaries - description: >- - Dictionary operations allow you to customize linguistic features such as - [stop - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - and [segmentation - (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/). + description: > + Manage your dictionaries. + + + Customize language-specific settings, such as stop words, plurals, or word + segmentation. + + + Dictionaries are application-wide. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/ + description: | + Related guide: Natural languages. - name: Indices - description: >- - Manage indices, including listing them, checking and updating settings, - deleting, copying, and renaming. + description: > + Manage your indices and index settings. + + + Indices are copies of your data that are stored on Algolia's servers. + + They're optimal data structures for fast search and are made up of records + and settings. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/ + description: | + Related guide: Manage your indices. - name: Records - description: Record operations. + description: > + Add, update, and delete records from your indices. + + + Records are individual items in your index. + + When they match a search query, they're returned as search results, in the + order determined by your ranking. + + Records are schemaless JSON objects. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/ + description: | + Related guide: Prepare your records. - name: Rules - description: Rules operations. - - name: Search - description: Search operations. - - name: Synonyms - description: Synonym operations. - - name: Vaults description: > - Vault operations. + Create, update, delete, and search for rules. - Algolia Vault allows you to restrict network-level access to your cluster - to a specific set of IP addresses: for non-authorized IP addresses, the - cluster is invisible. - You should authorize the IP addresses of team members who need to access - the Alglolia dashboard, as it's also affected by the restricted list you - set up. + Rules are _if-then_ statements that you can use to curate search results. - To access this feature, [Algolia - Vault](https://www.algolia.com/doc/guides/security/algolia-vault/) must be - enabled on your server. Contact [Algolia's support - team](https://support.algolia.com/hc/en-us/requests/new) for details. + Rules have _conditions_ which can trigger _consequences_. - > **Note**: The maximum number of allowed sources is 1,000. + Consequences are changes to the search results, such as changing the order + of search results, or boosting a facet. + + This can be useful for tuning specific queries or for merchandising. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/ + description: | + Related guide: Rules. + - name: Search + description: Search one or more indices for matching records or facet values. + - name: Synonyms + description: | + Create, update, delete, and search for synonyms. + + Synonyms are terms that the search engine should consider equal. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/ + description: | + Related guide: Synonyms. + - name: Vaults + description: >- + Algolia Vault lets you restrict access to your clusters to specific IP + addresses and provides disk-level encryption at rest. + externalDocs: + url: https://www.algolia.com/doc/guides/security/algolia-vault/ + description: | + Related guide: Algolia Vault. - name: _model_index_settings x-displayName: Index settings description: | @@ -3422,7 +4654,15 @@ paths: x-acl: - search summary: Search an index. - description: Return records that match the query. + description: > + Searches a single index and return matching search results (_hits_). + + + This method lets you retrieve up to 1,000 hits. + + If you need more, use the [`browse` + operation](#tag/Search/operation/browse) or increase the + `paginatedLimitedTo` index setting. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -3456,12 +4696,23 @@ paths: x-acl: - search summary: Search multiple indices. - description: Send multiple search queries to one or more indices. + description: > + Sends multiple search request to one or more indices. + + + This can be useful in these cases: + + + - Different indices for different purposes, such as, one index for + products, another one for marketing content. + + - Multiple searches to the same index—for example, with different + filters. requestBody: required: true description: >- - Query requests and strategies. Results will be received in the same - order as the queries. + Muli-search request body. Results are returned in the same order as + the requests. content: application/json: schema: @@ -3512,18 +4763,22 @@ paths: - search summary: Search for facet values. description: > - [Search for a facet's - values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - optionally restricting the returned values to those contained in records - matching other search criteria. - - > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are - ignored). By default, the engine returns a maximum of 10 values but you - can adjust this with `maxFacetHits`. + Searches for values of a specified facet attribute. + + + - By default, facet values are sorted by decreasing count. + You can adjust this with the `sortFacetValueBy` parameter. + - Searching for facet values doesn't work if you have **more than 65 + searchable facets and searchable attributes combined**. parameters: - $ref: '#/components/parameters/IndexName' - name: facetName - description: Facet name. + description: > + Facet attribute in which to search for values. + + + This attribute must be included in the `attributesForFaceting` index + setting with the `searchable()` modifier. in: path required: true schema: @@ -3564,15 +4819,27 @@ paths: operationId: browse x-acl: - browse - summary: Get all records from an index. + summary: Browse for records. description: > - Retrieve up to 1,000 records per call. + Retrieves records from an index, up to 1,000 per request. + + + While searching retrieves _hits_ (records augmented with attributes for + highlighting and ranking details), + + browsing _just_ returns matching records. + + This can be useful if you want to export your indices. + + + - The Analytics API doesn't collect data when using `browse`. - Supports full-text search and filters. For better performance, it - doesn't support: + - Records are ranked by attributes and custom ranking. - - The `distinct` query parameter - Sorting by typos, proximity, words, - or geographical distance. + - Deduplication (`distinct`) is turned off. + + - There's no ranking for: typo-tolerance, number of matched words, + proximity, geo distance. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -3603,22 +4870,35 @@ paths: x-acl: - addObject description: > - Add a record (object) to an index or replace it. + Adds a record to an index or replace it. + + + - If the record doesn't have an object ID, a new record with an + auto-generated object ID is added to your index. + + - If a record with the specified object ID exists, the existing record + is replaced. - If the record doesn't contain an `objectID`, Algolia automatically adds - it. + - If a record with the specified object ID doesn't exist, a new record + is added to your index. - If you use an existing `objectID`, the existing record is replaced with - the new one. + - If you add a record to an index that doesn't exist yet, a new index is + created. - To add multiple records to your index in a single API request, use the - [`batch` operation](#tag/Records/operation/batch). - summary: Add or update a record. + + To update _some_ attributes of a record, use the [`partial` + operation](#tag/Records/operation/partial). + + To add, update, or replace multiple records, use the [`batch` + operation](#tag/Records/operation/batch). + summary: Add or replace a record. parameters: - $ref: '#/components/parameters/IndexName' requestBody: required: true - description: The Algolia record. + description: >- + The record, a schemaless object with attributes that are useful in the + context of search and discovery. content: application/json: schema: @@ -3635,7 +4915,7 @@ paths: properties: createdAt: type: string - description: Date of creation (ISO-8601 format). + description: Timestamp when the record was added, in ISO 8601 format. example: '2023-06-29T15:15:40.747Z' taskID: $ref: '#/components/schemas/taskID' @@ -3658,8 +4938,27 @@ paths: operationId: deleteIndex x-acl: - deleteIndex - summary: Delete index. - description: Delete an existing index. + summary: Delete an index. + description: > + Deletes an index and all its settings. + + + - Deleting an index doesn't delete its analytics data. + + - If you try to delete a non-existing index, the operation is ignored + without warning. + + - If the index you want to delete has replica indices, the replicas + become independent indices. + + - If the index you want to delete is a replica index, you must first + unlink it from its primary index before you can delete it. + For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/). + externalDocs: + url: >- + https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/delete-indices/ + description: | + Related guide: Delete indices. parameters: - $ref: '#/components/parameters/IndexName' responses: @@ -3680,9 +4979,12 @@ paths: operationId: getObject x-acl: - search - summary: Get a record. - description: >- - To get more than one record, use the [`objects` + summary: Retrieve a record. + description: > + Retrieves one record by its object ID. + + + To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). parameters: - $ref: '#/components/parameters/IndexName' @@ -3690,13 +4992,18 @@ paths: - name: attributesToRetrieve in: query description: > - Attributes to include with the records in the response. This is - useful to reduce the size of the API response. By default, all - retrievable attributes are returned. + Attributes to include with the records in the response. + + This is useful to reduce the size of the API response. + + By default, all retrievable attributes are returned. + - `objectID` is always retrieved, even when not specified. + `objectID` is always retrieved. + + + Attributes included in `unretrievableAttributes` - [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key. schema: @@ -3711,7 +5018,7 @@ paths: schema: title: getObjectResponse type: object - description: Fetched object. + description: The requested record. additionalProperties: $ref: '#/components/schemas/attribute' '400': @@ -3728,24 +5035,27 @@ paths: operationId: addOrUpdateObject x-acl: - addObject - summary: Add or update a record (using objectID). + summary: Add or replace a record. description: > - If you use an existing `objectID`, the existing record will be replaced - with the new one. + If a record with the specified object ID exists, the existing record is + replaced. + Otherwise, a new record is added to the index. - To update only some attributes of an existing record, use the [`partial` - operation](#tag/Records/operation/partialUpdateObject) instead. + To update _some_ attributes of an existing record, use the [`partial` + operation](#tag/Records/operation/partialUpdateObject) instead. - To add multiple records to your index in a single API request, use the - [`batch` operation](#tag/Records/operation/batch). + To add, update, or replace multiple records, use the [`batch` + operation](#tag/Records/operation/batch). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectID' requestBody: required: true - description: Algolia record. + description: >- + The record, a schemaless object with attributes that are useful in the + context of search and discovery. content: application/json: schema: @@ -3768,9 +5078,15 @@ paths: x-acl: - deleteObject summary: Delete a record. - description: >- - To delete a set of records matching a query, use the [`deleteByQuery` - operation](#tag/Records/operation/deleteBy) instead. + description: > + Deletes a record by its object ID. + + + To delete more than one record, use the [`batch` + operation](#tag/Records/operation/batch). + + To delete records matching a query, use the [`deleteByQuery` + operation](#tag/Records/operation/deleteBy). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectID' @@ -3792,12 +5108,16 @@ paths: operationId: deleteBy x-acl: - deleteIndex - summary: Delete all records matching a query. + summary: Delete records matching a query. description: > - This operation doesn't support all the query options, only its filters - (numeric, facet, or tag) and geo queries. + This operation doesn't accept empty queries or filters. + + + It's more efficient to get a list of object IDs with the [`browse` + operation](#tag/Search/operation/browse), - It doesn't accept empty filters or queries. + and then delete the records using the [`batch` + operation](tag/Records/operation/batch). parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -3826,8 +5146,8 @@ paths: - deleteIndex summary: Delete all records from an index. description: >- - Delete the records but leave settings and index-specific API keys - untouched. + Deletes only the records from an index while keeping settings, synonyms, + and rules. parameters: - $ref: '#/components/parameters/IndexName' responses: @@ -3848,28 +5168,28 @@ paths: operationId: partialUpdateObject x-acl: - addObject - summary: Update record attributes. + summary: Add or update attributes. x-codegen-request-body-name: attributesToUpdate - description: > - Add new attributes or update current ones in an existing record. + description: | + Adds new attributes to a record, or update existing ones. - You can use any first-level attribute but not nested attributes. If you - specify a [nested - attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - the engine treats it as a replacement for its first-level ancestor. + - If a record with the specified object ID doesn't exist, + a new record is added to the index **if** `createIfNotExists` is true. + - If the index doesn't exist yet, this method creates a new index. + - You can use any first-level attribute but not nested attributes. + If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectID' - name: createIfNotExists - description: | - Indicates whether to create a new record if it doesn't exist yet. + description: Whether to create a new record if it doesn't exist. in: query schema: type: boolean default: true requestBody: required: true - description: Object with attributes to update. + description: Attributes with their values. content: application/json: schema: @@ -3893,14 +5213,19 @@ paths: tags: - search operationId: batch - summary: Batch write operations on one index. + summary: Batch indexing operations on one index. description: > - To reduce the time spent on network round trips, you can perform several - write actions in a single API call. Actions are applied in the order - they are specified. + Adds, updates, or deletes records in one index with a single API + request. + - The supported `action`s are equivalent to the individual operations of - the same name. + Batching index updates reduces latency and increases data integrity. + + + - Actions are applied in the order they're specified. + + - Actions are equivalent to the individual API requests of the same + name. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -3934,6 +5259,21 @@ paths: - body required: - requests + examples: + batch: + summary: Batch indexing request. + value: + requests: + - action: addObject + body: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + - action: addObject + body: + name: Gayla geimer + company: Ortman McCain Co. + email: gayla@geimer.com responses: '200': description: OK @@ -3965,14 +5305,15 @@ paths: - search operationId: multipleBatch description: > - To reduce the time spent on network round trips, you can perform several - write actions in a single request. It's a multi-index version of the - [`batch` operation](#tag/Records/operation/batch). Actions are applied - in the order they are specified. - - The supported actions are equivalent to the individual operations of the - same name. - summary: Batch write operations on multiple indices. + Adds, updates, or deletes records in multiple indices with a single API + request. + + + - Actions are applied in the order they are specified. + + - Actions are equivalent to the individual API requests of the same + name. + summary: Batch indexing operations on multiple indices. requestBody: required: true content: @@ -3995,12 +5336,6 @@ paths: body: type: object description: Operation arguments (varies with specified `action`). - example: > - {'requests':[{'action':'addObject','indexName':'contacts','body':{'name':'Betty - Jane McCamey','company':'Vita Foods - Inc.','email':'betty@mccamey.com'}},{'action':'addObject','indexName':'public_contacts','body':{'name':'Gayla - Geimer','company': "Ortman McCain - Co','email':'gayla@geimer.com'}}]} indexName: type: string description: Index to target for this operation. @@ -4011,6 +5346,23 @@ paths: - indexName required: - requests + examples: + batch: + summary: Batch indexing request to two indices. + value: + requests: + - action: addObject + indexName: contacts + body: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + - action: addObject + indexName: public_contacts + body: + name: Gayla Geimer + company: Ortman McCain Co. + email: gayla@geimer.com responses: '200': description: OK @@ -4023,7 +5375,7 @@ paths: properties: taskID: type: object - description: TaskIDs per index. + description: Task IDs. One for each index. additionalProperties: $ref: '#/components/schemas/taskID' objectIDs: @@ -4048,11 +5400,11 @@ paths: x-cacheable: true x-acl: - search - summary: Get multiple records. - description: > - Retrieve one or more records, potentially from different indices, in a - single API operation. Results will be received in the same order as the - requests. + summary: Retrieve records. + description: | + Retrieves one or more records, potentially from different indices. + + Records are returned in the same order as the requests. requestBody: required: true description: Request object. @@ -4067,7 +5419,7 @@ paths: requests: type: array items: - description: Record retrieval operation. + description: Request body for retrieving records. title: getObjectsRequest type: object additionalProperties: false @@ -4079,20 +5431,22 @@ paths: type: array items: type: string - description: >- - Attributes to retrieve. If not specified, all - retrievable attributes are returned. + description: > + Attributes to retrieve. + + If not specified, all retrievable attributes are + returned. example: - author - title - content objectID: type: string - description: Record's objectID. - example: 8b9b7619230b1950f653b962fb0dfd6b + description: Object ID for the record to retrieve. + example: product-1 indexName: type: string - description: Name of the index containing the required records. + description: Index from which to retrieve the records. example: books required: - requests @@ -4108,10 +5462,10 @@ paths: properties: results: type: array - description: Retrieved results. + description: Retrieved records. items: type: object - description: Fetched object. + description: Retrieved record. x-is-generic: true required: - results @@ -4130,10 +5484,8 @@ paths: operationId: getSettings x-acl: - search - description: >- - Return an object containing an index's [configuration - settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - summary: Get index settings. + description: Retrieves an object with non-null index settings. + summary: Retrieve index settings. parameters: - $ref: '#/components/parameters/IndexName' responses: @@ -4157,10 +5509,17 @@ paths: operationId: setSettings x-acl: - editSettings - description: >- - Update the specified [index - settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - Specifying null for a setting resets it to its default value. + description: > + Update the specified index settings. + + + Index settings that you don't specify are left unchanged. + + Specify `null` to reset a setting to its default value. + + + For best performance, update the index settings before you add new + records to your index. summary: Update index settings. parameters: - $ref: '#/components/parameters/IndexName' @@ -4189,11 +5548,11 @@ paths: operationId: getSynonym x-acl: - settings - summary: Get a synonym object. - description: >- - Get a syonym by its `objectID`. To find the object IDs for your - synonyms, use the [`search` - operation](#tag/Synonyms/operation/searchSynonyms). + summary: Retrieve a synonym. + description: | + Retrieves a syonym by its ID. + To find the object IDs for your synonyms, + use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/parameters_ObjectID' @@ -4218,16 +5577,12 @@ paths: operationId: saveSynonym x-acl: - editSettings - summary: Save a synonym. + summary: Create or replace a synonym. description: > - Add a - [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - to an index or replace it. - - If the synonym `objectID` doesn't exist, Algolia adds a new one. + If a synonym with the specified object ID doesn't exist, Algolia adds a + new one. - If you use an existing synonym `objectID`, the existing synonym is - replaced with the new one. + Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). @@ -4276,9 +5631,10 @@ paths: x-acl: - editSettings summary: Delete a synonym. - description: >- - Delete a synonym by its `objectID`. To find the object IDs of your - synonyms, use the [`search` + description: > + Deletes a synonym by its ID. + + To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). parameters: - $ref: '#/components/parameters/IndexName' @@ -4302,8 +5658,10 @@ paths: operationId: saveSynonyms x-acl: - editSettings - summary: Save a batch of synonyms. - description: Create or update multiple synonyms. + summary: Create or replace synonyms. + description: | + If a synonym with the `objectID` doesn't exist, Algolia adds a new one. + Otherwise, existing synonyms are replaced. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ForwardToReplicas' @@ -4333,7 +5691,7 @@ paths: x-acl: - editSettings summary: Delete all synonyms. - description: Delete all synonyms in the index. + description: Deletes all synonyms from the index. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ForwardToReplicas' @@ -4358,9 +5716,7 @@ paths: x-acl: - settings summary: Search for synonyms. - description: >- - Search for synonyms in your index. You can control and filter the search - with parameters. To get all synonyms, send an empty request body. + description: Searches for synonyms in your index. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -4404,7 +5760,7 @@ paths: - admin summary: List API keys. description: >- - List all API keys associated with your Algolia application, including + Lists all API keys associated with your Algolia application, including their permissions and restrictions. responses: '200': @@ -4437,11 +5793,8 @@ paths: operationId: addApiKey x-acl: - admin - summary: Add API key. - description: | - Add a new API key with specific permissions and restrictions. - The request must be authenticated with the admin API key. - The response returns an API key string. + summary: Create an API key. + description: Creates a new API key with specific permissions and restrictions. requestBody: required: true content: @@ -4468,13 +5821,16 @@ paths: tags: - search operationId: getApiKey - summary: Get API key permissions. + summary: Retrieve API key permissions. description: > - Get the permissions and restrictions of a specific API key. + Gets the permissions and restrictions of an API key. + When authenticating with the admin API key, you can request information - for any of your application's keys. When authenticating with other API - keys, you can only retrieve information for that key. + for any of your application's keys. + + When authenticating with other API keys, you can only retrieve + information for that key. parameters: - $ref: '#/components/parameters/KeyString' responses: @@ -4500,9 +5856,9 @@ paths: - admin summary: Update an API key. description: | - Replace the permissions of an existing API key. - Any unspecified parameter resets that permission to its default value. - The request must be authenticated with the admin API key. + Replaces the permissions of an existing API key. + + Any unspecified attribute resets that attribute to its default value. parameters: - $ref: '#/components/parameters/KeyString' requestBody: @@ -4542,10 +5898,8 @@ paths: operationId: deleteApiKey x-acl: - admin - summary: Delete API key. - description: | - Delete an existing API key. - The request must be authenticated with the admin API key. + summary: Delete an API key. + description: Deletes the API key. parameters: - $ref: '#/components/parameters/KeyString' responses: @@ -4577,10 +5931,18 @@ paths: operationId: restoreApiKey x-acl: - admin - summary: Restore API key. - description: | - Restore a deleted API key, along with its associated permissions. - The request must be authenticated with the admin API key. + summary: Restore an API key. + description: > + Restores a deleted API key. + + + Restoring resets the `validity` attribute to `0`. + + + Algolia stores up to 1,000 API keys per application. + + If you create more, the oldest API keys are deleted and can't be + restored. parameters: - $ref: '#/components/parameters/KeyString' responses: @@ -4605,10 +5967,12 @@ paths: operationId: getRule x-acl: - settings - summary: Get a rule. - description: >- - Get a rule by its `objectID`. To find the `objectID` for rules, use the - [`search` operation](#tag/Rules/operation/searchRules). + summary: Retrieve a rule. + description: > + Retrieves a rule by its ID. + + To find the object ID of rules, use the [`search` + operation](#tag/Rules/operation/searchRules). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectIDRule' @@ -4633,8 +5997,13 @@ paths: operationId: saveRule x-acl: - editSettings - summary: Create or update a rule. - description: >- + summary: Create or replace a rule. + description: > + If a rule with the specified object ID doesn't exist, it's created. + + Otherwise, the existing rule is replaced. + + To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). parameters: @@ -4669,9 +6038,10 @@ paths: x-acl: - editSettings summary: Delete a rule. - description: >- - Delete a rule by its `objectID`. To find the `objectID` for rules, use - the [`search` operation](#tag/Rules/operation/searchRules). + description: | + Deletes a rule by its ID. + To find the object ID for rules, + use the [`search` operation](#tag/Rules/operation/searchRules). parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectIDRule' @@ -4694,8 +6064,15 @@ paths: operationId: saveRules x-acl: - editSettings - summary: Save a batch of rules. - description: Create or update multiple rules. + summary: Create or update rules. + description: > + Create or update multiple rules. + + + If a rule with the specified object ID doesn't exist, Algolia creates a + new one. + + Otherwise, existing rules are replaced. x-codegen-request-body-name: rules parameters: - $ref: '#/components/parameters/IndexName' @@ -4707,7 +6084,7 @@ paths: application/json: schema: type: array - description: Rules to add. + description: Rules to add or replace. items: $ref: '#/components/schemas/rule' responses: @@ -4729,7 +6106,7 @@ paths: x-acl: - editSettings summary: Delete all rules. - description: Delete all rules in the index. + description: Deletes all rules from the index. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ForwardToReplicas' @@ -4754,9 +6131,7 @@ paths: x-acl: - settings summary: Search for rules. - description: >- - Search for rules in your index. You can control the search with - parameters. To list all rules, send an empty request body. + description: Searches for rules in your index. parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -4774,9 +6149,7 @@ paths: $ref: '#/components/schemas/anchoring' context: type: string - description: >- - Restricts responses to the specified [contextual - rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). + description: Only return rules that match the context (exact match). example: mobile page: $ref: '#/components/schemas/parameters_page' @@ -4786,17 +6159,10 @@ paths: type: boolean nullable: true default: null - description: >- - Restricts responses to enabled rules. When not specified - (default), _all_ rules are retrieved. - requestOptions: - type: array - description: Request options to send with the API call. - example: | - {timeouts:{read:20}} - items: - type: object - description: Request option. + description: | + If `true`, return only enabled rules. + If `false`, return only inactive rules. + By default, _all_ rules are returned. responses: '200': description: OK @@ -4814,12 +6180,12 @@ paths: properties: hits: type: array - description: Fetched rules. + description: Rules that matched the search criteria. items: $ref: '#/components/schemas/rule' nbHits: type: integer - description: Number of fetched rules. + description: Number of rules that matched the search criteria. page: type: integer description: Current page. @@ -4841,8 +6207,10 @@ paths: operationId: batchDictionaryEntries x-acl: - editSettings - description: Add or remove a batch of dictionary entries. - summary: Batch dictionary entries. + description: >- + Adds or deletes multiple entries from your plurals, segmentation, or + stop word dictionaries. + summary: Add or delete dictionary entries. parameters: - $ref: '#/components/parameters/DictionaryName' requestBody: @@ -4851,8 +6219,7 @@ paths: application/json: schema: title: batchDictionaryEntriesParams - description: | - `batchDictionaryEntries` parameters. + description: Request body for updating dictionary entries. type: object required: - requests @@ -4862,11 +6229,11 @@ paths: type: boolean default: false description: >- - Incidates whether to replace all custom entries in the - dictionary with the ones sent with this request. + Whether to replace all custom entries in the dictionary with + the ones sent with this request. requests: type: array - description: Operations to batch. + description: List of additions and deletions to your dictionaries. items: title: batchDictionaryEntriesRequest type: object @@ -4899,15 +6266,7 @@ paths: x-cacheable: true x-acl: - settings - description: >- - Search for standard and - [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - entries in the [stop - words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - or [segmentation - (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - dictionaries. + description: Searches for standard and custom dictionary entries. summary: Search dictionary entries. parameters: - $ref: '#/components/parameters/DictionaryName' @@ -4917,8 +6276,7 @@ paths: application/json: schema: title: searchDictionaryEntriesParams - description: | - `searchDictionaryEntries` parameters. + description: Search parameter. type: object required: - query @@ -4934,7 +6292,11 @@ paths: $ref: '#/components/schemas/language' responses: '200': - $ref: '#/components/responses/UpdatedAt' + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/searchDictionaryEntriesResponse' '400': $ref: '#/components/responses/BadRequest' '402': @@ -4950,10 +6312,10 @@ paths: operationId: getDictionarySettings x-acl: - settings + summary: Retrieve dictionary settings. description: >- - Get the languages for which [stop words are turned - off](#tag/Dictionaries/operation/setDictionarySettings). - summary: Get stop word settings. + Retrieves the languages for which standard dictionary entries are turned + off. responses: '200': description: OK @@ -4982,8 +6344,10 @@ paths: operationId: setDictionarySettings x-acl: - editSettings - description: Set stop word settings for a specific language. - summary: Set stop word settings. + description: >- + Turns standard stop word dictionary entries on or off for a given + language. + summary: Update dictionary settings. requestBody: required: true content: @@ -4992,9 +6356,9 @@ paths: title: dictionarySettingsParams type: object additionalProperties: false - description: >- - Enable or turn off the built-in Algolia stop words for a - specific language. + description: > + Turn on or off the built-in Algolia stop words for a specific + language. required: - disableStandardEntries properties: @@ -5018,16 +6382,14 @@ paths: operationId: getDictionaryLanguages x-acl: - settings - description: >- - Lists Algolia's [supported - languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - and any customizations applied to each language's [stop - word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - and [segmentation - (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - features. + description: > + Lists supported languages with their supported dictionary types and + number of custom entries. summary: List available languages. + externalDocs: + url: >- + https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/ + description: Supported languages. responses: '200': description: OK @@ -5037,6 +6399,7 @@ paths: title: getDictionaryLanguagesResponse type: object additionalProperties: + x-additionalPropertiesName: language $ref: '#/components/schemas/languages' '400': $ref: '#/components/responses/BadRequest' @@ -5055,7 +6418,8 @@ paths: - admin summary: Assign or move a user ID. description: > - Assign or move a user ID to a cluster. + Assigns or moves a user ID to a cluster. + The time it takes to move a user is proportional to the amount of data linked to the user ID. @@ -5092,12 +6456,15 @@ paths: operationId: listUserIds x-acl: - admin - summary: List userIDs. + summary: List user IDs. description: > - List the userIDs assigned to a multi-cluster application. + Lists the userIDs assigned to a multi-cluster application. + - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + Since it can take a few seconds to get the data from the different + clusters, + + the response isn't real-time. parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/HitsPerPage' @@ -5133,10 +6500,11 @@ paths: operationId: batchAssignUserIds x-acl: - admin - summary: Batch assign userIDs. + summary: Assign multiple userIDs. description: | - Assign multiple user IDs to a cluster. - **You can't _move_ users with this operation.**. + Assigns multiple user IDs to a cluster. + + **You can't move users with this operation**. parameters: - $ref: '#/components/parameters/UserIDInHeader' requestBody: @@ -5181,13 +6549,16 @@ paths: operationId: getTopUserIds x-acl: - admin - summary: Get top userID. + summary: Get top user IDs. description: > Get the IDs of the 10 users with the highest number of records per cluster. - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + + Since it can take a few seconds to get the data from the different + clusters, + + the response isn't real-time. responses: '200': description: OK @@ -5207,6 +6578,7 @@ paths: items: type: object additionalProperties: + x-additionalPropertiesName: cluster type: array items: $ref: '#/components/schemas/userId' @@ -5227,12 +6599,15 @@ paths: operationId: getUserId x-acl: - admin - summary: Get userID. + summary: Retrieve user ID. description: > - Returns the userID data stored in the mapping. + Returns the user ID data stored in the mapping. - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + + Since it can take a few seconds to get the data from the different + clusters, + + the response isn't real-time. parameters: - $ref: '#/components/parameters/UserIDInPath' responses: @@ -5256,8 +6631,8 @@ paths: operationId: removeUserId x-acl: - admin - summary: Remove userID. - description: Remove a userID and its associated data from the multi-clusters. + summary: Delete user ID. + description: Deletes a user ID and its associated data from the clusters. parameters: - $ref: '#/components/parameters/UserIDInPath' responses: @@ -5290,7 +6665,7 @@ paths: x-acl: - admin summary: List clusters. - description: List the available clusters in a multi-cluster setup. + description: Lists the available clusters in a multi-cluster setup. responses: '200': description: OK @@ -5328,10 +6703,13 @@ paths: x-cacheable: true x-acl: - admin - summary: Search for a user ID. + summary: Search for user IDs. description: > - Since it can take up to a few seconds to get the data from the different - clusters, the response isn't real-time. + Since it can take a few seconds to get the data from the different + clusters, + + the response isn't real-time. + To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as @@ -5446,8 +6824,8 @@ paths: - in: query name: getClusters description: >- - Indicates whether to include the cluster's pending mapping state in - the response. + Whether to include the cluster's pending mapping state in the + response. schema: type: boolean responses: @@ -5462,8 +6840,8 @@ paths: properties: pending: description: >- - Indicates whether there are clusters undergoing migration, - creation, or deletion. + Whether there are clusters undergoing migration, creation, + or deletion. type: boolean clusters: description: > @@ -5491,8 +6869,8 @@ paths: operationId: getSources x-acl: - admin - description: Get all allowed sources (IP addresses). - summary: Get all allowed IP addresses. + summary: List allowed sources. + description: Retrieves all allowed IP addresses with access to your application. responses: '200': description: OK @@ -5514,8 +6892,8 @@ paths: operationId: replaceSources x-acl: - admin - description: Replace all allowed sources. - summary: Replace all sources. + summary: Replace allowed sources. + description: Replaces the list of allowed sources. requestBody: required: true description: Allowed sources. @@ -5552,7 +6930,7 @@ paths: operationId: appendSource x-acl: - admin - description: Add a source to the list of allowed sources. + description: Adds a source to the list of allowed sources. summary: Add a source. requestBody: required: true @@ -5579,8 +6957,8 @@ paths: operationId: deleteSource x-acl: - admin - description: Remove a source from the list of allowed sources. - summary: Remove a source. + description: Deletes a source from the list of allowed sources. + summary: Delete a source. parameters: - name: source in: path @@ -5622,23 +7000,21 @@ paths: The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. There's also a logging limit of - 1,000 API calls per server. - This request counts towards your [operations + - Logs are held for the last seven days. + + - Up to 1,000 API requests per server are logged. + + - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. - - > **Note**: To fetch the logs for a Distributed Search Network (DSN) - cluster, target the [DSN's - endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - summary: Return the latest log entries. + summary: Retrieve log entries. parameters: - name: offset in: query description: >- - First log entry to retrieve. Sorted by decreasing date with 0 being - the most recent. + First log entry to retrieve. The most recent entries are listed + first. schema: type: integer default: 0 @@ -5651,18 +7027,18 @@ paths: maximum: 1000 - name: indexName in: query - description: >- - Index for which log entries should be retrieved. When omitted, log - entries are retrieved for all indices. + description: | + Index for which to retrieve log entries. + By default, log entries are retrieved for all indices. example: products schema: type: string nullable: true - name: type in: query - description: >- - Type of log entries to retrieve. When omitted, all log entries are - retrieved. + description: | + Type of log entries to retrieve. + By default, all log entries are retrieved. schema: $ref: '#/components/schemas/logType' responses: @@ -5685,29 +7061,29 @@ paths: properties: timestamp: type: string - description: >- - Timestamp in [ISO - 8601](https://wikipedia.org/wiki/ISO_8601) format. + description: Timestamp of the API request in ISO 8601 format. example: '2023-03-08T12:34:56Z' method: type: string - description: HTTP method of the performed request. + description: HTTP method of the request. example: GET answer_code: type: string - description: HTTP response code. + description: HTTP status code of the response. example: '200' query_body: type: string - description: Request body. Truncated after 1,000 characters. + maxLength: 1000 + description: Request body. example: >- - \n{\n \"requests\": [\n {\n \"indexName\": + {\n \"requests\": [\n {\n \"indexName\": \"best_buy\",\n \"params\": \"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\"\n }\n ]\n}\n answer: type: string - description: Answer body. Truncated after 1,000 characters. + maxLength: 1000 + description: Response body. example: > 'n{\n \"results\": [\n {\n \"hits\": [\n {\n \"name\": \"Amazon - Fire TV Stick\",\n @@ -5732,21 +7108,22 @@ paths: \"9999119\"\n' url: type: string - description: Request URL. + format: uri + description: URL of the API endpoint. example: /1/indexes ip: type: string + format: ipv4 description: IP address of the client that performed the request. - example: 127.0.0.1 + example: 93.184.216.34 query_headers: type: string - description: Request headers (API key is obfuscated). + description: Request headers (API keys are obfuscated). example: >- User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5\nHost: - localhost.algolia.com:8080\nAccept: - */*\nContent-Type: application/json; - charset=utf-8\nX-Algolia-API-Key: + example.com\nAccept: */*\nContent-Type: + application/json; charset=utf-8\nX-Algolia-API-Key: 20f***************************\nX-Algolia-Application-Id: MyApplicationID\n sha1: @@ -5755,29 +7132,31 @@ paths: example: 26c53bd7e38ca71f4741b71994cd94a600b7ac68 nb_api_calls: type: string - description: Number of API calls. + description: Number of API requests. example: '1' processing_time_ms: type: string - description: >- - Processing time for the query. Doesn't include - network time. + description: | + Processing time for the query in milliseconds. + This doesn't include latency due to the network. example: '2' index: type: string description: Index targeted by the query. - example: best_buy + example: products query_params: type: string description: Query parameters sent with the request. example: query=georgia&attributesToRetrieve=name,city,country query_nb_hits: type: string - description: Number of hits returned for the query. + description: >- + Number of search results (hits) returned for the + query. example: '1' inner_queries: type: array - description: Performed queries for the given request. + description: Queries performed for the given request. items: type: object title: logQuery @@ -5785,15 +7164,15 @@ paths: index_name: type: string description: Index targeted by the query. - example: best_buy + example: products user_token: type: string - description: User identifier. + description: A user identifier. example: 93.189.166.128 query_id: type: string description: Unique query identifier. - example: '313453231' + example: 96f59a3145dd9bd8963dc223950507c8 required: - timestamp - method @@ -5821,10 +7200,21 @@ paths: operationId: getTask x-acl: - addObject - description: >- - Some operations, such as copying an index, will respond with a `taskID` - value. Use this value here to check the status of that task. - summary: Check a task's status. + description: > + Checks the status of a given task. + + + Indexing tasks are asynchronous. + + When you add, update, or delete records or indices, + + a task is created on a queue and completed depending on the load on the + server. + + + The indexing tasks' responses include a task ID that you can use to + check the status. + summary: Check task status. parameters: - $ref: '#/components/parameters/IndexName' - name: taskID @@ -5864,32 +7254,51 @@ paths: operationId: operationIndex x-acl: - addObject - summary: Copy, move, or rename an index. - description: >- - This `operation`, _copy_ or _move_, will copy or move a source index's - (`IndexName`) records, settings, synonyms, and rules to a `destination` - index. + summary: Copy or move an index. + description: > + Copies or moves (renames) an index within the same Algolia application. - If the destination index exists, it will be replaced, except for + + - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn't exist, it will be created. + - If the destination index doesn't exist yet, it'll be created. + + + **Copy** + + - Copying a source index that doesn't exist creates a new index with 0 + records and default settings. - The choice between moving or copying an index depends on your needs. - Choose: + - The API keys of the source index are merged with the existing keys in + the destination index. + - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - - **Move** to rename an index. + - You can't copy to a destination index that already has replicas. - - **Copy** to create a new index with the same records and configuration - as an existing one. + - Be aware of the [size + limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). + - Related guide: [Copy + indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) - > **Note**: When considering copying or moving, be aware of the [rate - limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - on these processes and the [impact on your analytics - data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). + + **Move** + + + - Moving a source index that doesn't exist is ignored without returning + an error. + + - When moving an index, the analytics data keep their original name and + a new set of analytics data is started for the new name. + To access the original analytics in the dashboard, create an index with the original name. + - If the destination index has replicas, moving will overwrite the + existing index and copy the data to the replica indices. + + - Related guide: [Move + indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -5909,16 +7318,15 @@ paths: type: array items: $ref: '#/components/schemas/scopeType' - description: >- - **This only applies to the _copy_ operation.** + description: > + **Only for copying.** - If you omit `scope`, the copy command copies all records, - settings, synonyms, and rules. + If you specify a scope, only the selected scopes are copied. + Records and the other scopes are left unchanged. - - If you specify `scope`, only the specified scopes are - copied. + If you omit the `scope` parameter, everything is copied: + records, settings, synonyms, and rules. required: - operation - destination @@ -5941,7 +7349,12 @@ paths: x-acl: - listIndexes summary: List indices. - description: List indices in an Algolia application. + description: > + Lists all indices in the current Algolia application. + + + The request follows any index restrictions of the API key you use to + make the request. parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/HitsPerPage' @@ -5966,25 +7379,25 @@ paths: tags: - search operationId: waitForApiKey - summary: Wait for an API key to be added, deleted, or updated. - description: description + summary: Wait for an API key operation. + description: Waits for an API key to be added, updated, or deleted. parameters: - in: query name: operation - description: The `operation` that was done on a `key`. + description: Whether the API key was created, updated, or deleted. required: true schema: $ref: '#/components/schemas/apiKeyOperation' - in: query name: key - description: The `key` that has been added, deleted or updated. + description: API key to wait for. required: true schema: type: string - in: query name: apiKey description: >- - Used to compare fields of the getApiKey response on an `update` + Used to compare fields of the `getApiKey` response on an `update` operation, to check if the `key` has been updated. required: false schema: @@ -6004,34 +7417,50 @@ paths: tags: - search operationId: generateSecuredApiKey - summary: Generate a secured API key without any calls to Algolia's servers. - description: >- - Generate a secured API key without any calls to Algolia's servers. - - When you need to restrict the scope of an API key, generate a secured - API key on your server, without any calls to Algolia. You can't generate - secured API keys from your Admin API key or from other secured API keys. - When you generate a secured API key, you can define several - restrictions, such as how long the key is valid for and which indexes it - can access. The more restrictions you set, the longer the key will be. - If the key is longer than 500 characters, you may have problems using it - on some networks. If you want to limit the number of requests that can - be made with a secured API key, you must also rate-limit the key that - you use to generate it. You can create a rate-limited key in the Algolia - dashboard or use the Add API key or Update API key methods of an API - client. + summary: Create secured API keys. + description: > + Generates a secured API key without any calls to Algolia's servers. + + + Secured API keys are API keys that you generate on your server without + any API request to Algolia. + + Secured API keys help in environments where you can't easily update the + client-side code, such as mobile apps, + + or when you need to restrict access to a part of your index for every + user. + + + When your users start searching, instead of using the Search API key, + they request a short-lived secured API key from your server. + + On your server, you use this method to create a secured API key, with + any restrictions you'd like, such as filters, index access restrictions, + + or expiration times. The API key gets longer the more restrictions you + add. + + Your users then use the secured API key to search with Algolia. + + + You can't create secured API keys from other secured API keys or from + your Admin API key. + + The generated API key can have the same restrictions as the parent API + key, or be more restrictive. parameters: - in: query name: apiKey description: >- - The search-only API key that the secured API key will inherit its - restrictions from. + API key from which the secured API key will inherit its + restrictions. required: true schema: type: string - in: query name: restrictions - description: The options to add to the secured API key. + description: Restrictions to add to the API key. required: true schema: $ref: '#/components/schemas/securedAPIKeyRestrictions' diff --git a/tests/output/csharp/src/generated/requests/Insights.test.cs b/tests/output/csharp/src/generated/requests/Insights.test.cs index a5437255cb..2254d343c1 100644 --- a/tests/output/csharp/src/generated/requests/Insights.test.cs +++ b/tests/output/csharp/src/generated/requests/Insights.test.cs @@ -601,7 +601,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1709942400000L, + Timestamp = 1710201600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", } @@ -614,7 +614,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1709942400000L, + Timestamp = 1710201600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, } ) @@ -626,7 +626,7 @@ await _client.PushEventsAsync( Assert.Equal("/1/events", req.Path); Assert.Equal("POST", req.Method.ToString()); JsonAssert.EqualOverrideDefault( - "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1709942400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1709942400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", + "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1710201600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1710201600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", req.Body, new JsonDiffConfig(false) ); @@ -647,7 +647,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1709942400000L, + Timestamp = 1710201600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", } @@ -660,7 +660,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1709942400000L, + Timestamp = 1710201600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, } ) diff --git a/tests/output/csharp/src/generated/requests/Search.test.cs b/tests/output/csharp/src/generated/requests/Search.test.cs index f39346716c..ece36bcd88 100644 --- a/tests/output/csharp/src/generated/requests/Search.test.cs +++ b/tests/output/csharp/src/generated/requests/Search.test.cs @@ -2395,7 +2395,6 @@ await _client.SearchAsync( AroundPrecision = new AroundPrecision(0), AroundRadius = new AroundRadius(Enum.Parse("All")), AttributeCriteriaComputedByMinProximity = true, - AttributesForFaceting = new List { "" }, AttributesToHighlight = new List { "" }, AttributesToRetrieve = new List { "" }, AttributesToSnippet = new List { "" }, @@ -2410,7 +2409,6 @@ await _client.SearchAsync( EnableReRanking = true, EnableRules = true, ExactOnSingleWordQuery = Enum.Parse("Attribute"), - Explain = new List { "foo", "bar" }, FacetFilters = new FacetFilters( new List { new MixedSearchFilters("") } ), @@ -2509,7 +2507,7 @@ await _client.SearchAsync( Assert.Equal("/1/indexes/*/queries", req.Path); Assert.Equal("POST", req.Method.ToString()); JsonAssert.EqualOverrideDefault( - "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesForFaceting\":[\"\"],\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"explain\":[\"foo\",\"bar\"],\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", + "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", req.Body, new JsonDiffConfig(false) ); @@ -2519,14 +2517,35 @@ await _client.SearchAsync( public async Task SearchDictionaryEntriesTest0() { await _client.SearchDictionaryEntriesAsync( - Enum.Parse("Compounds"), - new SearchDictionaryEntriesParams { Query = "foo", } + Enum.Parse("Stopwords"), + new SearchDictionaryEntriesParams { Query = "about", } ); var req = _echo.LastResponse; - Assert.Equal("/1/dictionaries/compounds/search", req.Path); + Assert.Equal("/1/dictionaries/stopwords/search", req.Path); Assert.Equal("POST", req.Method.ToString()); - JsonAssert.EqualOverrideDefault("{\"query\":\"foo\"}", req.Body, new JsonDiffConfig(false)); + JsonAssert.EqualOverrideDefault("{\"query\":\"about\"}", req.Body, new JsonDiffConfig(false)); + + // e2e + try + { + var resp = await _e2eClient.SearchDictionaryEntriesAsync( + Enum.Parse("Stopwords"), + new SearchDictionaryEntriesParams { Query = "about", } + ); + // Check status code 200 + Assert.NotNull(resp); + + JsonAssert.EqualOverrideDefault( + "{\"hits\":[{\"objectID\":\"86ef58032f47d976ca7130a896086783\",\"language\":\"en\",\"word\":\"about\"}],\"page\":0,\"nbHits\":1,\"nbPages\":1}", + JsonSerializer.Serialize(resp, JsonConfig.Options), + new JsonDiffConfig(true) + ); + } + catch (Exception e) + { + Assert.Fail("An exception was thrown: " + e.Message); + } } [Fact(DisplayName = "get searchDictionaryEntries results with all parameters")] diff --git a/tests/output/dart/test/requests/algoliasearch_test.dart b/tests/output/dart/test/requests/algoliasearch_test.dart index 59f1f7bc9a..ca61ff8a86 100644 --- a/tests/output/dart/test/requests/algoliasearch_test.dart +++ b/tests/output/dart/test/requests/algoliasearch_test.dart @@ -648,9 +648,6 @@ void main() { aroundPrecision: 0, aroundRadius: AroundRadiusAll.fromJson("all"), attributeCriteriaComputedByMinProximity: true, - attributesForFaceting: [ - "", - ], attributesToHighlight: [ "", ], @@ -678,10 +675,6 @@ void main() { enableRules: true, exactOnSingleWordQuery: ExactOnSingleWordQuery.fromJson("attribute"), - explain: [ - "foo", - "bar", - ], facetFilters: [ "", ], @@ -814,7 +807,7 @@ void main() { expectPath(request.path, '/1/indexes/*/queries'); expect(request.method, 'post'); expectBody(request.body, - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); }, ), ); diff --git a/tests/output/dart/test/requests/insights_test.dart b/tests/output/dart/test/requests/insights_test.dart index 4ece008356..7abc78d3fb 100644 --- a/tests/output/dart/test/requests/insights_test.dart +++ b/tests/output/dart/test/requests/insights_test.dart @@ -632,7 +632,7 @@ void main() { index: "products", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: [ "9780545139700", "9780439784542", @@ -645,7 +645,7 @@ void main() { index: "products", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: [ "9780545139700", "9780439784542", @@ -658,7 +658,7 @@ void main() { expectPath(request.path, '/1/events'); expect(request.method, 'post'); expectBody(request.body, - """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"]}]}"""); + """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"]}]}"""); }, ), ); diff --git a/tests/output/dart/test/requests/search_test.dart b/tests/output/dart/test/requests/search_test.dart index 1b2b0a8bd7..9f902cf4a4 100644 --- a/tests/output/dart/test/requests/search_test.dart +++ b/tests/output/dart/test/requests/search_test.dart @@ -2592,9 +2592,6 @@ void main() { aroundPrecision: 0, aroundRadius: AroundRadiusAll.fromJson("all"), attributeCriteriaComputedByMinProximity: true, - attributesForFaceting: [ - "", - ], attributesToHighlight: [ "", ], @@ -2622,10 +2619,6 @@ void main() { enableRules: true, exactOnSingleWordQuery: ExactOnSingleWordQuery.fromJson("attribute"), - explain: [ - "foo", - "bar", - ], facetFilters: [ "", ], @@ -2758,7 +2751,7 @@ void main() { expectPath(request.path, '/1/indexes/*/queries'); expect(request.method, 'post'); expectBody(request.body, - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); }, ), ); @@ -2773,15 +2766,15 @@ void main() { options: ClientOptions(requester: requester), ), call: (client) => client.searchDictionaryEntries( - dictionaryName: DictionaryType.fromJson("compounds"), + dictionaryName: DictionaryType.fromJson("stopwords"), searchDictionaryEntriesParams: SearchDictionaryEntriesParams( - query: "foo", + query: "about", ), ), intercept: (request) { - expectPath(request.path, '/1/dictionaries/compounds/search'); + expectPath(request.path, '/1/dictionaries/stopwords/search'); expect(request.method, 'post'); - expectBody(request.body, """{"query":"foo"}"""); + expectBody(request.body, """{"query":"about"}"""); }, ), ); diff --git a/tests/output/go/tests/requests/insights_test.go b/tests/output/go/tests/requests/insights_test.go index 7dc51312ad..84dea20cb1 100644 --- a/tests/output/go/tests/requests/insights_test.go +++ b/tests/output/go/tests/requests/insights_test.go @@ -451,9 +451,9 @@ func TestInsights_PushEvents(t *testing.T) { insights.NewEmptyInsightsEvents().SetEvents( []insights.EventsItems{*insights.ConvertedObjectIDsAfterSearchAsEventsItems( - insights.NewEmptyConvertedObjectIDsAfterSearch().SetEventType(insights.ConversionEvent("conversion")).SetEventName("Product Purchased").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1709942400000).SetObjectIDs( + insights.NewEmptyConvertedObjectIDsAfterSearch().SetEventType(insights.ConversionEvent("conversion")).SetEventName("Product Purchased").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1710201600000).SetObjectIDs( []string{"9780545139700", "9780439784542"}).SetQueryID("43b15df305339e827f0ac0bdc5ebcaa7")), *insights.ViewedObjectIDsAsEventsItems( - insights.NewEmptyViewedObjectIDs().SetEventType(insights.ViewEvent("view")).SetEventName("Product Detail Page Viewed").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1709942400000).SetObjectIDs( + insights.NewEmptyViewedObjectIDs().SetEventType(insights.ViewEvent("view")).SetEventName("Product Detail Page Viewed").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1710201600000).SetObjectIDs( []string{"9780545139700", "9780439784542"}))}), )) require.NoError(t, err) @@ -462,15 +462,15 @@ func TestInsights_PushEvents(t *testing.T) { require.Equal(t, "POST", echo.Method) ja := jsonassert.New(t) - ja.Assertf(*echo.Body, `{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"]}]}`) + ja.Assertf(*echo.Body, `{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"]}]}`) clientE2E := createE2EInsightsClient(t) res, err := clientE2E.PushEvents(client.NewApiPushEventsRequest( insights.NewEmptyInsightsEvents().SetEvents( []insights.EventsItems{*insights.ConvertedObjectIDsAfterSearchAsEventsItems( - insights.NewEmptyConvertedObjectIDsAfterSearch().SetEventType(insights.ConversionEvent("conversion")).SetEventName("Product Purchased").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1709942400000).SetObjectIDs( + insights.NewEmptyConvertedObjectIDsAfterSearch().SetEventType(insights.ConversionEvent("conversion")).SetEventName("Product Purchased").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1710201600000).SetObjectIDs( []string{"9780545139700", "9780439784542"}).SetQueryID("43b15df305339e827f0ac0bdc5ebcaa7")), *insights.ViewedObjectIDsAsEventsItems( - insights.NewEmptyViewedObjectIDs().SetEventType(insights.ViewEvent("view")).SetEventName("Product Detail Page Viewed").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1709942400000).SetObjectIDs( + insights.NewEmptyViewedObjectIDs().SetEventType(insights.ViewEvent("view")).SetEventName("Product Detail Page Viewed").SetIndex("products").SetUserToken("user-123456").SetAuthenticatedUserToken("user-123456").SetTimestamp(1710201600000).SetObjectIDs( []string{"9780545139700", "9780439784542"}))}), )) require.NoError(t, err) diff --git a/tests/output/go/tests/requests/search_test.go b/tests/output/go/tests/requests/search_test.go index e48cac2047..63aed983f8 100644 --- a/tests/output/go/tests/requests/search_test.go +++ b/tests/output/go/tests/requests/search_test.go @@ -1806,15 +1806,13 @@ func TestSearch_Search(t *testing.T) { search.NewEmptySearchForHits().SetAdvancedSyntax(true).SetAdvancedSyntaxFeatures( []search.AdvancedSyntaxFeatures{search.AdvancedSyntaxFeatures("exactPhrase")}).SetAllowTyposOnNumericTokens(true).SetAlternativesAsExact( []search.AlternativesAsExact{search.AlternativesAsExact("multiWordsSynonym")}).SetAnalytics(true).SetAnalyticsTags( - []string{""}).SetAroundLatLng("").SetAroundLatLngViaIP(true).SetAroundPrecision(search.Int32AsAroundPrecision(0)).SetAroundRadius(search.AroundRadiusAllAsAroundRadius(search.AroundRadiusAll("all"))).SetAttributeCriteriaComputedByMinProximity(true).SetAttributesForFaceting( - []string{""}).SetAttributesToHighlight( + []string{""}).SetAroundLatLng("").SetAroundLatLngViaIP(true).SetAroundPrecision(search.Int32AsAroundPrecision(0)).SetAroundRadius(search.AroundRadiusAllAsAroundRadius(search.AroundRadiusAll("all"))).SetAttributeCriteriaComputedByMinProximity(true).SetAttributesToHighlight( []string{""}).SetAttributesToRetrieve( []string{""}).SetAttributesToSnippet( []string{""}).SetClickAnalytics(true).SetCustomRanking( []string{""}).SetDecompoundQuery(true).SetDisableExactOnAttributes( []string{""}).SetDisableTypoToleranceOnAttributes( - []string{""}).SetDistinct(search.Int32AsDistinct(0)).SetEnableABTest(true).SetEnablePersonalization(true).SetEnableReRanking(true).SetEnableRules(true).SetExactOnSingleWordQuery(search.ExactOnSingleWordQuery("attribute")).SetExplain( - []string{"foo", "bar"}).SetFacetFilters(search.ArrayOfMixedSearchFiltersAsFacetFilters( + []string{""}).SetDistinct(search.Int32AsDistinct(0)).SetEnableABTest(true).SetEnablePersonalization(true).SetEnableReRanking(true).SetEnableRules(true).SetExactOnSingleWordQuery(search.ExactOnSingleWordQuery("attribute")).SetFacetFilters(search.ArrayOfMixedSearchFiltersAsFacetFilters( []search.MixedSearchFilters{*search.StringAsMixedSearchFilters("")})).SetFacetingAfterDistinct(true).SetFacets( []string{""}).SetFilters("").SetGetRankingInfo(true).SetHighlightPostTag("").SetHighlightPreTag("").SetHitsPerPage(1).SetIgnorePlurals(search.BoolAsIgnorePlurals(false)).SetIndexName("theIndexName").SetInsideBoundingBox( [][]float64{ @@ -1846,7 +1844,7 @@ func TestSearch_Search(t *testing.T) { require.Equal(t, "POST", echo.Method) ja := jsonassert.New(t) - ja.Assertf(*echo.Body, `{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}`) + ja.Assertf(*echo.Body, `{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}`) }) } @@ -1856,16 +1854,42 @@ func TestSearch_SearchDictionaryEntries(t *testing.T) { t.Run("get searchDictionaryEntries results with minimal parameters", func(t *testing.T) { _, err := client.SearchDictionaryEntries(client.NewApiSearchDictionaryEntriesRequest( - search.DictionaryType("compounds"), - search.NewEmptySearchDictionaryEntriesParams().SetQuery("foo"), + search.DictionaryType("stopwords"), + search.NewEmptySearchDictionaryEntriesParams().SetQuery("about"), )) require.NoError(t, err) - require.Equal(t, "/1/dictionaries/compounds/search", echo.Path) + require.Equal(t, "/1/dictionaries/stopwords/search", echo.Path) require.Equal(t, "POST", echo.Method) ja := jsonassert.New(t) - ja.Assertf(*echo.Body, `{"query":"foo"}`) + ja.Assertf(*echo.Body, `{"query":"about"}`) + clientE2E := createE2ESearchClient(t) + res, err := clientE2E.SearchDictionaryEntries(client.NewApiSearchDictionaryEntriesRequest( + search.DictionaryType("stopwords"), + search.NewEmptySearchDictionaryEntriesParams().SetQuery("about"), + )) + require.NoError(t, err) + _ = res + + rawBody, err := json.Marshal(res) + require.NoError(t, err) + + var rawBodyMap any + err = json.Unmarshal(rawBody, &rawBodyMap) + require.NoError(t, err) + + expectedBodyRaw := `{"hits":[{"objectID":"86ef58032f47d976ca7130a896086783","language":"en","word":"about"}],"page":0,"nbHits":1,"nbPages":1}` + var expectedBody any + err = json.Unmarshal([]byte(expectedBodyRaw), &expectedBody) + require.NoError(t, err) + + unionBody := tests.Union(expectedBody, rawBodyMap) + unionBodyRaw, err := json.Marshal(unionBody) + require.NoError(t, err) + + jaE2E := jsonassert.New(t) + jaE2E.Assertf(expectedBodyRaw, string(unionBodyRaw)) }) t.Run("get searchDictionaryEntries results with all parameters", func(t *testing.T) { _, err := client.SearchDictionaryEntries(client.NewApiSearchDictionaryEntriesRequest( diff --git a/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java b/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java index 99dc439106..d5c2b63c26 100644 --- a/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java +++ b/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java @@ -615,7 +615,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1709942400000L) + .setTimestamp(1710201600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) .setQueryID("43b15df305339e827f0ac0bdc5ebcaa7"), new ViewedObjectIDs() @@ -624,7 +624,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1709942400000L) + .setTimestamp(1710201600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) ) ) @@ -636,9 +636,9 @@ void pushEventsTest1() { assertDoesNotThrow(() -> JSONAssert.assertEquals( "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product" + - " Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1709942400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product" + + " Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1710201600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product" + " Detail Page" + - " Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1709942400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", + " Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1710201600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", req.body, JSONCompareMode.STRICT ) @@ -654,7 +654,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1709942400000L) + .setTimestamp(1710201600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) .setQueryID("43b15df305339e827f0ac0bdc5ebcaa7"), new ViewedObjectIDs() @@ -663,7 +663,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1709942400000L) + .setTimestamp(1710201600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) ) ) diff --git a/tests/output/java/src/test/java/com/algolia/requests/Search.test.java b/tests/output/java/src/test/java/com/algolia/requests/Search.test.java index d735bc71e6..8c4e7720c6 100644 --- a/tests/output/java/src/test/java/com/algolia/requests/Search.test.java +++ b/tests/output/java/src/test/java/com/algolia/requests/Search.test.java @@ -2186,7 +2186,6 @@ void searchTest7() { .setAroundPrecision(AroundPrecision.of(0)) .setAroundRadius(AroundRadiusAll.fromValue("all")) .setAttributeCriteriaComputedByMinProximity(true) - .setAttributesForFaceting(List.of("")) .setAttributesToHighlight(List.of("")) .setAttributesToRetrieve(List.of("")) .setAttributesToSnippet(List.of("")) @@ -2201,7 +2200,6 @@ void searchTest7() { .setEnableReRanking(true) .setEnableRules(true) .setExactOnSingleWordQuery(ExactOnSingleWordQuery.fromValue("attribute")) - .setExplain(List.of("foo", "bar")) .setFacetFilters(FacetFilters.of(List.of(MixedSearchFilters.of("")))) .setFacetingAfterDistinct(true) .setFacets(List.of("")) @@ -2271,7 +2269,7 @@ void searchTest7() { assertEquals("POST", req.method); assertDoesNotThrow(() -> JSONAssert.assertEquals( - "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesForFaceting\":[\"\"],\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"explain\":[\"foo\",\"bar\"],\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", + "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", req.body, JSONCompareMode.STRICT ) @@ -2282,12 +2280,24 @@ void searchTest7() { @DisplayName("get searchDictionaryEntries results with minimal parameters") void searchDictionaryEntriesTest0() { assertDoesNotThrow(() -> { - client.searchDictionaryEntries(DictionaryType.fromValue("compounds"), new SearchDictionaryEntriesParams().setQuery("foo")); + client.searchDictionaryEntries(DictionaryType.fromValue("stopwords"), new SearchDictionaryEntriesParams().setQuery("about")); }); EchoResponse req = echo.getLastResponse(); - assertEquals("/1/dictionaries/compounds/search", req.path); + assertEquals("/1/dictionaries/stopwords/search", req.path); assertEquals("POST", req.method); - assertDoesNotThrow(() -> JSONAssert.assertEquals("{\"query\":\"foo\"}", req.body, JSONCompareMode.STRICT)); + assertDoesNotThrow(() -> JSONAssert.assertEquals("{\"query\":\"about\"}", req.body, JSONCompareMode.STRICT)); + + var res = clientE2E.searchDictionaryEntries( + DictionaryType.fromValue("stopwords"), + new SearchDictionaryEntriesParams().setQuery("about") + ); + assertDoesNotThrow(() -> + JSONAssert.assertEquals( + "{\"hits\":[{\"objectID\":\"86ef58032f47d976ca7130a896086783\",\"language\":\"en\",\"word\":\"about\"}],\"page\":0,\"nbHits\":1,\"nbPages\":1}", + json.writeValueAsString(res), + JSONCompareMode.LENIENT + ) + ); } @Test diff --git a/tests/output/javascript/src/requests/algoliasearch.test.ts b/tests/output/javascript/src/requests/algoliasearch.test.ts index 0c4fc19a62..5bdab7f386 100644 --- a/tests/output/javascript/src/requests/algoliasearch.test.ts +++ b/tests/output/javascript/src/requests/algoliasearch.test.ts @@ -529,7 +529,6 @@ describe('search', () => { aroundPrecision: 0, aroundRadius: 'all', attributeCriteriaComputedByMinProximity: true, - attributesForFaceting: [''], attributesToHighlight: [''], attributesToRetrieve: [''], attributesToSnippet: [''], @@ -544,7 +543,6 @@ describe('search', () => { enableReRanking: true, enableRules: true, exactOnSingleWordQuery: 'attribute', - explain: ['foo', 'bar'], facetFilters: [''], facetingAfterDistinct: true, facets: [''], @@ -626,7 +624,6 @@ describe('search', () => { aroundPrecision: 0, aroundRadius: 'all', attributeCriteriaComputedByMinProximity: true, - attributesForFaceting: [''], attributesToHighlight: [''], attributesToRetrieve: [''], attributesToSnippet: [''], @@ -641,7 +638,6 @@ describe('search', () => { enableReRanking: true, enableRules: true, exactOnSingleWordQuery: 'attribute', - explain: ['foo', 'bar'], facetFilters: [''], facetingAfterDistinct: true, facets: [''], diff --git a/tests/output/javascript/src/requests/insights.test.ts b/tests/output/javascript/src/requests/insights.test.ts index fc114e2be1..2b5ba3771d 100644 --- a/tests/output/javascript/src/requests/insights.test.ts +++ b/tests/output/javascript/src/requests/insights.test.ts @@ -426,7 +426,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: ['9780545139700', '9780439784542'], queryID: '43b15df305339e827f0ac0bdc5ebcaa7', }, @@ -436,7 +436,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: ['9780545139700', '9780439784542'], }, ], @@ -452,7 +452,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: ['9780545139700', '9780439784542'], queryID: '43b15df305339e827f0ac0bdc5ebcaa7', }, @@ -462,7 +462,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: ['9780545139700', '9780439784542'], }, ], @@ -477,7 +477,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: ['9780545139700', '9780439784542'], queryID: '43b15df305339e827f0ac0bdc5ebcaa7', }, @@ -487,7 +487,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1709942400000, + timestamp: 1710201600000, objectIDs: ['9780545139700', '9780439784542'], }, ], diff --git a/tests/output/javascript/src/requests/search.test.ts b/tests/output/javascript/src/requests/search.test.ts index e04fb28193..2384363f95 100644 --- a/tests/output/javascript/src/requests/search.test.ts +++ b/tests/output/javascript/src/requests/search.test.ts @@ -1903,7 +1903,6 @@ describe('search', () => { aroundPrecision: 0, aroundRadius: 'all', attributeCriteriaComputedByMinProximity: true, - attributesForFaceting: [''], attributesToHighlight: [''], attributesToRetrieve: [''], attributesToSnippet: [''], @@ -1918,7 +1917,6 @@ describe('search', () => { enableReRanking: true, enableRules: true, exactOnSingleWordQuery: 'attribute', - explain: ['foo', 'bar'], facetFilters: [''], facetingAfterDistinct: true, facets: [''], @@ -2000,7 +1998,6 @@ describe('search', () => { aroundPrecision: 0, aroundRadius: 'all', attributeCriteriaComputedByMinProximity: true, - attributesForFaceting: [''], attributesToHighlight: [''], attributesToRetrieve: [''], attributesToSnippet: [''], @@ -2015,7 +2012,6 @@ describe('search', () => { enableReRanking: true, enableRules: true, exactOnSingleWordQuery: 'attribute', - explain: ['foo', 'bar'], facetFilters: [''], facetingAfterDistinct: true, facets: [''], @@ -2087,14 +2083,34 @@ describe('search', () => { describe('searchDictionaryEntries', () => { test('get searchDictionaryEntries results with minimal parameters', async () => { const req = (await client.searchDictionaryEntries({ - dictionaryName: 'compounds', - searchDictionaryEntriesParams: { query: 'foo' }, + dictionaryName: 'stopwords', + searchDictionaryEntriesParams: { query: 'about' }, })) as unknown as EchoResponse; - expect(req.path).toEqual('/1/dictionaries/compounds/search'); + expect(req.path).toEqual('/1/dictionaries/stopwords/search'); expect(req.method).toEqual('POST'); - expect(req.data).toEqual({ query: 'foo' }); + expect(req.data).toEqual({ query: 'about' }); expect(req.searchParams).toStrictEqual(undefined); + + const resp = await e2eClient.searchDictionaryEntries({ + dictionaryName: 'stopwords', + searchDictionaryEntriesParams: { query: 'about' }, + }); + + const expectedBody = { + hits: [ + { + objectID: '86ef58032f47d976ca7130a896086783', + language: 'en', + word: 'about', + }, + ], + page: 0, + nbHits: 1, + nbPages: 1, + }; + + expect(expectedBody).toEqual(union(expectedBody, resp)); }); test('get searchDictionaryEntries results with all parameters', async () => { diff --git a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt index 714e715902..ba6abd9766 100644 --- a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt +++ b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt @@ -528,7 +528,7 @@ class InsightsTest { index = "products", userToken = "user-123456", authenticatedUserToken = "user-123456", - timestamp = 1709942400000L, + timestamp = 1710201600000L, objectIDs = listOf("9780545139700", "9780439784542"), queryID = "43b15df305339e827f0ac0bdc5ebcaa7", ), @@ -538,7 +538,7 @@ class InsightsTest { index = "products", userToken = "user-123456", authenticatedUserToken = "user-123456", - timestamp = 1709942400000L, + timestamp = 1710201600000L, objectIDs = listOf("9780545139700", "9780439784542"), ), ), @@ -548,7 +548,7 @@ class InsightsTest { intercept = { assertEquals("/1/events".toPathSegments(), it.url.pathSegments) assertEquals(HttpMethod.parse("POST"), it.method) - assertJsonBody("""{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"]}]}""", it.body) + assertJsonBody("""{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"]}]}""", it.body) }, ) } diff --git a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt index 96b14b30ba..9a5a82f195 100644 --- a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt +++ b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt @@ -2237,7 +2237,6 @@ class SearchTest { aroundPrecision = AroundPrecision.of(0), aroundRadius = AroundRadiusAll.entries.first { it.value == "all" }, attributeCriteriaComputedByMinProximity = true, - attributesForFaceting = listOf(""), attributesToHighlight = listOf(""), attributesToRetrieve = listOf(""), attributesToSnippet = listOf(""), @@ -2252,7 +2251,6 @@ class SearchTest { enableReRanking = true, enableRules = true, exactOnSingleWordQuery = ExactOnSingleWordQuery.entries.first { it.value == "attribute" }, - explain = listOf("foo", "bar"), facetFilters = FacetFilters.of(listOf(MixedSearchFilters.of(""))), facetingAfterDistinct = true, facets = listOf(""), @@ -2323,7 +2321,7 @@ class SearchTest { intercept = { assertEquals("/1/indexes/*/queries".toPathSegments(), it.url.pathSegments) assertEquals(HttpMethod.parse("POST"), it.method) - assertJsonBody("""{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""", it.body) + assertJsonBody("""{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""", it.body) }, ) } @@ -2335,16 +2333,16 @@ class SearchTest { client.runTest( call = { searchDictionaryEntries( - dictionaryName = DictionaryType.entries.first { it.value == "compounds" }, + dictionaryName = DictionaryType.entries.first { it.value == "stopwords" }, searchDictionaryEntriesParams = SearchDictionaryEntriesParams( - query = "foo", + query = "about", ), ) }, intercept = { - assertEquals("/1/dictionaries/compounds/search".toPathSegments(), it.url.pathSegments) + assertEquals("/1/dictionaries/stopwords/search".toPathSegments(), it.url.pathSegments) assertEquals(HttpMethod.parse("POST"), it.method) - assertJsonBody("""{"query":"foo"}""", it.body) + assertJsonBody("""{"query":"about"}""", it.body) }, ) } diff --git a/tests/output/php/src/requests/InsightsTest.php b/tests/output/php/src/requests/InsightsTest.php index fff4a9eeea..6ba43264d1 100644 --- a/tests/output/php/src/requests/InsightsTest.php +++ b/tests/output/php/src/requests/InsightsTest.php @@ -630,7 +630,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1709942400000, + 'timestamp' => 1710201600000, 'objectIDs' => [ '9780545139700', @@ -644,7 +644,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1709942400000, + 'timestamp' => 1710201600000, 'objectIDs' => [ '9780545139700', @@ -659,7 +659,7 @@ public function testPushEvents1() [ 'path' => '/1/events', 'method' => 'POST', - 'body' => json_decode('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"]}]}'), + 'body' => json_decode('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"]}]}'), ], ]); @@ -671,7 +671,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1709942400000, + 'timestamp' => 1710201600000, 'objectIDs' => [ '9780545139700', @@ -685,7 +685,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1709942400000, + 'timestamp' => 1710201600000, 'objectIDs' => [ '9780545139700', diff --git a/tests/output/php/src/requests/SearchTest.php b/tests/output/php/src/requests/SearchTest.php index 8bf6c4dad8..3875f302ef 100644 --- a/tests/output/php/src/requests/SearchTest.php +++ b/tests/output/php/src/requests/SearchTest.php @@ -2544,9 +2544,6 @@ public function testSearch7() 'aroundPrecision' => 0, 'aroundRadius' => 'all', 'attributeCriteriaComputedByMinProximity' => true, - 'attributesForFaceting' => [ - '', - ], 'attributesToHighlight' => [ '', ], @@ -2573,11 +2570,6 @@ public function testSearch7() 'enableReRanking' => true, 'enableRules' => true, 'exactOnSingleWordQuery' => 'attribute', - 'explain' => [ - 'foo', - - 'bar', - ], 'facetFilters' => [ '', ], @@ -2724,7 +2716,7 @@ public function testSearch7() [ 'path' => '/1/indexes/*/queries', 'method' => 'POST', - 'body' => json_decode('{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}'), + 'body' => json_decode('{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}'), ], ]); } @@ -2737,18 +2729,29 @@ public function testSearchDictionaryEntries0() { $client = $this->getClient(); $client->searchDictionaryEntries( - 'compounds', - ['query' => 'foo', + 'stopwords', + ['query' => 'about', ], ); $this->assertRequests([ [ - 'path' => '/1/dictionaries/compounds/search', + 'path' => '/1/dictionaries/stopwords/search', 'method' => 'POST', - 'body' => json_decode('{"query":"foo"}'), + 'body' => json_decode('{"query":"about"}'), ], ]); + + $e2eClient = $this->getE2EClient(); + $resp = $e2eClient->searchDictionaryEntries( + 'stopwords', + ['query' => 'about', + ], + ); + + $expected = json_decode('{"hits":[{"objectID":"86ef58032f47d976ca7130a896086783","language":"en","word":"about"}],"page":0,"nbHits":1,"nbPages":1}', true); + + $this->assertEquals($this->union($expected, $resp), $expected); } /** diff --git a/tests/output/python/tests/requests/insights_test.py b/tests/output/python/tests/requests/insights_test.py index 966f62b99a..962ce97dc4 100644 --- a/tests/output/python/tests/requests/insights_test.py +++ b/tests/output/python/tests/requests/insights_test.py @@ -478,7 +478,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1709942400000, + "timestamp": 1710201600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -491,7 +491,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1709942400000, + "timestamp": 1710201600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -506,7 +506,7 @@ async def test_push_events_1(self): assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() assert loads(_req.data) == loads( - """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"]}]}""" + """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"]}]}""" ) raw_resp = await InsightsClient( @@ -520,7 +520,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1709942400000, + "timestamp": 1710201600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -533,7 +533,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1709942400000, + "timestamp": 1710201600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -555,7 +555,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1709942400000, + "timestamp": 1710201600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -568,7 +568,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1709942400000, + "timestamp": 1710201600000, "objectIDs": [ "9780545139700", "9780439784542", diff --git a/tests/output/python/tests/requests/search_test.py b/tests/output/python/tests/requests/search_test.py index c9a29d0371..3680e2a207 100644 --- a/tests/output/python/tests/requests/search_test.py +++ b/tests/output/python/tests/requests/search_test.py @@ -2159,9 +2159,6 @@ async def test_search_7(self): "aroundPrecision": 0, "aroundRadius": "all", "attributeCriteriaComputedByMinProximity": True, - "attributesForFaceting": [ - "", - ], "attributesToHighlight": [ "", ], @@ -2188,10 +2185,6 @@ async def test_search_7(self): "enableReRanking": True, "enableRules": True, "exactOnSingleWordQuery": "attribute", - "explain": [ - "foo", - "bar", - ], "facetFilters": [ "", ], @@ -2325,7 +2318,7 @@ async def test_search_7(self): assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() assert loads(_req.data) == loads( - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" ) async def test_search_dictionary_entries_0(self): @@ -2333,17 +2326,40 @@ async def test_search_dictionary_entries_0(self): get searchDictionaryEntries results with minimal parameters """ _req = await self._client.search_dictionary_entries_with_http_info( - dictionary_name="compounds", + dictionary_name="stopwords", search_dictionary_entries_params={ - "query": "foo", + "query": "about", }, ) - assert _req.path == "/1/dictionaries/compounds/search" + assert _req.path == "/1/dictionaries/stopwords/search" assert _req.verb == "POST" assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() - assert loads(_req.data) == loads("""{"query":"foo"}""") + assert loads(_req.data) == loads("""{"query":"about"}""") + + raw_resp = await SearchClient( + self._e2e_app_id, self._e2e_api_key + ).search_dictionary_entries_with_http_info( + dictionary_name="stopwords", + search_dictionary_entries_params={ + "query": "about", + }, + ) + assert raw_resp.status_code == 200 + + resp = await SearchClient( + self._e2e_app_id, self._e2e_api_key + ).search_dictionary_entries( + dictionary_name="stopwords", + search_dictionary_entries_params={ + "query": "about", + }, + ) + _expected_body = loads( + """{"hits":[{"objectID":"86ef58032f47d976ca7130a896086783","language":"en","word":"about"}],"page":0,"nbHits":1,"nbPages":1}""" + ) + assert self._helpers.union(_expected_body, resp) == _expected_body async def test_search_dictionary_entries_1(self): """ diff --git a/tests/output/ruby/test/requests/insights_test.rb b/tests/output/ruby/test/requests/insights_test.rb index 516e4ff666..39134368d5 100644 --- a/tests/output/ruby/test/requests/insights_test.rb +++ b/tests/output/ruby/test/requests/insights_test.rb @@ -364,7 +364,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_709_942_400_000, + timestamp: 1_710_201_600_000, object_ids: ["9780545139700", "9780439784542"], query_id: "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -374,7 +374,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_709_942_400_000, + timestamp: 1_710_201_600_000, object_ids: ["9780545139700", "9780439784542"] ) ] @@ -386,7 +386,7 @@ def test_push_events1 assert_equal({}.to_a, req.query_params.to_a) assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s) assert_equal( - JSON.parse('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"]}]}'), JSON.parse(req.body) + JSON.parse('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"]}]}'), JSON.parse(req.body) ) res = @e2e_client.push_events_with_http_info( @@ -398,7 +398,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_709_942_400_000, + timestamp: 1_710_201_600_000, object_ids: ["9780545139700", "9780439784542"], query_id: "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -408,7 +408,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_709_942_400_000, + timestamp: 1_710_201_600_000, object_ids: ["9780545139700", "9780439784542"] ) ] @@ -425,7 +425,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_709_942_400_000, + timestamp: 1_710_201_600_000, object_ids: ["9780545139700", "9780439784542"], query_id: "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -435,7 +435,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_709_942_400_000, + timestamp: 1_710_201_600_000, object_ids: ["9780545139700", "9780439784542"] ) ] diff --git a/tests/output/ruby/test/requests/search_test.rb b/tests/output/ruby/test/requests/search_test.rb index 3c5d3a4e81..e1c82c24b2 100644 --- a/tests/output/ruby/test/requests/search_test.rb +++ b/tests/output/ruby/test/requests/search_test.rb @@ -1631,7 +1631,6 @@ def test_search7 around_precision: 0, around_radius: 'all', attribute_criteria_computed_by_min_proximity: true, - attributes_for_faceting: [""], attributes_to_highlight: [""], attributes_to_retrieve: [""], attributes_to_snippet: [""], @@ -1646,9 +1645,6 @@ def test_search7 enable_re_ranking: true, enable_rules: true, exact_on_single_word_query: 'attribute', - explain: [ - "foo", "bar" - ], facet_filters: [""], faceting_after_distinct: true, facets: [""], @@ -1659,8 +1655,13 @@ def test_search7 hits_per_page: 1, ignore_plurals: false, index_name: "theIndexName", - inside_bounding_box: [[47.3165, 4.9665, 47.3424, 5.0201], - [40.9234, 2.1185, 38.643, 1.9916]], + inside_bounding_box: [ + [47.3165, + 4.9665, + 47.3424, + 5.0201], + [40.9234, 2.1185, 38.643, 1.9916] + ], inside_polygon: [[47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104]], keep_diacritics_on_characters: "", @@ -1718,22 +1719,35 @@ def test_search7 assert_equal({}.to_a, req.query_params.to_a) assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s) assert_equal( - JSON.parse('{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}'), JSON.parse(req.body) + JSON.parse('{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}'), JSON.parse(req.body) ) end # get searchDictionaryEntries results with minimal parameters def test_search_dictionary_entries0 req = @client.search_dictionary_entries_with_http_info( - 'compounds', - SearchDictionaryEntriesParams.new(query: "foo") + 'stopwords', + SearchDictionaryEntriesParams.new(query: "about") ) assert_equal(:post, req.method) - assert_equal('/1/dictionaries/compounds/search', req.path) + assert_equal('/1/dictionaries/stopwords/search', req.path) assert_equal({}.to_a, req.query_params.to_a) assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s) - assert_equal(JSON.parse('{"query":"foo"}'), JSON.parse(req.body)) + assert_equal(JSON.parse('{"query":"about"}'), JSON.parse(req.body)) + + res = @e2e_client.search_dictionary_entries_with_http_info( + 'stopwords', + SearchDictionaryEntriesParams.new(query: "about") + ) + + assert_equal(res.status, 200) + res = @e2e_client.search_dictionary_entries( + 'stopwords', + SearchDictionaryEntriesParams.new(query: "about") + ) + expected_body = JSON.parse('{"hits":[{"objectID":"86ef58032f47d976ca7130a896086783","language":"en","word":"about"}],"page":0,"nbHits":1,"nbPages":1}') + assert_equal(expected_body, union(expected_body, JSON.parse(res.to_json))) end # get searchDictionaryEntries results with all parameters diff --git a/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala b/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala index 85fef2b5b6..cab73d7e4c 100644 --- a/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala +++ b/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala @@ -596,7 +596,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1709942400000L), + timestamp = Some(1710201600000L), objectIDs = Seq("9780545139700", "9780439784542"), queryID = "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -606,7 +606,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1709942400000L), + timestamp = Some(1710201600000L), objectIDs = Seq("9780545139700", "9780439784542") ) ) @@ -619,7 +619,7 @@ class InsightsTest extends AnyFunSuite { assert(res.path == "/1/events") assert(res.method == "POST") val expectedBody = parse( - """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1709942400000,"objectIDs":["9780545139700","9780439784542"]}]}""" + """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1710201600000,"objectIDs":["9780545139700","9780439784542"]}]}""" ) val actualBody = parse(res.body.get) assert(actualBody == expectedBody) @@ -633,7 +633,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1709942400000L), + timestamp = Some(1710201600000L), objectIDs = Seq("9780545139700", "9780439784542"), queryID = "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -643,7 +643,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1709942400000L), + timestamp = Some(1710201600000L), objectIDs = Seq("9780545139700", "9780439784542") ) ) diff --git a/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala b/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala index 93e0672525..de87637859 100644 --- a/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala +++ b/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala @@ -2326,7 +2326,6 @@ class SearchTest extends AnyFunSuite { aroundPrecision = Some(AroundPrecision(0)), aroundRadius = Some(AroundRadiusAll.withName("all")), attributeCriteriaComputedByMinProximity = Some(true), - attributesForFaceting = Some(Seq("")), attributesToHighlight = Some(Seq("")), attributesToRetrieve = Some(Seq("")), attributesToSnippet = Some(Seq("")), @@ -2341,7 +2340,6 @@ class SearchTest extends AnyFunSuite { enableReRanking = Some(true), enableRules = Some(true), exactOnSingleWordQuery = Some(ExactOnSingleWordQuery.withName("attribute")), - explain = Some(Seq("foo", "bar")), facetFilters = Some(FacetFilters(Seq(MixedSearchFilters("")))), facetingAfterDistinct = Some(true), facets = Some(Seq("")), @@ -2428,7 +2426,7 @@ class SearchTest extends AnyFunSuite { assert(res.path == "/1/indexes/*/queries") assert(res.method == "POST") val expectedBody = parse( - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesForFaceting":[""],"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","explain":["foo","bar"],"facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":[""],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":[""],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" ) val actualBody = parse(res.body.get) assert(actualBody == expectedBody) @@ -2437,20 +2435,34 @@ class SearchTest extends AnyFunSuite { test("get searchDictionaryEntries results with minimal parameters") { val (client, echo) = testClient() val future = client.searchDictionaryEntries( - dictionaryName = DictionaryType.withName("compounds"), + dictionaryName = DictionaryType.withName("stopwords"), searchDictionaryEntriesParams = SearchDictionaryEntriesParams( - query = "foo" + query = "about" ) ) Await.ready(future, Duration.Inf) val res = echo.lastResponse.get - assert(res.path == "/1/dictionaries/compounds/search") + assert(res.path == "/1/dictionaries/stopwords/search") assert(res.method == "POST") - val expectedBody = parse("""{"query":"foo"}""") + val expectedBody = parse("""{"query":"about"}""") val actualBody = parse(res.body.get) assert(actualBody == expectedBody) + val e2eClient = testE2EClient() + val e2eFuture = e2eClient.searchDictionaryEntries( + dictionaryName = DictionaryType.withName("stopwords"), + searchDictionaryEntriesParams = SearchDictionaryEntriesParams( + query = "about" + ) + ) + + val response = Await.result(e2eFuture, Duration.Inf) + compareJSON( + """{"hits":[{"objectID":"86ef58032f47d976ca7130a896086783","language":"en","word":"about"}],"page":0,"nbHits":1,"nbPages":1}""", + write(response), + JSONCompareMode.LENIENT + ) } test("get searchDictionaryEntries results with all parameters") { diff --git a/tests/output/swift/Tests/requests/InsightsTests.swift b/tests/output/swift/Tests/requests/InsightsTests.swift index 6abc416754..2409189048 100644 --- a/tests/output/swift/Tests/requests/InsightsTests.swift +++ b/tests/output/swift/Tests/requests/InsightsTests.swift @@ -952,7 +952,7 @@ final class InsightsClientRequestsTests: XCTestCase { queryID: "43b15df305339e827f0ac0bdc5ebcaa7", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_709_942_400_000) + timestamp: Int64(1_710_201_600_000) ) ), EventsItems.viewedObjectIDs( @@ -966,7 +966,7 @@ final class InsightsClientRequestsTests: XCTestCase { ], userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_709_942_400_000) + timestamp: Int64(1_710_201_600_000) ) ), ] @@ -979,7 +979,7 @@ final class InsightsClientRequestsTests: XCTestCase { let echoResponseBodyJSON = try XCTUnwrap(echoResponseBodyData.jsonString) let expectedBodyData = - "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1709942400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1709942400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}" + "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1710201600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1710201600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}" .data(using: .utf8) let expectedBodyJSON = try XCTUnwrap(expectedBodyData?.jsonString) @@ -1010,7 +1010,7 @@ final class InsightsClientRequestsTests: XCTestCase { queryID: "43b15df305339e827f0ac0bdc5ebcaa7", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_709_942_400_000) + timestamp: Int64(1_710_201_600_000) ) ), EventsItems.viewedObjectIDs( @@ -1024,7 +1024,7 @@ final class InsightsClientRequestsTests: XCTestCase { ], userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_709_942_400_000) + timestamp: Int64(1_710_201_600_000) ) ), ] diff --git a/tests/output/swift/Tests/requests/SearchTests.swift b/tests/output/swift/Tests/requests/SearchTests.swift index 59b2e2f892..e02aac9000 100644 --- a/tests/output/swift/Tests/requests/SearchTests.swift +++ b/tests/output/swift/Tests/requests/SearchTests.swift @@ -3655,10 +3655,6 @@ final class SearchClientRequestsTests: XCTestCase { personalizationImpact: 0, userToken: "", getRankingInfo: true, - explain: [ - "foo", - "bar", - ], synonyms: true, clickAnalytics: true, analytics: true, @@ -3667,9 +3663,6 @@ final class SearchClientRequestsTests: XCTestCase { ], percentileComputation: true, enableABTest: true, - attributesForFaceting: [ - "", - ], attributesToRetrieve: [ "", ], @@ -3776,7 +3769,7 @@ final class SearchClientRequestsTests: XCTestCase { let echoResponseBodyJSON = try XCTUnwrap(echoResponseBodyData.jsonString) let expectedBodyData = - "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesForFaceting\":[\"\"],\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"explain\":[\"foo\",\"bar\"],\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}" + "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}" .data(using: .utf8) let expectedBodyJSON = try XCTUnwrap(expectedBodyData?.jsonString) @@ -3798,9 +3791,9 @@ final class SearchClientRequestsTests: XCTestCase { let client = SearchClient(configuration: configuration, transporter: transporter) let response = try await client.searchDictionaryEntriesWithHTTPInfo( - dictionaryName: DictionaryType.compounds, + dictionaryName: DictionaryType.stopwords, searchDictionaryEntriesParams: SearchDictionaryEntriesParams( - query: "foo" + query: "about" ) ) let responseBodyData = try XCTUnwrap(response.bodyData) @@ -3809,15 +3802,39 @@ final class SearchClientRequestsTests: XCTestCase { let echoResponseBodyData = try XCTUnwrap(echoResponse.originalBodyData) let echoResponseBodyJSON = try XCTUnwrap(echoResponseBodyData.jsonString) - let expectedBodyData = "{\"query\":\"foo\"}".data(using: .utf8) + let expectedBodyData = "{\"query\":\"about\"}".data(using: .utf8) let expectedBodyJSON = try XCTUnwrap(expectedBodyData?.jsonString) XCTAssertEqual(echoResponseBodyJSON, expectedBodyJSON) - XCTAssertEqual(echoResponse.path, "/1/dictionaries/compounds/search") + XCTAssertEqual(echoResponse.path, "/1/dictionaries/stopwords/search") XCTAssertEqual(echoResponse.method, HTTPMethod.post) XCTAssertNil(echoResponse.queryParameters) + + guard let e2eClient = SearchClientRequestsTests.e2eClient else { + XCTFail("E2E client is not initialized") + return + } + + let e2eResponse = try await e2eClient.searchDictionaryEntriesWithHTTPInfo( + dictionaryName: DictionaryType.stopwords, + searchDictionaryEntriesParams: SearchDictionaryEntriesParams( + query: "about" + ) + ) + let e2eResponseBody = try XCTUnwrap(e2eResponse.body) + let e2eResponseBodyData = try CodableHelper.jsonEncoder.encode(e2eResponseBody) + + let e2eExpectedBodyData = + try XCTUnwrap( + "{\"hits\":[{\"objectID\":\"86ef58032f47d976ca7130a896086783\",\"language\":\"en\",\"word\":\"about\"}],\"page\":0,\"nbHits\":1,\"nbPages\":1}" + .data(using: .utf8) + ) + + XCTLenientAssertEqual(received: e2eResponseBodyData, expected: e2eExpectedBodyData) + + XCTAssertEqual(e2eResponse.statusCode, 200) } /// get searchDictionaryEntries results with all parameters @@ -4704,6 +4721,9 @@ final class SearchClientRequestsTests: XCTestCase { let response = try await client.setSettingsWithHTTPInfo( indexName: "theIndexName", indexSettings: IndexSettings( + attributesForFaceting: [ + "algolia", + ], replicas: [ "", ], @@ -4745,9 +4765,6 @@ final class SearchClientRequestsTests: XCTestCase { ], ], attributeForDistinct: "test", - attributesForFaceting: [ - "algolia", - ], attributesToRetrieve: [ "algolia", ],